Ansicht
Dokumentation

NOTIFICATION_SELECT - NOTRANSL: Allgemeine Selektion von Meldungen

NOTIFICATION_SELECT - NOTRANSL: Allgemeine Selektion von Meldungen

Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module displays a list of notifications.

The interface of the module constists of three internal tables:
1) ITAB_TARGET: Target table for the selection (with structure RIHQMEL),
2) ITAB_MRANGE: Conditions for the selection (=> WHERE-clause),
3) ITAB_ROWS: Desired columns to be read from the DB table(s) .

In the ITAB_ROWS you specify which fields (ITAB_ROWS-FNAME) should be
selected from the RIHQMEL. This means that only the fields that are
required are selected.
The ITAB_MRANGE can be interpreted as a RANGE table for all fields. It
is therefore just a number of RANGE tables put together, where each
record contains the additional information, which field each condition
refers to.
The ITAB_TARGET is, after all, the target table; It contains the result
of the selection.

Two types of fields are differentiated between in the ITAB_ROWS :
a) Fields that are available in the notification view (VIQMELST); These
should be indicated (in ITAB_ROWS-TNAME) with 'VIQMELST',
b) Fields that are read from other tables; These fields should be
indicated with 'RIHQMEL'.

Non-indicated fields are assigned to the first group.
If no field of the first group is specified, ALL fields of the
notification view are selected.
If no field of the second group is specified, NO additional selection
of other tables is performed.
In particular, a totally normal selection of the notification view
(without additional selection) occurs if there are empty ITAB_ROWS.

Example

report me-sel.

data: begin of itab_target occurs 5.
include structure rihqmel.
data: end of itab_target.
data: begin of itab_mrange occurs 5.
include structure multirange.
data: end of itab_mrange.
data: begin of itab_rows occurs 5.
include structure tablefield.
data: end of itab_rows.

* Selection conditions: Display all notifications for customer 971, that
* were created from 23.07.1996.
itab_mrange-sign = 'I'.

itab_mrange-option = 'EQ'.
itab_mrange-fname = 'KUNUM'.
itab_mrange-low = '00000971'.
append itab_mrange.

itab_mrange-option = 'GE'.
itab_mrange-fname = 'QMDAT'.
itab_mrange-low = '19960723'.
append itab_mrange.

* Columns to be selected (all from VIQMELST)
itab_rows-tname = 'VIQMELST'.

itab_rows-fname = 'QMNUM'.
append itab_rows.
itab_rows-fname = 'QMART'.
append itab_rows.
itab_rows-fname = 'QMTXT'.
append itab_rows.
itab_rows-fname = 'PRIOK'.
append itab_rows.
itab_rows-fname = 'EQUNR'.
append itab_rows.
itab_rows-fname = 'ERNAM'.
append itab_rows.

* Call up selection module:
call function 'NOTIFICATION_SELECT'
tables
itab_target = itab_target
itab_mrange = itab_mrange
itab_rows = itab_rows
exceptions
others = 1.

* Evaluation of selection results...

Notes

Automatically structured function modules are, for example:
1) EQUIPMENT_SELECT : Selection of (complete) pieces of equipment,
2) SERIALNUMBER_SELECT: Selection of serial numbers,
3) FUNCLOC_SELECT : Selection of functional locations.





Parameters

ITAB_MRANGE
ITAB_ROWS
ITAB_TARGET

Exceptions

ERR_SELECT

Function Group

IBME

PERFORM Short Reference   General Material Data  
This documentation is copyright by SAP AG.

Length: 3746 Date: 20240523 Time: 125015     sap01-206 ( 28 ms )