Code: Alles auswählen.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-001 FOR FIELD pa_sort1.
PARAMETERS: pa_sort1 LIKE adrc-sort1, "Suchbegriff 1
pa_sort2 LIKE adrc-sort2. "Scuhbegriff 2
RANGES: r_sort1 FOR adrc-sort1,
r_sort2 FOR adrc-sort2.
IF NOT pa_sort1 IS INITIAL.
r_sort1-sign = 'I'.
r_sort1-option = 'EQ'.
r_sort1-low = pa_sort1.
APPEND r_sort1.
CLEAR r_sort1.
ENDIF.
IF NOT pa_sort2 IS INITIAL.
r_sort2-sign = 'I'.
r_sort2-option = 'EQ'.
r_sort2-low = pa_sort1.
APPEND r_sort2.
CLEAR r_sort2.
ENDIF.
SELECTION-SCREEN END OF LINE.
*SELECT-OPTIONS: so_sort1 FOR itab_input-sort1 "Suchbegriff 1
* NO-EXTENSION NO INTERVALS,
* so_sort2 FOR itab_input-sort2 "Suchbegriff 2
* NO-EXTENSION NO INTERVALS.
Code: Alles auswählen.
IF NOT pa_sort1 IS INITIAL.
r_sort1-sign = 'I'.
r_sort1-option = 'EQ'.
r_sort1-low = pa_sort1.
APPEND r_sort1.
CLEAR r_sort1.
ENDIF.
Code: Alles auswählen.
IF NOT pa_sort1 IS INITIAL.
REPLACE ALL OCCURRENCES OF '+' IN pa_sort1 WITH '_'.
REPLACE ALL OCCURRENCES OF '*' IN pa_sort1 WITH '%'.
ENDIF.
Code: Alles auswählen.
REPORT ztest LINE-SIZE 125 NO STANDARD PAGE HEADING.
DATA it_such TYPE adrc OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-001 FOR FIELD pa_sort1.
PARAMETERS: pa_sort1 LIKE adrc-sort1, "Suchbegriff 1
pa_sort2 LIKE adrc-sort2. "Suchbegriff 2
SELECTION-SCREEN END OF LINE.
START-OF-SELECTION.
IF NOT pa_sort1 IS INITIAL.
REPLACE ALL OCCURRENCES OF '+' IN pa_sort1 WITH '_'.
REPLACE ALL OCCURRENCES OF '*' IN pa_sort1 WITH '%'.
ENDIF.
IF NOT pa_sort2 IS INITIAL.
REPLACE ALL OCCURRENCES OF '+' IN pa_sort2 WITH '_'.
REPLACE ALL OCCURRENCES OF '*' IN pa_sort2 WITH '%'.
ENDIF.
SELECT * FROM adrc INTO TABLE it_such
WHERE sort1 LIKE pa_sort1
OR sort2 LIKE pa_sort2.
LOOP AT it_such.
WRITE: / it_such-name1, it_such-sort1, it_such-sort2.
ENDLOOP.