2009 Jul 06 1:47 PM
Hey experts I have one query...!
in MSEG field lfbnr contains the reference document no.
I want to eliminate the entries which have reversal ....!
like if one( MBLNR 123 with moment 101 has lfbnr null ) and its reversal is ( MBLNR 456 with moment 102 with lfbnr = 123 check ! )
i want to eliminate both
the query will somwhat look like below....athough its not actual....!
SELECT MBLNR
FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
WHERE
BWART = '101' AND
mblnr not in
( SELECT lfbnr as mblnr FROM mseg WHERE bwart = '102' ).
above is just an example...just for test....
plz suggest a solution or suggest a aternative for same thing
Thanks in Advance.
2009 Jul 06 1:53 PM
Hi Anup,
Select all material documents in one internal table.
For all entries in this table select all entries from MSEG where ref. doc number equals material doc.
Then looping through one table and reading another table insert all matching entries in final internal table.
Finally u have all entries as u required in Final table, delete those entries.
Regards,
Deepak.
2009 Jul 06 4:59 PM
You want to check for reversed material document items, right? Please tell me why you are using LFBNR and not SMBLN for this check. I'm asking because there is a secondary index for SMBLN, but not for LFBNR.
Thomas
2009 Jul 07 8:00 AM
2024 Feb 06 10:58 AM