Code: Alles auswählen.
if ( ls_mard-labst is not INITIAL and ls_mard-insme is INITIAL and ls_mard-speme is INITIAL and ls_mard-retme is INITIAL )
or ( ls_mard-labst is INITIAL and ls_mard-insme is not INITIAL and ls_mard-speme is INITIAL and ls_mard-retme is INITIAL )
or ( ls_mard-labst is INITIAL and ls_mard-insme is INITIAL and ls_mard-speme is not INITIAL and ls_mard-retme is INITIAL )
or ( ls_mard-labst is INITIAL and ls_mard-insme is INITIAL and ls_mard-speme is INITIAL and ls_mard-retme is not INITIAL ).
"mach was
else.
"mach was anderes
endif.
Code: Alles auswählen.
data ld_count type i.
if ls_mard-labst is not INITIAL. add 1 to ld_count. ENDIF.
if ls_mard-insme is not INITIAL. add 1 to ld_count. ENDIF.
if ls_mard-speme is not INITIAL. add 1 to ld_count. ENDIF.
if ls_mard-retme is not INITIAL. add 1 to ld_count. ENDIF.
if ld_count eq 1.
"mach was
else.
"mach was anderes
endif.Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
Barney
Code: Alles auswählen.
IF ls_mard-labst IS NOT INITIAL.
ADD 1 TO lf_count.
ENDIF.
IF ls_mard-insme IS NOT INITIAL.
ADD 1 TO lf_count.
ENDIF.
IF ls_mard-speme IS NOT INITIAL.
ADD 1 TO lf_count.
ENDIF.
IF ls_mard-retme IS NOT INITIAL.
ADD 1 TO lf_count.
ENDIF.
IF lf_count EQ 1.
p_ok = 'X'.
ELSE. "more than one stock type
...
Code: Alles auswählen.
summe = labst + insme + speme + retme.
if speme = summe or
labst = summe or
insme = summe or
retme = summe.
endif.