Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

LSMW ...

Former Member
0 Likes
1,129

Gurus...

Can you give me step by step procedure for

LSMW with all four types of LSMW?

Cheers

KK

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,087

hi kartik,

Hi,

Refer the following link.

http://www.sapmaterial.com/lsmw.html

1. Maintain Attributes:

Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.

2. Maintain Source structure:

Create a structure name

3. Maintain Source field:

In this you have to create a structure same as taht of the input file

eg: name

age

sex

4. Maintain structure relations:

This will link the structure to the input file.

5. Maintain field mapping and conversion rules:

Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.

6. Maintain field mapping and conversion rules:

If you have any fixed values you can define here.

7. Specify files:

Specify the input file path and type.

8. Assign files:

This will assign ur file to the Input file

9. Read Data:

This will read ur data from teh file.

10. Dispaly Read Data:

You can see the uploaded data

11. Convert Data

This will convert the data to the corresponding format for processing

12. Display Converted data:

13. Create batch input session

Here this will create a batch input session for processing

14. Run Batch Input session:

By clicking on the session and process the same you can do teh needful.

Hope this helps you.

Gurus...

Can you give me step by step procedure for

LSMW with all four types of LSMW?

Cheers

KK

7 REPLIES 7
Read only

Former Member
0 Likes
1,088

hi kartik,

Hi,

Refer the following link.

http://www.sapmaterial.com/lsmw.html

1. Maintain Attributes:

Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.

2. Maintain Source structure:

Create a structure name

3. Maintain Source field:

In this you have to create a structure same as taht of the input file

eg: name

age

sex

4. Maintain structure relations:

This will link the structure to the input file.

5. Maintain field mapping and conversion rules:

Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.

6. Maintain field mapping and conversion rules:

If you have any fixed values you can define here.

7. Specify files:

Specify the input file path and type.

8. Assign files:

This will assign ur file to the Input file

9. Read Data:

This will read ur data from teh file.

10. Dispaly Read Data:

You can see the uploaded data

11. Convert Data

This will convert the data to the corresponding format for processing

12. Display Converted data:

13. Create batch input session

Here this will create a batch input session for processing

14. Run Batch Input session:

By clicking on the session and process the same you can do teh needful.

Hope this helps you.

Read only

Former Member
0 Likes
1,087

Hi Kartik,

Go through following links.

Direct Input

