Skip to Content
0
Feb 04, 2011 at 07:49 PM

Vendor Master Creation through IDoc with Multiple Company Codes

401 Views

I am trying to create vendor masters sent from a 3rd party into SAP using CREMAS05 IDoc. I have the requirement that the vendor should be created in each of 3 company codes and the vendor number is internally assigned in SAP.

I create my IDoc with the general data E1LFA1M and multiple E1LFB1M & E1LFB5M Children. When I post the IDoc using IDOC_INPUT_CREMAS which uses Call Transaction, the vendor gets created for the first company code, but the IDoc errors on the vendor extension XK01 for the next company code with the error: "Fill all required fields SAPMF02K 0111 ADDR1_DATA-NAME1".

In debugging through this, it appears that the vendor number that gets created in the first XK01 transaction does not get passed into the data for the second XK01 call and SAP tries to create a new vendor instead of extending the newly created one.

If I force the value in during debug after the initial call transaction into the variable h_lifnr, it works fine (Vendor created with multiple company codes.

Any help would be greatly appreciated.

-Larry