2011 Jun 17 1:09 PM
Hi,
I am using LSMW for creating new customers from the refrence customers. My problem is that I want to generate an file which will show me the customer number generated and its reference customer number. How can I do this plz help.
Thanks
2011 Jun 17 2:39 PM
it depends on your import method (LSMW step 1) if you can get it directly from LSWM as a log or not.
E.g. for recordings and batch inputs, the new number will not be known in LSMW. processing the batch input can be done from SM35, this is not really part of LSMW, just an embedded functionality.
if you use IDOC method to create new customers, then you have to have the new customer number already in the conversion step, as you cannot create customers with IDOC without having the customer number in the IDOC.
Because of this you have to include a function module NUMBER_GET_NEXT to determine an internal number already in the conversion step.
At that moment you know old an new number and can just add a write statement to display the releation ship in a log
2011 Jun 17 1:16 PM
Internal or external numbering for customer master data?
External: the relation is already known during "convert data" step, you can add a few lines of code to write that information in a list or into a file.
Internal: The new number is only known at the end of all processing. You could fill the reference number in a separate field of the customer master data, then just pull a SE16 list for the relevant table (likely KNA1 or KNB1) and fields once everything is done.
Thomas
2011 Jun 17 2:39 PM
it depends on your import method (LSMW step 1) if you can get it directly from LSWM as a log or not.
E.g. for recordings and batch inputs, the new number will not be known in LSMW. processing the batch input can be done from SM35, this is not really part of LSMW, just an embedded functionality.
if you use IDOC method to create new customers, then you have to have the new customer number already in the conversion step, as you cannot create customers with IDOC without having the customer number in the IDOC.
Because of this you have to include a function module NUMBER_GET_NEXT to determine an internal number already in the conversion step.
At that moment you know old an new number and can just add a write statement to display the releation ship in a log