2008 Sep 24 9:13 AM
Hello Experts,
Plz tell where i m wrong in my code.
if ( record-EKORG_002 NOT IN ('1000','1100' ,'1200' ) ).
move-corresponding record to it_error.
append it_error.
OR
if ( record-bukrs_001 cs 'XYZ' ).
if ( ( record-ekorg_002 ne '1000' ) or ( record-ekorg_002 ne '1100' )
or ( record-ekorg_002 ne '1200' ) ).
move-corresponding record to it_error.
append it_error.
endif.
endif.
2008 Sep 24 9:16 AM
Hi,
Try this.
If u r using the second stmt, then try like this
if ( record-bukrs_001 cs 'XYZ' ).
if ( ( record-ekorg_002 ne '1000' ) AND
( record-ekorg_002 ne '1100' ) AND
( record-ekorg_002 ne '1200' ) ).
move-corresponding record to it_error.
append it_error.
endif.
endif.
Sharin
2008 Sep 24 9:16 AM
Hi,
chnage your below code as
if ( record-bukrs_001 cs 'XYZ' ).
if ( ( record-ekorg_002 ne '1000' ) and ( record-ekorg_002 ne '1100' )
and ( record-ekorg_002 ne '1200' ) ).
move-corresponding record to it_error.
append it_error.
endif.
endif.
Regards,
Paliwal
2008 Sep 24 9:31 AM
hi,
>
> if ( record-bukrs_001 cs 'XYZ' ).
>
> if ( ( record-ekorg_002 ne '1000' ) or ( record-ekorg_002 ne '1100' )
> or ( record-ekorg_002 ne '1200' ) ).
> move-corresponding record to it_error.
> append it_error.
>
>
> endif.
> endif.
in place of OR use AND in the second IF statement.
thus your statement will look like following.
if ( ( record-ekorg_002 ne '1000' ) AND
( record-ekorg_002 ne '1100' ) AND
( record-ekorg_002 ne '1200' ) ).
2008 Sep 24 9:56 AM
Hi ,
U have to use AND instead of OR condition as it is a NE operation. If you are gng for a EQ condition u can use the or condition.
Regards, Neslin.