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: 

LSMW: maintaining multiple partner function information

former_member224326
Participant
0 Kudos

Hi Experts

How to maintain multiple partner functions in LSMW program. I am loading/creating service contracts from flat file. File has 5 partners.

LSMW is using IDOC (CRMXIF_ORDER_SAVE_U06), this idoc has only one segment for maintaining partner information. How it supports for maintaining multiple partner function information

Thanks

Shaik

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

I have not worked with this particular object type, but in order to move several columns from one row in the source data to several rows in the target data, you would need to add additional "transfer_record" commands in the LSMW coding for that target segment. Before each "transfer_record" command, you need to fill the target data structure as appropriate.

Simple Example:

Flat source data:

...;PARTNER1;PARTNER2;PARTNER3;...

LSMW coding:

TARGET-ID = '01'.

TARGET-PARTNER = SOURCE-PARTNER1.

transfer_record.

TARGET-ID = '02'.

TARGET-PARTNER = SOURCE-PARTNER2.

transfer_record.

TARGET-ID = '03'.

TARGET-PARTNER = SOURCE-PARTNER3.

transfer_record.

Thomas

4 REPLIES 4

ThomasZloch
Active Contributor
0 Kudos

I have not worked with this particular object type, but in order to move several columns from one row in the source data to several rows in the target data, you would need to add additional "transfer_record" commands in the LSMW coding for that target segment. Before each "transfer_record" command, you need to fill the target data structure as appropriate.

Simple Example:

Flat source data:

...;PARTNER1;PARTNER2;PARTNER3;...

LSMW coding:

TARGET-ID = '01'.

TARGET-PARTNER = SOURCE-PARTNER1.

transfer_record.

TARGET-ID = '02'.

TARGET-PARTNER = SOURCE-PARTNER2.

transfer_record.

TARGET-ID = '03'.

TARGET-PARTNER = SOURCE-PARTNER3.

transfer_record.

Thomas

0 Kudos

where we can incorporate this "transfer_record" command, my knowledge, we can do changes in converted program, but changes will not persist. Hence what is the right place to include the suggested code.

Thanks

0 Kudos

The "__END_OF_RECORD__" block of the target structure for the partner information contains just one "transfer_record." by default. You could add the code there.

Always insert such extra coding in the step "maintain field mapping...", then it will persist. Never change the generated program directly.

If you cannot see the "__END_OF_RECORD__" block, choose "extras -> hide and display fields/code" and mark all checkboxes.

Thomas

JL23
Active Contributor
0 Kudos

I invite you to read my blog:

as it describes how to prepare the LSMW  to work  professional with it.

I guess you have not done these basic settings and do not even see where you can add coding.