Skip to Content
avatar image
Former Member

LSMW to create customer in multiple sales area


I want to create customer in different sales area with one file using lsmw. I have created a lsmw to create

customer in one sales are.

Structure of my file

CC1 - SO1-GD

CC2 - SO2-GD

Is there a way to create these 2 lines for one customer ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 10, 2015 at 11:18 PM

    you did not really tell much: "I have created a lsmw"  - this is as good as saying I build a house, it is not clear whether it is a block house, a bungalow  or a skyscraper.

    LSMW has 4 different import methods, and the most logical would be IDOC or batch input as these are flexible SAP given import methods. Which one did you use?

    Further it is not clear whether the customer already exists and only needs to be extended, or if the customer has to be created with the first record and extended to another sales org with the second record.

    It is as well not clear if one line in your source has all info or if GD is one line, CC another and SO again another line.

    Add comment
    10|10000 characters needed characters exceeded

    • You need to get the general data fields to the left.

      You either do this already in the source file and then define your fields in step 3 of LSMW in the new sequence of the source file.

      Or, you keep the source as is, but define the fields in step 3 of LSMW  in the sequence of GD - CC - SO . You make sure that the column header of the source file is identical to the field names in your step 3.  In step 7 specify files you need to remove the flag for "Field order matches source file definition". SAP will then use the names to find the fields when you execute step 9 Read data.

      this re-order of information will help you avoid too much ABAP.

      Still you need a small ABAP command in step 5 field mapping.

      You need to replace the default command "transfer_record" with "on_change_transfer_record".

      I have an example in my blog LSMW Long text load by Direct Input method

      This command takes care that the General data is only written when the GD  in source changes, which means after the 3rd line.