Skip to Content
Former Member
Jun 22, 2016 at 12:33 PM

invoice split scenario



The requirement is to restrict the triggering of a particular output type through IDOC when the invoice contains a particular item category lets say if the invoice contains line items only with item cat = 'ABC',the idoc should not be triggered when the invoice is created from the delivery.The code for same was written in the related requirement routine to control this(new requirement).

Now here we have the invoice split scenario where the the logic for same is written is some other different routine related to VTFL copy control.(already existing).Suppose delivery has four line items 10,20,30,40 then two invoices are made.One with items 10 and 20 and second with 30 and 40.

suppose item 10 and 20 is item cat 'ABCD' and all others are item cat 'VBGE'.

The control first goes to this routine and then the routine mentioned above.

Now to check on the invoice line items in the first routine as per the requirement call stack was made to (SAPMV60A)XVBRP[].The problem is here this contains all the four line items and hence the code fails.The first invoice that is made with item 10 and 20 contain only "ABCD' item cat so the idoc should not have triggered.But as it contains all four items in (SAPMV60A)XVBRP[] the idoc gets triggered as it sees that there is some other item cat barring 'ABCD'.Can anyone please suggest how to handle this scenario.

Any help will be appreciated .