Uploading long text for Customer Master through LSMW
Requirement: Loading the long text for Customer Master data in SAP.
The flat file in our example contains the long text for General Data tab in Customer Master Data. The same LSMW can be used to upload the texts in Company Code Data and also in the Sales Area Data tabs. The header record contains the Customer information (Table name, Customer Number and Text ID) and is identified by the starting character ‘H’. The item records contain the long text to be uploaded for the Customer and the starting character ‘I’ identifies the record. See the screenshot below:
Enter the T code LSMW and press Enter.
Once executed we will reach the below screen and we need to follow the below steps:
- 1. Maintain Object Attributes
On the field Object Enter “2000” (SAP script Texts) and Method as “0000” or you can select from the drop down menu.
After selecting the
Object : 2000
Method : 0000 (Defaults to 0000 automatically), save the changes and press back icon or F3.
You will reach the below screen with radio button selected on “Maintain Source Structures”, now click on execute.
- 2. Maintain Source Structures
Create two structures one for Header and one for Item. The item structure will be at lower level for the Header and save. Press back and select the radio button “Maintain Source Fields”.
Press back button and select the radio button “Maintain Source Fields” and click on Execute.
- 3. Maintain Source Fields
Define the fields as per the flat file structure. In both the structures the first field must be identifier. Create the identifier field of character 1 and specify the identifying field content ‘H’ for header structure and ‘I’ for item stricture as shown below.
Item Level Structure.
Here the Field LINE of item structure is char 132, so each text line from the input file must be less than or equal to the length 132. Save the changes and press back button. Now we have to maintain the Structure Relations.
Select the radio button “Maintain Structure Relations” and click on execute
- 4. Maintain Structure Relations
Assign the header source structures to all the Header target structure and Item source structure to all Item target structure.
Select the header texts and click on the icon “Relationships” and select the header structure as shown below.
Your screen should look like the below screen shot after assigning all the header and Item structures.
Save the changes and go back by pressing F3 or the Back icon.
Now select the radio button “ Maintain Field Mapping and Conversion Rules ” and press execute.
- 5. Maintain Field Mapping and Conversion Rules
Map the source fields to the target fields
Save the changes and press the back button.
Now we need to specify the files. Select the radio button “Specify Files” and press execute.
- 6. Specify Files
Place the cursor on Legacy data On the PC Front end and click create button
Enter the input file details
Select the delimiter ‘Tabulator’, if the fields in the input file are separated by tab. Save the changes and press back button.
- 7. Assign Files
Select the Assign files and click on execute
Now we need Assign the input file to both the structures, Select the header structure and click on Assignment icon and also select the Item structure and click on Assignment icon . See the below screen shot which should look like this after assigning the files both at header and item level.
Save the changes and press the back button.
- 8. Read Data
Execute the Read data.
Once again execute to show the read data as below.
Press back twice to reach the below screen and now we need to execute the “Display Read Data”
- 9. Display Read Data
Execute the Display Read Data and click continue on the Popup.
The system displays the read data from the flat file as shown in the below screen shot.
Press back to reach the main screen.
- 10. Convert Data – Execute the convert data
Now execute the Convert data step. Once again click on execute, So that the system shows the converted data as in the below screenshot.
Press the back button twice to reach the LSMW menu in order to execute the next step i.e., Display Converted Data.
- 11. Display Converted Data.
Press execute on the Display Converted Data and on the popup select continue,
So, that the system displays the converted data as below.
Press back to reach the LSMW menu and execute the last step ” Start Direct Input Program”
- 12. Start Direct Input Program
Click on Execute, once again click on execute
Result: The Long text will be updated for the selected customers.
Transaction XD03 to view the Customer text uploaded through LSMW.
Double click on the text line to display the uploaded text in the editor mode.
End of LSMW for Customer Master Texts.