Code: Alles auswählen.
select a~land1
a~pstlz
a~ort01
a~name1
a~name2
a~ktokk
a~stceg
a~lifnr
a~vbund
b~land1
b~stceg
into corresponding fields of table l_it_sel_data
from lfa1 as a
left outer join lfas as b
on a~lifnr = b~lifnr.
CALL FUNCTION 'F4UT_RESULTS_MAP'
* EXPORTING
* SOURCE_STRUCTURE =
* APPLY_RESTRICTIONS = ' '
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = l_it_sel_data
CHANGING
shlp = shlp
callcontrol = callcontrol
* EXCEPTIONS
* ILLEGAL_STRUCTURE = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
CALLCONTROL-STEP = 'DISP'.
ENDIF.
*"----------------------------------------------------------------------
* STEP SELECT (Select values)
*"----------------------------------------------------------------------
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.
IF CALLCONTROL-STEP = 'SELECT'.
* PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
* CHANGING SHLP CALLCONTROL RC.
* IF RC = 0.
* CALLCONTROL-STEP = 'DISP'.
* ELSE.
* CALLCONTROL-STEP = 'EXIT'.
* ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.