Skip to Content

Replace and create customer partner function with LSMW

Feb 16 at 02:29 PM


avatar image

Hello Guys,

can you please help me with the following problem?

i have to update 10k customers partner function on different divisions. i must change from SR partner function to EM that i received. From what I've checked every customer have already 4 or 5 partner function present:

- some of the clients have already the EM partner (on the second or third line )and it must be changed with the new one.

-Some of them have SR(on the third or fourth line ). The SR partner must be deleted and insert the EM partner.

- And other clients that don't have neither SR or EM, and i must add the EM partner.

Is there any ABAP statement or something else that i can use to make this done?


Claudiu :)

capture.jpg (32.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Jürgen L
Feb 16 at 04:00 PM

Not easy but possible using LSMW with DEBMAS Idoc as import method.

In general needs your source file just the the customer number with sales org, and division

You need to know that you always have to submit all roles that you want to have in your customer master at the end.

In the field mapping at E1KNVPM segment you add your ABAP coding at the transfer record statement to read the data from KNVP table based on the keys given in your source file and move it corresponding to the target fields. With a if-statement you just check directly what partner role you are currently processing and based on the result you exchange the role in the target field. After this your do the TRANSFER_RECORD and continue with the next record from your read of KNVP and do the same until you are done for this customer and sales area

Show 2 Share
10 |10000 characters needed characters left characters exceeded

I’m not that good with the coding part, if you can help me with some indication on how to do that?



Petria Claudiu

Have a look into my blog

which explains the structure of LSMW and has a some coding examples for a simple requirement.

I can also give you this screenshot from customer master partner role where I create several roles (with the same partner) just based on a single information from the source file:

parv.jpg (66.5 kB)
G Lakshmipathi
Feb 16 at 03:42 PM

Have you tried via MASS ?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

it's a long process with mass because i have 27 Divisions and 60 EM partner number.