02-07-2011 7:22 PM
Hi All,
I have a requirement to remove certain PO line item idoc segments based on some conditions, before the idoc is created.
I am writing the code inside IDOC_OUTPUT_ORDCHG function module (using enhancement spot).
The problem here is that I am unable to get the segment hierarchy (PO line item has a lot of idoc segments linked to each other). (The hierarchy fields PSGNUM and SEGNUM in the internal table INT_EDIDD are not filled.) I need to remove all segments related to a PO line item. For example, if PO line item 2 is not required, I need to remove all the segments related to it.
I know the PO line item detail to be removed from the idoc, but unable to find all the related line item segments, as some of them don't even have PO line item as its field.
Please suggest how to solve this issue.
Thanks,
Arun Mohan
02-10-2011 6:58 PM
User Exit EXIT_SAPLEINM_001 is called just before routine fuellen_idoc_inttab (which fills up the IDOC segments) in IDOC_OUTPUT_ORDCHG. Read the XEKPO table and delete the entries you do not want to send out. That way, the IDOC detail segments for those materials will not be processed.
02-08-2011 7:20 AM
02-09-2011 7:13 AM
U can try if Segment Reduction Works BD53 or segment filtering Bd56
02-10-2011 12:32 PM
You can use Idoc reduction method or try creating filter at distribution model level.
02-10-2011 1:53 PM
Hi,
I would remove the items before the Idoc is created. Look for the CUSTOMER-FUNCTION calls in IDOC_OUTPUT_ORDCHG and make a CMOD enhancement of MM06E001. It should be EXIT_SAPLEINM_011 where you can reduce the EKPO table.
/Michael
02-10-2011 6:58 PM
User Exit EXIT_SAPLEINM_001 is called just before routine fuellen_idoc_inttab (which fills up the IDOC segments) in IDOC_OUTPUT_ORDCHG. Read the XEKPO table and delete the entries you do not want to send out. That way, the IDOC detail segments for those materials will not be processed.