Showing posts with label SAP LSMW. Show all posts
Showing posts with label SAP LSMW. Show all posts

SAP LSMW Concept

CONCEPT OF SAP LSMW

LSMW read documents and convert the contents to the target structure and the corresponding fields.
Then the data from the target structure create a SAP format of the document, this document can be used to transmit data.
SAP did not provide any standards conversion.

Steps:
- Read file (local or server, and we need to accept pre-defined data source structure).

- Save the contents of the documents as LSMW documents.

- Define the relationship between the structures and fields distribution .
(as defined in the source and target structure mapping).

- Define source fields and the value of the target fields conversion rule
(LSMW file how to change the definition of target structure)

The above structure and the conversion rule defined are executable in ABAP procedures and generating SAP format documents in the transfer process or LSMW in implementation.

LSMW support of the transfer methods:
- Standard transfer process (batch input, call transaction, direct input).
- IDocs
- BAPI
- Recording SHDB and generate batch input.

STEPS :
1. Go to LSMW
Maintain object attribution

2. Maintaining the original format
- Maintain source Structure
- Maintain source fields

3. Maintaining the original format and objectives of the mapping relationship between format
4. Maintain structure relations.
5. Maintain field mapping and conversion rules.
6. Maintain fixed values, translations, user-defined routines

Achieve the original data -> objective data format
7. Specify files
8. Assign files
9. Read data
10. Display read data
11. Convert data
12. Display converted data

Upload the target format data to SAP
13. Create batch input session
14. Run batch input session

SAP LSMW Data migration for Create Vendor (XK01)

SAP LSMW for data migration for XK01 transaction.
You can create lsmw for data migration as follows (using session method):
Example for xk01 (create vendor)

Initially there will be 20 steps but after processing 1 step it will reduced to 14 for session method.
1. TCode : LSMW.

2. Enter Project name, sub project name and object name.
Execute.

3. Maintain object attributes.
Execute
select Batch Input recording
goto->Recording overview
create
recording name.
enter transaction code.
start recording
do recording as per ur choice.
save + back.
enter recording name in lsmw screen.
save + back


Now there will be 14 steps.
2. MAINTAIN SOURCE STRUCTURES.
Here you have to enter the name of internal table.
display change
create
save + back

3. MAINTAIN SOURCE FIELDS.
display change
select structure
source_fields->copy fields.
a dialogue window will come .
select -> from data file
apply source fields
enter No. of fields
length of fields
attach file
save + back

4. MAINTAIN STRUCTURE RELATIONS
display change
save + back

5. MAINTAN FIELD MAPPING & CONVERSION RULE
display change
click on source field, select exact field from structue and enter
repeat these steps for all fields.
save+back

6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED
execute
save + back

7. SPECIFY FILES.
display change
click on legacy data
attah flat file
give description
select tabulatore
enter
save + back

8. ASSIGN FILE
execute
display change
save + back

9. IMPORT DATA.
execute
display change
save + back

10. DISPLAY IMPORTED DATA
enter ok, it willl show records only.
back

11. CONVERT DATA
execute
display change
save + back

12. DISPLAY CONVERTED DATA
execute
display change
save + back

13. CREATE BATCH INPUT SESSION
tick keep batch input folder
F8
back

14. RUN BATCH INPUT SESSION.
sm35 will come
Object name will be shown here
select object & process