Skip to Content
-2
Aug 29, 2023 at 04:23 PM

Different ways to write code in if not statement and with Cond statement

349 Views Last edit Aug 30, 2023 at 01:05 AM 3 rev

Below code if not ... endif is not working with method condition, is there any other ways to write the code so that Condition in the method should work.

When processing coming at when line it is checking and the line then checking abap_true has constant x and else is empty space constant value.

when processing condition is not checking and exiting out. I want is that any other way that we can write this code differently so that processing should take accurate value and check if not line below.

IF NOT zcl_mes_flt_operations=>is_mes_relevant( ls_opr-steus ).

endif

method IS_MES_RELEVANT.
RELVANT = COND #(
WHEN line_exists( mt_controlkeys[ table_line = steus ] )
THEN abap_true
ELSE abap_false
).

image.png

Attachments

image.png (66.1 kB)