‎2007 Feb 26 3:28 PM
Hello friends,
I am unable to get this if condition working in SAP script (SE71)
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU' AND &LFA1-LAND1& = ( 'US' OR 'CA' )
else....
endif.
Even when the condition is satisfied it dosent trigger. I am assuming to do with the brackets. Let me know an Alternative.
Thakns,
Madhu.
‎2007 Feb 26 3:56 PM
Hi,
Please try this.
...
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU'.
IF &LFA1-LAND1& EQ 'US' OR &LFA1-LAND1& EQ 'CA'.
...
ENDIF.
ELSE.
...
ENDIF.
Regards,
Ferry Lianto
‎2007 Feb 26 3:31 PM
modify as highlighted:
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU' AND <b>( &LFA1-LAND1& = 'US' OR &LFA1-LAND1& = 'CA' )</b>
Regards,
Ravi
‎2007 Feb 26 3:35 PM
Hi,
Please try this.
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU' AND ( &LFA1-LAND1& EQ 'US' OR &LFA1-LAND1& EQ 'CA' ).
Regards,
Ferry Lianto
‎2007 Feb 26 3:48 PM
Thanks Ravi and ferry,
I have tried even this and it dosent work as well. Any more suggestions. When i cahnges the code it also gave me a warning message.
message - AND, OR or end of condition expected
Madhu.
‎2007 Feb 26 3:56 PM
Hi,
Please try this.
...
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU'.
IF &LFA1-LAND1& EQ 'US' OR &LFA1-LAND1& EQ 'CA'.
...
ENDIF.
ELSE.
...
ENDIF.
Regards,
Ferry Lianto
‎2007 Feb 26 4:09 PM
Thanks Ferry,
I actually tried this method the first time but i gave problems.
There are many elseif followed by this else if...
Suppose,
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU'.
is satisfied and
IF &LFA1-LAND1& EQ 'US' OR &LFA1-LAND1& EQ 'CA'.
is not satisfied,
it dosent check for other conditions...
however i got it working,
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU' and &LFA1-LAND1& = 'US'
.....
....
ELSEIF &EKKO-BUKRS& EQ 'KYCO' AND &EKPO-WERKS& EQ 'VU' and &LFA1-LAND1& = 'CA'
.....
....
elseif...
..endif.
Anyways thanks for the suggestions.
Madhu.