Code: Alles auswählen.
REPORT z_test.
data: feld type char4.
select-OPTIONS: s_f01 for feld,
s_f02 for feld,
s_f03 for feld,
s_f04 for feld,
s_f05 for feld,
s_f06 for feld,
s_f07 for feld,
s_f08 for feld,
s_f09 for feld,
s_f10 for feld.
IF s_f01[] IS INITIAL.
IF s_f02[] IS INITIAL.
IF s_f03[] IS INITIAL.
IF s_f04[] IS INITIAL.
IF s_f05[] IS INITIAL.
IF s_f06[] IS INITIAL.
IF s_f07[] IS INITIAL.
IF s_f08[] IS INITIAL.
IF s_f09[] IS INITIAL.
IF s_f10[] IS INITIAL.
Write: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Code: Alles auswählen.
REPORT z_test.
DATA: feld TYPE char4.
DEFINE m_feld.
select-options: s_f&1 for feld.
END-OF-DEFINITION.
DEFINE m_pruf.
elseif not s_f&1[] is initial.
END-OF-DEFINITION.
m_feld: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10.
IF NOT s_f01[] IS INITIAL.
m_pruf: 02, 03, 04, 05, 06, 07, 08, 09, 10.
ELSE.
WRITE: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
Code: Alles auswählen.
REPORT Z_TEST.
DATA: FELD TYPE CHAR4.
SELECT-OPTIONS: S_F01 FOR FELD,
S_F02 FOR FELD,
S_F03 FOR FELD,
S_F04 FOR FELD,
S_F05 FOR FELD,
S_F06 FOR FELD,
S_F07 FOR FELD,
S_F08 FOR FELD,
S_F09 FOR FELD,
S_F10 FOR FELD.
DATA: H_WERT TYPE P,
H_SUM TYPE P.
DEFINE M_PRUF.
DESCRIBE TABLE S_F&1[] LINES H_WERT.
H_SUM = H_SUM + H_WERT.
END-OF-DEFINITION.
M_PRUF: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10.
IF H_SUM = 0.
WRITE: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
Code: Alles auswählen.
REPORT Z_TEST.
DATA: FELD TYPE CHAR4.
DATA: H_Feld type RANGE OF feld.
SELECT-OPTIONS: S_F01 FOR FELD,
S_F02 FOR FELD,
S_F03 FOR FELD,
S_F04 FOR FELD,
S_F05 FOR FELD,
S_F06 FOR FELD,
S_F07 FOR FELD,
S_F08 FOR FELD,
S_F09 FOR FELD,
S_F10 FOR FELD.
APPEND LINES OF: s_f01 to H_Feld,
s_f02 to H_feld,
s_f03 to H_feld,
s_f04 to H_feld,
s_f05 to H_feld,
s_f06 to H_feld,
s_f07 to H_feld,
s_f08 to H_feld,
s_f09 to H_feld,
s_f10 to H_feld.
if H_FELD is initial.
WRITE: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
Code: Alles auswählen.
REPORT z_test.
data: feld type char4.
select-OPTIONS: s_f01 for feld,
s_f02 for feld,
s_f03 for feld,
s_f04 for feld,
s_f05 for feld,
s_f06 for feld,
s_f07 for feld,
s_f08 for feld,
s_f09 for feld,
s_f10 for feld.
IF s_f01[] IS INITIAL AND s_f02[] IS INITIAL AND s_f03[] IS INITIAL
AND s_f04[] IS INITIAL AND s_f05[] IS INITIAL AND s_f06[] IS INITIAL
AND s_f07[] IS INITIAL AND s_f08[] IS INITIAL AND s_f09[] IS INITIAL
AND s_f10[] IS INITIAL.
Write: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
Code: Alles auswählen.
REPORT z_test.
DATA: feld TYPE char4,
h_name TYPE char7 VALUE 'S_F01[]',
h_index TYPE numc2,
h_check TYPE char1.
DEFINE m_feld.
select-options: s_f&1 for feld.
END-OF-DEFINITION.
m_feld: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10.
FIELD-SYMBOLS <f> TYPE table.
DO 10 TIMES.
h_index = sy-index.
h_name+3(2) = h_index.
ASSIGN (h_name) TO <f>.
IF NOT <f> IS INITIAL.
h_check = 'X'.
ENDIF.
ENDDO.
IF h_check IS INITIAL.
WRITE: / 'Bitte mindestens einen Wert eingeben'.
ENDIF.
Code: Alles auswählen.
h_index = sy-index.
h_name+3(2) = h_index.
Code: Alles auswählen.
h_name+3(2) = sy-index.