Skip to Content
0
Former Member
Sep 08, 2009 at 09:38 PM

Problem in IF condition

38 Views

Hi All,

I am facing a problem in the if condition below, here the IF statement checks only the 1st condition and even if it does not satisfy it populates the error message.

IF ( ( ( T_EBAN-BSART = 'FO' OR

T_EBAN-BSART = 'ZX' OR

T_EBAN-BSART = 'NB' ) AND

( T_EBAN-KNTTP = 'Y' ) ) AND

( ( AUFK-AUART = 'ZIN1' ) OR

( AUFK-AUART = 'ZIN2' ) OR

( AUFK-AUART = 'ZIN3' ) OR

( AUFK-AUART = 'ZIN4' ) ) ).

IF T_EBKN-SAKTO is not initial.

*Condition 1

IF T_EBKN-SAKTO < '3000000'.

t_message-type = 'E'.

t_message-id = 'MID'.

t_message-number = '028'.

append t_message to ex_messages.

*Condition 2

ELSEIF TEMP_SAKTO > '3900000'.

t_message-type = 'E'.

t_message-id = 'MID'.

t_message-number = '028'.

append t_message to ex_messages.

ENDIF.

ENDIF.

ENDIF.

Here even if the value of T_EBKN-SAKTO is greater or less than the given value the IF condion executes only for the 1st logic and not for the seceond logic.

Help and suggestions will be much appreciated.

Thanks.

Kumar