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
395

What is the procedure in LSMW to transfer data by using IDOC's and BAPI?

Can any one explain in brief in step-by-step procedure

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
358

hi,

Step-by-Step Guide for using BAPI in LSMW

Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.

Introduction:

This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.

Pre-requisites:

It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.

Step-by-Step Procedure:

Details of the BAPI used in this scenario:

Business Object: BUS2012

Method: CreateFromData

Details of Message Type and Basic IDoc Type:

Message Type: PORDCR

Basic IDoc Type: PORDCR02

Let’s have a look at the BAPI first, before proceeding to the LSMW:

1. Go to Transaction BAPI

2. Click on Search Button

3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”

4. Press ENTER

5. Following screen appears:

6. On the left side of the screen, Expand the “PurchaseOrder”.

7. Select “PurchaseOrder” and double-click on the same for details.

Building LSMW using BAPI:

1. Go to Transaction LSMW.

2. Enter the Project, Subproject and Object information and click on CREATE.

3. Enter the descriptions for Project, Subproject and Object.

4. Now select Settings à IDoc Inbound Processing

5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:

6. Click on “Activate IDoc Inbound Processing”.

7. Click on “Yes” when prompted for “Activate IDoc Inbound?”

8. Hit on “Back” to return to the main screen.

9. Click on Continue (F8). Following Screen appears:

10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.

11. Select the radio button “Business Object Method” and enter the following details:

Business Object: BUS2012

Method: CreateFromData

Hit ENTER

12. Save and click on BACK button. Following information message is displayed.

13. Now select step 2 “Maintain Source Structures” and click “Execute”.

14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:

Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:

Select “Lower Level” and click on Continue. Enter the Item data structure name.

Click Save and hit BACK button to go to the main screen.

15. Select step 3 “Maintain Source Fields” and hit execute.

16. Enter the fields as shown below:

17. Click SAVE and return to main screen.

18. Select step 4 “Maintain Structure Relations” and click Execute.

Select E1PORDCR and click on CREATE RelationShip. Following screen appears:

Select HEADERDATA and hit ENTER

Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.

Click Save and return to main screen.

19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:

20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).

Save and return to main screen.

21. Select the step “Assign Files” and click on Execute.

Assign the file provided to the source structure. Here the same file is provided for both the structures.

Save and return to the main screen.

22. Select the step “Read Data” and click on Execute.

Click on Execute.

Return to the main screen.

23. Select the step “Display read data” and click on execute.

Click on the structure name to get the field level values.

24. Return to main screen and now select “Convert Data”.

25. Return to the main screen and select “Display Converted data”.

26. Return to main screen and select “Start IDoc generation”.

27. Now select the step “Start IDoc Processing” on the main screen.

28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed:

for IDoc:

http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt

some sites regarding LSMW:

steps for LSMW: detail documnets: http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc

http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf

http://www.sap-img.com/sap-data-migration.htm

https://websmp207.sap-ag.de/lsmw

http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html

http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt

http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip

http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt

http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt

http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf

REFER.

3 REPLIES 3
Read only

Former Member
0 Likes
359

hi,

Step-by-Step Guide for using BAPI in LSMW

Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.

Introduction:

This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.

Pre-requisites:

It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.

Step-by-Step Procedure:

Details of the BAPI used in this scenario:

Business Object: BUS2012

Method: CreateFromData

Details of Message Type and Basic IDoc Type:

Message Type: PORDCR

Basic IDoc Type: PORDCR02

Let’s have a look at the BAPI first, before proceeding to the LSMW:

1. Go to Transaction BAPI

2. Click on Search Button

3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”

4. Press ENTER

5. Following screen appears:

6. On the left side of the screen, Expand the “PurchaseOrder”.

7. Select “PurchaseOrder” and double-click on the same for details.

Building LSMW using BAPI:

1. Go to Transaction LSMW.

2. Enter the Project, Subproject and Object information and click on CREATE.

3. Enter the descriptions for Project, Subproject and Object.

4. Now select Settings à IDoc Inbound Processing

5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:

6. Click on “Activate IDoc Inbound Processing”.

7. Click on “Yes” when prompted for “Activate IDoc Inbound?”

8. Hit on “Back” to return to the main screen.

9. Click on Continue (F8). Following Screen appears:

10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.

11. Select the radio button “Business Object Method” and enter the following details:

Business Object: BUS2012

Method: CreateFromData

Hit ENTER

12. Save and click on BACK button. Following information message is displayed.

13. Now select step 2 “Maintain Source Structures” and click “Execute”.

14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:

Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:

Select “Lower Level” and click on Continue. Enter the Item data structure name.

Click Save and hit BACK button to go to the main screen.

15. Select step 3 “Maintain Source Fields” and hit execute.

16. Enter the fields as shown below:

17. Click SAVE and return to main screen.

18. Select step 4 “Maintain Structure Relations” and click Execute.

Select E1PORDCR and click on CREATE RelationShip. Following screen appears:

Select HEADERDATA and hit ENTER

Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.

Click Save and return to main screen.

19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:

20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).

Save and return to main screen.

21. Select the step “Assign Files” and click on Execute.

Assign the file provided to the source structure. Here the same file is provided for both the structures.

Save and return to the main screen.

22. Select the step “Read Data” and click on Execute.

Click on Execute.

Return to the main screen.

23. Select the step “Display read data” and click on execute.

Click on the structure name to get the field level values.

24. Return to main screen and now select “Convert Data”.

25. Return to the main screen and select “Display Converted data”.

26. Return to main screen and select “Start IDoc generation”.

27. Now select the step “Start IDoc Processing” on the main screen.

28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed:

for IDoc:

http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt

some sites regarding LSMW:

steps for LSMW: detail documnets: http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc

http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf

http://www.sap-img.com/sap-data-migration.htm

https://websmp207.sap-ag.de/lsmw

http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html

http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt

http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip

http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt

http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt

http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf

REFER.

Read only

Former Member
0 Likes
358

Please have a look at below link.It will help you surely.

<a href="http://www.saptechnical.com/Tutorials/LSMW/BAPIinLSMW/BL1.htm">Using BAPI in LSMW</a>

Also have a lok at other links:

<a href="http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc">LSMW1</a>

<a href="http://myweb.dal.ca/hchinni/sap/lsmw_home.htm">LSMW2</a>

I hope it helps.

Best Regards,

Vibha

<b>*Please mark all the helpful answers</b>

Read only

Former Member
0 Likes
358

if you know and tell me...