06-06-2006 4:00 PM
i make a query in se16 for table ESSR
and make the select in the same conditions as in se16
and get another results why???
select lblni ebeln ebelp banfn bnfpo packno
from essr
into corresponding fields of table itab
where erdat in zerdat
and loekz = ' '
and kzabn = 'X'
and frgrl = ' '
and knttp = 'F'.
and f_lock = ' '
and banfn <> ' '
and bnfpo <> ' '.
and frggr = 'CS'.
06-06-2006 4:04 PM
06-06-2006 4:04 PM
Hi Rani,
Are you sure that the underlying SQL passed to the database by the SAP database managment layer is identical in both cases ?
I would trace both the SE16 transaction and your own coded program using ST05 and compare the results. This may point to the difference.
Gary
06-06-2006 4:05 PM
06-06-2006 4:06 PM
06-06-2006 4:06 PM
I think if you check the same selection in SE16 and then code it . You might be missing something . As Select statement is too long I prefer you to break it and then analyze it .
E,g
<u><b>Part 1 select and also check in SE16</b></u>
<b>select lblni ebeln ebelp banfn bnfpo packno
from essr
into corresponding fields of table itab
where erdat in zerdat
and loekz = ' '
and kzabn = 'X'.</b>
<u><b>Part 2 select and also check in SE16</b></u>
select lblni ebeln ebelp banfn bnfpo packno
from essr
into corresponding fields of table itab
where erdat in zerdat
and loekz = ' '
and kzabn = 'X'
and frgrl = ' '
and knttp = 'F'
and f_lock = ' '.
part 3
select lblni ebeln ebelp banfn bnfpo packno
from essr
into corresponding fields of table itab
where erdat in zerdat
and loekz = ' '
and kzabn = 'X'
and frgrl = ' '
and knttp = 'F'<b>.</b> ( i think you put this full stop by mistake )
and f_lock = ' '
and banfn <> ' '
and bnfpo <> ' '<b>.</b> ( i think you put this full stop by mistake )
and frggr = 'CS'.
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
06-06-2006 4:06 PM
I've experienced different results when comparing null blank and non blank field contents.
Try this:
Use SE30 and run your SE16. This way you will get the runtime analysis. Go in the details and check the select single of fetch command for table ESSR. Put a breakpoint or just copy the call. The call might be structured a little different then yours, maybe using only ranges(select options).
Good luck
Message was edited by: Leonardo De Araujo