‎2007 Mar 26 6:34 AM
Dear all,i have this statment
select * from mkol where matnr eq intab-matnr and lgort in tem.
if.....endif.
endselect.
and it is working fine,but if i use the following statement,then it str8 go to endselect without go thru the if endif block.
select * from mkol where matnr eq intab-matnr and lgort in tem and not lgort in temc and not logrt in tempd.
if....endif.
endselect.
wat has gone wrong? previously i used in other program,it works,but this time it din work...pls help..thanks
‎2007 Mar 26 6:37 AM
i think for the 2nd select no data are found so it is not going through the select endselect loop. just check it in debug mode the value of sy-subrc and whether any data is fetching or not?
regards
shiba dutta
‎2007 Mar 26 6:39 AM
it din fetch any data,but infact there's one record to be fetched..
‎2007 Mar 26 6:46 AM
so it is not oing through the if end if..
just check your where condition..
what are temc tempd are they select-options?
regards
shiba dutta
‎2007 Mar 26 6:49 AM
Hi,
check whether ur condition is satisfing ur record or not.
regards,
bharat.
‎2007 Mar 26 6:50 AM
‎2007 Mar 26 6:53 AM
dear all,i manage to figure out the problem d..some of the storage location din get hard coded..thanks anyway
‎2007 Mar 26 7:01 AM
Joan,
Reason is your select statement returning the SY-SUBRC NE 0.
Try like
select * from mkol where matnr eq intab-matnr
and lgort in tem
and not ( lgort in temc
and logrt in tempd.
if....endif.
endselect.