Wednesday, November 3, 2010

Migration of Bank data using BAPI in LSMW

This tutorial illustrates the usage of BAPI method in the LSMW, a tool provided by SAP for migrating the data from Legacy Systems into SAP.

This example demonstrates the migration of BANK data into SAP In ECC6.0.

The various entities used for this example:

1. Business Object: BUS10111

2. Method: Create

3. Message Type: BANK_CREATE

4. Basic Type: BANK_CREATE_01

5. Process code: BAPI

1.Execute T-Code BAPI.

2. Go to transaction LSMW.

Provide Project, subproject, object.

From menu bar->settings->IDOC inbound processing.

Then it displays the following screen.

Click on Maintain port provide select port type FILE and click on create

Provide Port name as FILE_PORT.

Description Port for Transferring Data

Function module EDI_PATH_CREATE_MESTYP_DOCNUM

Click on save.

Then it displays our created FILE_PORT as Below.

Back and provide Port name as we created FILE_PORT.

And partner type as LS.

NOTE: Before Providing Partner no go to transaction SALE and do the following settings.

Enter Provide Logical system name as we created.

And save.

NOTE END.

Click on Maintain Partner Numbers.

Select partner type as LS and click on create

Provide Partner no as LSMW_BAPI.

Partn Type LS.

Click on SAVE.

PROVIDE Partner number as LSMW_BAPI.

Click on Activate Inbound IDOC Processing.

Click on YES.

Now go back to the main screen.

Then it Displays the following screen.

NOTE: Then it shows a screen With 17 Steps, which are to be executed sequentially as below.

STEP1.

Maintain Object Attributes.

And execute (ctrl+F8).

Select Business Object Method (BAPI) , Provide Business Object and Method

And press Enter.

NOTE: Make sure that Message type and Basic type Comes Automatically.

Save.

BACK.

STEP2.

Maintain Source structures and Execute.

Select Source Structure and click on create Provide source structure name and Description.

Enter and Save.

Back.

STEP3.

Maintain Source Fields

Select Source Structure and click on Table Maintenance as shown below.

Provide Fieldnames, type, length, and description.

Save and go back to the previous screen.

STEP4.

Maintain Structure Relations.

Create Relationships as shown below.

STEP5.

Maintain Field mapping and conversion Rules.

Execute.


Select BANK_CTRY, BANK_KEY,BANK_NAME and click on source field.

Now Double click on corresponding fields from the above popup window.

Then the field mapping will be as shown below.

Save and Back.

STEP6.

Leave the step 6.

STEP7.

Specify Files.

Click on Execute

Double click on Legacy Data.

Select file and Provide Name.

Save.

STEP8.

Assign Files.

Execute and Save.

STEP9.

Read Data.

Execute.

10.Display Read Data.

Execute.

Enter.

STEP11.

Convert Data.

EXECUTE.

Execute.

Go back to the previous screen.

STEP 12.

Display Convert Data.

EXECUTE.

Enter.

Back.

STEP13.

Start IDOC Generation.

Execute.

And Execute.

STEP14.

Start IDOC Processing.

Execute.

Execute.

NOTE: Observe that Data was Posted into Database successfully.

STEP15.

Create IDOC overview.

Execute.

Execute.

Double click on IDOC Number.

Double click on second IDOC number

Back and Back.

STEP 16.

Start IDOC follow-up.

Test the posted data in the database table.

Go to SE11

Check the Database table BNKA.



No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites