‎2009 Oct 07 11:25 AM
hi guru's,
i have a problem when taking data in ITAB thru select query, it is not picking data as in table...
Table MSEG data :
MBLNR.........MATNR.........BWART.........LGORT.........ERFMG.........AUFNR
500012.........AAAA.............321............RECP................123............100056
500017.........AAAA.............311............RECP................123
500014.........BBBB..............321............RECP.................115...........100058
500019.........BBBB..............311............RECP.................110
i wrote select query:
select mblnr matnr bwart lgort erfmg aufnr from mseg into itab where matnr = itab2-matnr
and lgort = itab2-lgort
and bwart = in ('321' , '311')
and zeile ne '2'.
then i m getting data in itab like :
ITAB data:
MBLNR.............. MATNR ............ BWART.............. LGORT.............. ERFMG AUFNR
500017 .............. AAAA................ 311................. RECP .............. 123
500019.............. BBBB................. 311................ RECP.............. 110
500012.............. AAAA................ 321................. RECP .............. 123.............. 100056
500014.............. BBBB................ 321 ................. RECP .............. 115 .............. 100058
can anyone please tell me that how can i get the data in ITAB in same format as in table? actually i have to do calculation of quantity on behalf of moment type.
Regards.
‎2009 Oct 07 11:33 AM
‎2009 Oct 07 11:33 AM
‎2009 Oct 07 11:44 AM
Just sort the internal table based on matnr and mblnr
sort itab by matnr mblnr.
‎2009 Oct 07 11:47 AM
‎2009 Oct 07 11:51 AM
‎2009 Oct 07 11:52 AM
hii
you are getting right data
just sort it by matnr and mblnr.
Sort itab bby matnr mblnr.
Edited by: runal kesarwani on Oct 7, 2009 12:52 PM
‎2009 Oct 07 2:28 PM
@@ABAP@ - when you assign full points to an obviously incorrect answer, it raises red flags to the moderators.
Rob
‎2009 Oct 12 11:02 AM
Hi Rob
Would luv to know wat was so obviously wrong with the answer to that query?
Regards
Sameer
‎2009 Oct 12 5:36 PM