Code: Alles auswählen.
REPORT YTEST_HB3.
DATA number TYPE i.
DATA number2 TYPE i.
ranges: s_number FOR number.
s_number-sign = 'I'.
s_number-option = 'EQ'.
s_number-low = 9.
APPEND s_number TO s_number.
s_number-sign = 'I'.
s_number-option = 'BT'.
s_number-low = 3.
s_number-high = 7.
APPEND s_number TO s_number.
s_number-sign = 'E'.
s_number-option = 'EQ'.
s_number-low = 6.
APPEND s_number TO s_number.
s_number-sign = 'E'.
s_number-option = 'BT'.
s_number-low = 1.
s_number-high = 4.
APPEND s_number TO s_number.
DO 10 TIMES.
number = 9.
IF number in s_number.
WRITE: / sy-index, ' number = 9'.
ENDIF.
ENDDO.
DO 10 TIMES.
number = sy-index.
IF number in s_number.
WRITE: / sy-index, ' number = sy-index'.
ENDIF.
ENDDO.
Code: Alles auswählen.
SELECTION-SCREEN BEGIN OF SCREEN 100.
select-options: car_inc for vcar_inc no-display.
select-options: csr_inc for vcsr_inc no-display.
select-options: cst_inc for vcst_inc no-display.
select-options: plt_inc for vplt_inc no-display.
select-options: ov_inc for vov_inc no-display.
select-options: sdifc_cr for vsdifc_cr no-display.
select-options: sdifc_ls for vsdifc_ls no-display.
select-options: sdifc_oc for vsdifc_oc no-display.
select-options: sdifc_ot for vsdifc_ovt no-display.
SELECTION-SCREEN END OF SCREEN 100.
Code: Alles auswählen.
number = 9.
IF number IN s_number.
WRITE: / sy-index, ' number = 9'.
ENDIF.
Ja.ChrisB hat geschrieben:Und das ist, soweit ich das sehe, völlig korrekt.
Code: Alles auswählen.
number = 0.
DO 10 TIMES.
number = number + 1.
IF number IN s_number.
WRITE: / sy-index, ' number = number'.
ENDIF.
ENDDO.
Code: Alles auswählen.
5 number = number
7 number = number
9 number = number
5 number = sy-index
7 number = sy-index
9 number = sy-index
Code: Alles auswählen.
Die durch die gesamte Tabelle sel festgelegte Menge ist dieVereinigungsmenge der "Inclusive-Mengen" (Zeilen mit SIGN = 'I')abzüglich der Vereinigungsmenge der "Exclusive-Mengen" (Zeilen mitSIGN = 'E').