‎2008 Feb 18 2:54 PM
I am writting an IF ESLE statement. But getting an error in the following statement.
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
tbl_zmdemain_unres-lgort <> ('0003' and tbl_openreg-lgort).
Can you please suggest how to write the above statement in correct fashion.
Thanks,
AP
‎2008 Feb 18 2:58 PM
Hello,
Make the change like this.
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ '0003' and
tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).
Cheers,
Vasanth
‎2008 Feb 18 2:58 PM
Hello,
Make the change like this.
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ '0003' and
tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).
Cheers,
Vasanth
‎2008 Feb 18 3:11 PM
Hello AP,
If you don't want the LGORT as 0003, then this is the easy way.
data: ra_lgort type range of lgort_d with header line.
ra_lgort-sign = 'E'.
ra_lgort-option = 'I'.
ra_lgort-low = '0003'.
append ra_lgort.
ra_lgort-low = tbl_openreg-lgort.
append ra_lgort.
" In the if statement.
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
tbl_zmdemain_unres-lgort IN RA_LGORT.
Hope this will helps you.
Cheers,
Vasanth
‎2008 Feb 18 3:22 PM
‎2008 Feb 18 2:59 PM
hi AP,
do you mean tbl_zmdemain_unres-lgort should be 0003 OR tbl_openreg-lgort?
then do like:
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ '0003' OR
tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).
hope this helps
ec
‎2008 Feb 18 3:05 PM
Hello Eric,
I mean tbl_zmdemain_unres-lgort should NOT BE 0003 OR tbl_openreg-lgort?
Thanks,
AP
‎2008 Feb 18 3:26 PM
change like this:
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort NE '0003' AND
tbl_zmdemain_unres-lgort NE tbl_openreg-lgort).
‎2008 Feb 18 3:40 PM
Change the logic a bit.
* Your ELSEIF condition.
case tbl_zmdemain_unres-lgort .
WHEN '0003'
WHEN OTHERS.
IF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe
AND tbl_zmdemain_unres-lgort NE tbl_openreg-lgort.
* rest of your logic for this condition..............
endif.
endcase.
* rest of your code.
endif.
I think this is easier to read in any case.
Cheers
jimbo
‎2008 Feb 18 3:01 PM
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ '0003' OR
tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).
Cheers!!
Lokesh
‎2008 Feb 18 3:03 PM
Hi,
Your statemet:
*ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
tbl_zmdemain_unres-lgort ('0003' and tbl_openreg-lgort).*
I am not sure of what logic you want to achieve, but based on my understanding, find below a suggestion
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND tbl_zmdemain_unres-lgort EQ '0003' AND tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort.
<REMOVED BY MODERATOR>
Regards,
Vivek
Edited by: Alvaro Tejada Galindo on Feb 18, 2008 10:53 AM