Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

invoice split scenario

Former Member
0 Kudos

Hi,

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 .

Thanks,

Ruhi

1 REPLY 1

Juwin
Active Contributor
0 Kudos

Couldn't understand - The problem is here (SAPMV60A)XVBRP[] contains all the four line items -

If invoice contains only 2 lines, XVBRP should be containing only 2 lines.

Thanks

Juwin