This tutorial explains step by step how to create a normal program (BDC, ALV Report) by using LSMW transaction code in non-development clients.
In this scenario, we will create one program for uploading text in the contract (Material Management ) by splitting TEXT into 132 characters and display the list of updated contracts.
Please follow the steps below:
Step 1: First navigate to t-code LSMW
Step 2: Now click on "Create Entry" and Create an LSMW Project
Click on "Continue".
Step 3: Create 'SubProject'.
Click on "Continue"
Step 4: Create Object.
Click on Continue
Click on Continue
Step 5: Select the first step "Maintain Object Attributes" and click on "Execute".
Now please select the recording method.
Now we have to enter the Recording NAME and Descriptions.
Click the Continue button.
Enter the T-code SE16.
Now click the Continue Button.
And then press the Back Button.
Now Save the Recording and press back Button.
Now press back button.
Now come back. after saving the change
Step 6: Select the step "Maintain Source Structure " and click on " Execute".
Save and Go back.
Step 7: Select “Maintain Source Fields” and Execute
Put your cursor on the structure name and click on
And declare the one Dummy (Example) field.
Save and come back.
Step 8: Now select “Maintain Structure Relations” and Execute:
Save and come back.
Step 9: Now you have to maintain field mappings and conversion rules;
Now please check for Syntax and then save it.
After saving please come back.
Step 10: Now we have to declare all the required events along with the routines.
Declare all the required perform statements in these block.
We do not need to check it.
Just save and come back.
Define the code for above perform statements.
Save and come back
Save and come back.
Step 11: Maintain Fixed Values, Translations, User -Defined Routines
Nothing should be done in this step. (We will go for this step rarely).
Step 12: Specify files:
Here to specify files take file from legacy data ( on the pc front end ) .
Create Text file with field name DUMMY1. and specify the file.
Click on legacy data and click Create button. And browse for your flat file on your pc . (create flat file for your structure in second step.).
And press continue.
Now save and come back.
Step 13: Assign Files
Step 14: Read Data
Step 15: Convert Data
Browse the file which u want to upload and Press F8.
The above file is tab delimiter and the first field is used to identify SAP contract and remaining fields are long text fields.
OUTPUT
Goto ME33K t-code and check the contract.