[http://saptechnical.com/Tutorials/LSMW/VendorDirectInput/page1.htm]

Recording

[http://saptechnical.com/Tutorials/LSMW/VendorRecording/page1.htm]

IDoc Method

[http://saptechnical.com/Tutorials/LSMW/IDocMethod/IDocMethod1.htm]

BAPI

[http://saptechnical.com/Tutorials/LSMW/MMBAPI/Page1.htm]

Hope you find this as helpful.

Regards,

Madhura

Edited by: Madhura Nadgauda on Feb 19, 2008 12:18 PM

Read only

Former Member
0 Likes
1,087

TRANSACTION RECORDING METHOD

follow the following step:-

This tutorials details about uploading vendor master data using recording method.

Go to transaction LSMW.

Click on “Create Entry”.

Create Project:

Click on “Continue”.

Create ‘Subproject’:

Click on “Continue” and create Object.

Click on Continue.

Click on Continue again.

Select the first step “Maintain Object Attributes” and click on “Execute”.

Select the check box “Batch input Recording” and click on :

Create a recording for the transaction XK01 with the required fields. In this example, only mandatory fields are used.

Save the recording.

<Once the recording is done, please remember to mention the field name for each field by double-clicking on it and removing the default value that appears in the recording (the default values shown are the values you entered during your recording). See the screenshot below>

Come back to the earlier screen and mention the name of the recording.

SAVE and click on “Back”.

Select the check box “Maintain Source Structures” and click on Execute:

Select the “Source Structures” and click on “Create”:

Click on “Continue”.

SAVE and click on “Back”.

Select the radio button “Maintain Source Fields” and click on Execute

Select the Source structure and click on “Create Field”

In our scenario for creating vendor master records, we would define only the mandatory fields.

Save and click on Back.

Select “Maintain Structure Relations” and click on “Execute”.

Save and go back to the previous screen

Now select ‘Maintain Field Mapping and Conversion Rules’ and click Execute

Now we need to assign the relationship between source structure (of the input file) and the target structure (from the recording).

Select the field from the list and click on “assign source field”:

Save and go back to the previous screen.

Select the option “Specify files” and click on Execute.

Select the option “Legacy Data” (on the PC) and click on Add entry.

Provide the location of the test data file and other details as shown below:

Click on Continue, next SAVE.

If you get any error like this:

Then click on Converted data file, and reduce the file name.

Now select the option “Assign files” and click on Execute:

Since we have only one file to upload, the file is already assigned to the structure.

Save and go back to the previous screen.

Now click on Read data and select Execute button

Click on Execute

The file is successfully read.

To see the data that is read, use “Display read data” on the main screen.

Double-click on the record.

Now come back to the main screen and select “Convert data”

To check, if the data has successfully converted from source structure to target structure, select “Display Converted data”

Double-click on the record.

Now create batch input session and the run the same.

Now run the session to upload the data.

Read only

Former Member
0 Likes
1,087

Uploading Material Master data using BAPI method in LSMW

Step1: Use the transaction code LSMW to upload the data using Legacy System Migration Work Bench. Here in this scenario, uploading Material Master Data using BAPI.

Provide descriptions for Project, Subproject and Object respectively. And press execution button.

Step2: Select Settings -> IDOC Inbound Processing

Step3: “IDOC Inbound Processing” screen appears. Enter the required details as shown below:

Step4: Define port and partner profile.

Now come back to initial screen and click execute button.

Step5: The following screen appears.

Step6: Select step1 ‘Maintain Object Attributes’ and Execute.

Provide business object details

Provide Method

Save and click BACK button.

Step7: Now select step2 ‘Maintain Source Structure’ and click execute button.

Step8: Place the cursor on Source structure and click create. Provide name and description

Save and click BACK button.

Step9: Select step3 ‘Maintain Source Fields’ and click execute button.

Press create button and provide details for Field Name, Field Description and Field Length.

Step10: Enter all required fields as shown below.

Save and back to main screen.

Step 11: Select step4 ‘’Maintain Source Relations’.

Save and click BACK button.

Step12: Select step5 ‘Maintain Field Mapping and Conversion Rules’.

Step13: Select step7 ‘Specify Files’. Create a test file with the same structure as defined earlier.

Save and return to main screen.

Step14: Select step8 ‘Assign Files’ and click execute.

Assign File Structure to Source Structure.

Save and return to main screen.

Step15: Select step9 ‘Read Data’ and click execute.

Click Execute button.

Click BACK button and return to main screen.

Step16: Select step10 ‘Display Read Data’ and execute.

Step17: Select step11 ‘Convert Data’ and execute.

Click execution button.

Step18: Select step12 ‘Display Converted Data’ and execute.

Step19: Select step13 ‘3 Start IDoc Generation’.

Click the execution button.

Step20: Select step 14 ‘Start IDoc Processing’.

And click execute button.

Step21: Select the step 15 ‘Create IDoc Overview’.

Check the data in the data records.

IF USEFUL REWARDS POINTS

Read only

Former Member
0 Likes
1,087

Step-By-Step Guide for LSMW using ALE/IDOC Method

Part One: To create IDOC structure

Step One: Run transaction WE31.Create Segment with name ‘ZEMP_SEG’.

Step Two: Input the fields for the segment structure, which would be required in LSMW for mapping purpose.

Step Three: Now, Go to Edit -> Set Release, so that you can use this segment in the R/3 system further.

Step Four: Run transaction ‘we30’ and enter IDOC structure name we want to create.

Here, IDOC structure name is ‘ZEMP_IDC’.

Step Five:

(A)Add segment created earlier to this IDOC type ‘ZEMP_IDC’.

The maximum and minimum repetitions can be from 000000000000 to 99999999999.

Choose any number rang as per requirement.

Now, Go back to earlier page and Click Edit-> Set Release.

(B)Create new Message type in transaction ‘WE81’.

(C) Attach message type and IDOC type with the help of transaction ‘WE82’.

Step Six: Go to transaction ‘SALE’. Click as marked in red color.

Now add two logical system names for sender and receiver ex. IDC64 and IDC87.

Step Seven: Now assign clients to the logical systems created.

Select the client of your current system as per decision to make that system sender or receiver.

After clicking on to Goto->Details , you come to following screen. Input receiver system ‘IDC87’ to client 800.

Here in our LSMW using IDOC method, no need to assign client to sender as we are doing Inbound IDOC Processing (i.e. Receiver side).

Step Eight: Run transaction ‘WE21’ to create File port. Give directory name as the location of your file to be read. Give dummy name for ‘Outbound file’ field. Step Nine: Run ‘SM59’ transaction to create RFC connection. Please make sure here connection type is ‘T’ for TCP/IP .

Step Ten: Run transaction ‘WE20’ to create partner profile for partner of receiver system (IDC87) i.e. sender system (IDC64).

Step Eleven: Create process code using ‘WE42’.

After saving this data, you go screen as below to attach function module to the process code. The process code is the representation of the function module for inbound idoc processing.

Step Twelve: Now you can use this process code in the inbound parameters of the partner’s profile.

Part Two:

Following are the steps to be performed on LSMW side.

Step One:

Enter the project, sub-project and Object name for our scenario.

Step Two:

Click the first radio button ‘Maintain Object Attributes’ , execute and enter the message name and IDOC name into the screen as follows.

Step Three:

Click radio button ‘Maintain Source Structures’ and execute to create new source structure as follows.

Step Four:

Click radio button ‘Maintain Source Fields’ and execute to enter the fields in the source structure. Here these fields are same as the fields in segment of the IDOC created earlier.

Step Five:

Click radio button ‘Maintain Structure Relations’ and execute to create relationship between source and target structure. Here target structure is Message type ‘ZEMP_MSG’.

Step Six:

Click radio button ‘Maintain Field Mapping and Conversion Rules’ and execute to create field mapping and a conversion rules between source structure and target structure.

Step Seven:

Click radio button ‘Maintain Fixed Values, Translations, User-Defined Routines’ and execute to assign fixed values to any field, to call user defined routines etc. These activities are not required in our scenario.

Step Eight:

Click radio button ‘Specify Files’ and execute to assign file on the local workstation to the LSMW to read. The file has contents as shown below.

And now we specify the location of file here.

Step Nine:

Click radio button ‘Specify Files’ and execute to specify file to source structure as follows.

Step Ten:

Click radio button ‘Read Data’ and execute to read file from local workstation as per path specified.

Step Eleven:

Click radio button ‘Display Read Data’ and execute to display data just read.

Step Twelve:

Click radio button ‘Convert Data’ and execute to create a file with extension ‘.conv ’.

Step Thirteen:

Click radio button ‘Display Converted Data’ and execute to display the converted data.

Step Fourteen:

Click radio button ‘Start IDoc Generation’ and execute to generate the IDOC from the data provided and structure mapping done earlier in this document. For this purpose, we cam use the converted file in step twelve. After successful generation of IDOC, below shown message is displayed.

Step Fifteen:

Click radio button ‘Start IDoc Processing’ and execute to process the IDOC by inputting necessary selection parameters.

Step Sixteen:

Click radio button ‘Create IDoc Overview’ and execute to show status and details of IDOC generated. This screen is similar to ‘WE02’ or ‘WE05’ transaction.

Here , as you can see , the status of IDOC is OK (Green color Bubble) and hence confirms successful processing of IDOC.

Step Seventeen:

Click radio button ‘Start IDoc Follow-Up’ and execute to reprocess the IDOC if not posted or generated properly initially.

IF USEFUL,REWARDS POINTS

regards

nirdesh panwar

Read only

Former Member
0 Likes
1,087

Uploading Vendor Master data using Direct Input Method

Go to transaction LSMW.

Click on “Create Entry”.

Create Project:

Click on “Continue”.

Create ‘Subproject’:

Click on “Continue” and create Object.

Click on Continue.

Click on Continue again.

1. Select the first step “Maintain Object Attributes” and click on “Execute”.

Here mention object and method in standard batch/Direct input radio button and press enter ,it will give standard program name . SAVE and go back.

Save and go back .

2. Select the step “Maintain Source Structures ” and click on “Execute”.

Save and Go back.

3. Select “Maintain Source Fields” and Execute

Place cursor on structure name and click on

Here mention the what ever fields we require and flat file should be in the same structure .

Save and come back.

Save and come back.

4 . Select “Maintain Structure Relations” and Execute :

Here to maintain structure relations click on BGR00 and ‘click relation ship’ as shown in above screen shot it will assigned to structure. Repeat this for all required relations in that screen.

5: Maintain field mappings and conversion rules ;

Nothing should be done in this step .(we will go for this step rarely).

6. specify files :

Here to specify files take file from legacy data ( on the pc front end ) .

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.). here in imported data it will take only 45 characters .

7 : Assign Files

To assign files click cursor on structure and click assignment .it will assign to file .

8: Read Data

9: Display read data

10: Convert Data

11. Display converted data.

12. create the batch input session to create session.

13. Run the batch input session to create session.

IF USEFUL, REWARDS POINTS

regards

nirdesh panwar