cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in IF condition

Former Member
0 Kudos
59

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You need to pad the comparison field with zeroes:

ELSEIF TEMP_SAKTO > '0003900000'.

Rob

Answers (0)