08-23-2013 2:01 PM
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
08-23-2013 2:29 PM
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
08-23-2013 2:29 PM
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
08-23-2013 3:05 PM
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
08-23-2013 3:19 PM
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
08-24-2013 5:17 PM