Intercompany billing with several supplying company codes
I would like to set up the scenario below but I am blocked and would like to know if someone could help me.
I have 3 company codes CC1, CC2, CC3.
Company codes CC1 & CC2 have respectively plants PL1 and PL2, sharing the same shipping point SP1, and sales organizations SO1 and SO2.
Storage locations SL1 of PL1 and SL2 of PL2 are sharing the same warehouse number WN1.
Company code CC3 receives a sales order from a customer for product A1 (belonging to CC1) and for product A2 (belonging to CC2).
I would like to set-up an intercompany process :
- with only 1 delivery (to be able to put the two products A1 and A2 in the same physical box),
- with only 1 invoice to the customer of CC3,
- with 1 intercompany invoice from CC1 to CC3 for product A1 and 1 intercompany invoice from CC2 to CC3 to product A2.
I have done all the customizing related to the intercompany process.
First I have a problem creating only one delivery as I do not have the same "Sales organization for intercompany billing" (VKOIV) for the different products.
So I get the message VL033 "Item 00020 : delivery split due to conflicting header data (VKOIV: SO1 <-> SO2)".
It seems that it is not possible to change this header field by a copy control between sales order and delivery.
I put this field manually to ' ' (blank) when debugging : my delivery was "correctly" created and I was able to create my transfer order and to post the goods issue. Product A1 was correctly issued from company code CC1 and product A2 was correctly issued from company code CC2.
I was also able to create the invoice for the customer of company code CC3.
But, when I am trying to create the intercompany billing (invoice type IV) with transaction code VF01, I get the error message VF 0009 : "Sales organization is not defined". Of course, because I have deleted it ... :-)
What I would like is that the system splits the intercompany invoice in two IV invoices.
Is the creation of only one delivery and two intercompany invoices possible, certainly not thanks to pure customizing but at least thanks to a "clean" ABAP code according to you ?
Thanks a lot in advance for your help.