Code: Alles auswählen.
* Wertehilfe F4 für die Liferantennummer - 1. Wert
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lifnr-low.
PERFORM help_lifnr.
* Wertehilfe F4 für die Liferantennummer - 2. Wert
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lifnr-high.
PERFORM help_lifnr.
** Wertehilfe F4 für die Kundennummer - 1. Wert
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_kunnr-low.
PERFORM help_kunnr.
* Wertehilfe F4 für die Kundennummer - 2. Wert
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_kunnr-high.
PERFORM help_kunnr.
at selection-screen.
perform select_data.
END-OF-SELECTION.
FORM help_lifnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_lifnr
IMPORTING
output = s_lifnr.
SELECT DISTINCT lifnr linam INTO CORRESPONDING FIELDS OF TABLE gt_table
FROM table
WHERE lifnr in s_lifnr.
MOVE-CORRESPONDING gt_table TO gt_lifnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LIFNR'
dynpprog = sy-repid " Program name
dynpnr = sy-dynnr " Screen number
dynprofield = 'S_LIFNR' " F4 help need field
value_org = 'S'
TABLES
value_tab = gt_lifnr " F4 help values
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDFORM.
FORM help_kunnr.
SELECT DISTINCT kunnr kunam INTO CORRESPONDING FIELDS OF TABLE gt_table
FROM table
WHERE kunnr IN s_kunnr.
MOVE-CORRESPONDING gt_table TO gt_kunnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'KUNNR'
dynpprog = sy-repid " Program name
dynpnr = sy-dynnr " Screen number
dynprofield = 'S_KUNNR' " F4 help need field
value_org = 'S'
TABLES
value_tab = gt_kunnr" F4 help values
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDFORM.
FORM select_data.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_table " --> funktioniert
FROM table
WHERE lifnr IN s_lifnr
AND kunnr IN s_kunnr.
ENDFORM.
Code: Alles auswählen.
at selection-screen output.
loop at s_lifnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_lifnr-low
IMPORTING
output = s_lifnr-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_lifnr-high
IMPORTING
output = s_lifnr-high.
modify s_lifnr.
endloop.