‎2007 Aug 13 1:25 AM
Hi gurus,
I need to use if statement like the following:
If it_temp-status = 'A' or 'B', check it_temp-status not equal to 'B' and if check fails, move message 'Incorrect Program" to it_temp-reason.
can you please tell me hoe to do it.
Thanks
Rajeev Gupta
‎2007 Aug 13 1:35 AM
IF it_temp-status = 'B'.
it_temp-reason = 'Incorrect Program'.
ENDIF.
I don't get the need for the A or B condition.
What you ask for would be to do
IF it_temp-status = 'A' OR it_temp-status = 'B'.
IF it_temp-status = 'B'.
it_temp-reason = 'Incorrect Program'.
ENDIF.
ENDIF.
Regards
‎2007 Aug 13 1:35 AM
See the below code :
if it_temp-status = 'A' or it_temp-status = 'B'.
if it_temp-status ne 'B'.
do whatever you want.
endif.
endif.
Thanks
Seshu
‎2007 Aug 13 1:35 AM
IF it_temp-status = 'B'.
it_temp-reason = 'Incorrect Program'.
ENDIF.
I don't get the need for the A or B condition.
What you ask for would be to do
IF it_temp-status = 'A' OR it_temp-status = 'B'.
IF it_temp-status = 'B'.
it_temp-reason = 'Incorrect Program'.
ENDIF.
ENDIF.
Regards
‎2007 Aug 13 1:35 AM
Hi,
You can use just this much.
IF it_temp-status NE 'B'
<b>if check fails,</b> Write here whatever check you want.
it_temp-reason = 'Incorrect Program" .
ENDIF.
Regards,
Atish
‎2007 Aug 13 1:36 AM