cancel
Showing results for 
Search instead for 
Did you mean: 

LSMW, CREMAS04, and updating Partner Functions

don_godreau
Explorer
0 Kudos

I am involved with converting legacy data into SAP. To populate the SAP Vendor Master correctly will involve 3 passes using LSMW:

Pass #1: use IDOC CREMAS04 and populate the majority of master record fields

Pass #2: use BAPI: Business Object "BUS4001"; Method "SAVEREPLICA"; Message Type "ADRMAS"; Basic Type "ADRMAS03" to update Vendor record address data.

Pass #3: use IDOC CREMAS04 and update Head Office, Alternate Payee, and related Partner Function data.

The problem I am having is best explained using the following example:

When a vendor record (ex: Vendor Number 300004) is first created, the following 3 Partner Functions are also created automatically to reference the same vendor number: OA, VN, & PI (Ordering Address, Vendor, & Invoicing Party):

OA Ordering Address 300004 Vendor A

VN Vendor 300004 Vendor A

PI Invoicing Party 300004 Vendor A

This particular vendor is actually one of many "plants" or "warehouses" of a larger vendor, and I need to configure the record to reflect that the Purchase Orders go to the Parent Vendor (Head office) and that the Invoice comes from the same source. Therefore, I need to remove or edit the existing OA and PI partner functions so that I only end up with the same 3 Partner Functions, but the linked vendor record for partner functions OA and PI needs to be that of Head Office.

Example: if using Vendor Number 300005 "Head Office Vendor"

OA Ordering Address 300005 Vendor A

VN Vendor 300004 Vendor A

PI Invoicing Party 300005 Vendor A

What I am actually seeing when I post the IDOC is the following:

OA Ordering Address 300004 Vendor A

OA Ordering Address 300005 Vendor A

VN Vendor 300004 Vendor A

PI Invoicing Party 300004 Vendor A

PI Invoicing Party 300005 Vendor A

Can anyone shed some light on this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Don,

I am trying to work with the same data that you discussed in this thread. Can you send me some additional details on your Pass #2? I was successful in Pass #1, particularly in adding new PI vendors when necessary and deleting the existing internally created PI vendors. But I'm stuck on Pass #2 where I want to add the extended address information that you mention using the SAVEREPLICA BAPI. I can certainly use the recording method, but would like to leverage the power of the BAPI approach.

Thanks in advance!

Wes

don_godreau
Explorer
0 Kudos

For anyone else searching out a solution to this problem, I just figured out the solution on my own.

What you have to do is the following:

a) provide all of the same partner functions in your source data, referencing the corrected linked vendor.

b) also provide the message function code '005', which tells the idoc/load program to update the existing partner functions on the record.

If you fail to provide any one of the existing partner functions, the idoc will fail, even if you are not changing any of the details on that partner function record.