lsmw faqs

31
R/3 System Accelerated Data Migration using LSMW Exercises & solutions (FI documents) Page 1 of 31 (Date: 10.06.22)

Upload: sap2006

Post on 03-Jan-2016

59 views

Category:

Documents


0 download

DESCRIPTION

LSMW FAQs

TRANSCRIPT

Page 1: LSMW FAQs

R/3 System

Accelerated Data Migration using LSMW

Exercises & solutions

(FI documents)

Note: For reasons of time, it might not be possible to do all the exercises during the course. These exercises are intended as additional examples to be dealt with during the course as required. Participants can also use them to deepen their knowledge after the course.

Page 1 of 24 (Date: 20.04.23)

Page 2: LSMW FAQs

1 Unit: Definition of the Migration Object

In the following exercise FI documents are to be migrated to the R/3-system. In the first stage, you are going to define the migration object.

1.1 Define the migration object for the migration of FI documents

1.1.1 Call LSMW with transaction code LSMW

Enter transaction code lsmw in the ok-code and press enter, the LSM Workbench initial screen appears; as LSMW is not part of standard R/3, it can not be started using the menu

1.1.2 Define the project – please use ProjectXX (XX = group number)

On the LSMW initial screen, position the cursor in field project and click on icon (create)

A dialog box appears

Enter name and description of your project

Choose Continue . The project is defined now

1.1.3 Define the subproject (for example: part 1)

On the LSMW initial screen, position the cursor in field subproject and click on icon (create) – if you defined a new project before, this step is done automatically

A dialog box appears

Enter name and description of your subproject

Choose Continue . The subproject is defined now

1.1.4 Define the migration object (for example: documents)

On the LSMW initial screen, position the cursor in field object and click on icon (create) – if you defined a new subproject before, this step is done automatically

A dialog box appears

Enter name and description of your object

Choose Continue . The object is defined now

Page 2 of 24 (Date: 20.04.23)

Page 3: LSMW FAQs

1.1.5 Maintain the attributes of the migration object – FI documents will be migrated with batch input program RFBIBL00 (object 0100, method 0000) in this exercise

Go to the LSMW initial screen

Type in project, subproject and object

Press enter, the list of steps is displayed

From the list of steps, choose Maintain attributes of migration object with double-click. A screen appears.

Change the mode from display mode to change mode

Set the radio button to ‘standard batch input / direct input’

Enter object 0100 and method 0000

Save your entries

Page 3 of 24 (Date: 20.04.23)

Page 4: LSMW FAQs

2 Unit: Definition of the Legacy System

(structures and fields)

In the second step you make the source structures known to R/3

2.1 Maintain source structures

2.1.1 Define header structure DOC_HEADER (FI document header)

From the list of steps, choose Maintain source structures. A screen appears.

Change the mode from display mode to change mode

Click on icon to define a new structure

In the popup, fill name and description of structure DO_HEADER

Choose continue . The structure is defined now

Save your entry

2.1.2 Define structure DOC_POSITION (FI document position) subordinated to structure DOC_HEADER

From the list of steps, choose Maintain source structures. A screen appears.

Change the mode from display mode to change mode

Position the cursor on structure DOC_HEADER

Click on icon (create) to define a new structure

In the first popup, set the radio button to subordinated and choose continue

In the next popup, fill name and description of structure DOC_POSITION

Choose Continue . The structure is defined now.

Save your entry .

2.2 Maintain source fields

2.2.1 Fields of DOC_HEADER (FI document header)

You can copy the fields from PROJECT00, subproject ACCOUNTING, object DOCUMENT1E, structure DOC_HEADER

Page 4 of 24 (Date: 20.04.23)

Page 5: LSMW FAQs

Fieldname Type Length Description

DOCNUMBER C 10 Document number

DATE DDMY 10 Document date

TYPE C 4 Document type

CURRENCY C 2 Document currency

BKTXT C 20 Document text

From the list of steps, choose Maintain source fields. A screen appears where the already defined source structures are displayed

Change the mode from display to change mode

Position the cursor on structure DOC_HEADER

Click on icon to copy the structure

In the popup, set the radio button to ‘Copy from other object’ and choose continue

Fill in project, subproject, object and structure and choose continue

The fields for structure DOC_HEADER are copied now

Save the entries

2.2.2 Fields of DOC_POSITION (FI document position)

You can copy the fields from PROJECT00, subproject ACCOUNTING, object DOCUMENT1E, structure DOC_POSITION

Fieldname Type Length Description

DOCNUMBER C 10 Document number

POSNUMBER C 2 Position number

POSTINGKEY C 4 Posting key

ACCOUNT C 10 Account number

AMOUNT AMT1 15 Amount in document currency

TEXT C 6 Description of position

See above

2.2.3 Field ‘DOCNUMBER’ in structure DOC_HEADER will be used as selection parameter for upload and conversion of data later on, please set the flag in the field definition

From the list of steps, choose Maintain source fields. A screen appears where the already defined source structures (and fields) are displayed

Change mode from display mode to change mode

Double-click on field ‘DOCNUMBER’ in structure DOC_HEADER

Set the flag ‘selection parameter for read/convert data’

Page 5 of 24 (Date: 20.04.23)

Page 6: LSMW FAQs

Choose continue and save the entry

2.2.4 Question to test your understanding: Does the field ‘Identifying field value’ has to be filled for one or more fields when data is stored in two files (one file per structure)?

No, the field ‘Identifying field value’ only has to be filled, when there is more than one source structure in one file; in this case, the value is needed to identify the structure of a record

2.2.5 Question to test your understanding: Which field(s) will be used for merging the files during upload?

For merging of the files, all fields with identical name are used; in the example the field ‘DOCNUMBER’

Page 6 of 24 (Date: 20.04.23)

Page 7: LSMW FAQs

3 Unit: Object Dependencies and Conversion Rules

In this stage of migration, you define the way in which the fields are to be converted.

3.1 Use the migration object overview to carry out mapping on paper.

From the menu bar on the List of Steps screen, choose Extras Object. Overview.This displays an overview of the source structures and R/3 structures. You can have look on this to see which structures and fields of the source data have to be assigned to those of the R/3 System. Mapping will be shown after processing step “maintain fieldmapping and conversion rules”

3.2 Define the object dependencies:

3.2.1 Establish the structure relationships between the source structures and the R/3 System:

The data of DOC_HEADER is needed for structures BGR00 and BBKPF;

the data of DOC_POSITION is needed for structure BBSEG

From the selection list of steps, choose Maintain structure relationships. A screen appears where the structures used in the R/3 System are displayed.

Change the mode from display mode to change mode

Position the cursor on the desired R/3 structure

Choose Create relationship (icon ). A dialog box appears where the source structures are displayed.

Position the cursor on the appropriate source structure and choose Continue . The system displays the structure relationships between both systems.

Save the entry

3.2.2 Which of the structures are mandatory?

Check for the comment in maintenance of structure relationships

BGR00, BBKPF

3.3 Establish the field relationships between the source fields and the R/3 System fields

Page 7 of 24 (Date: 20.04.23)

Page 8: LSMW FAQs

3.3.1 Use the automatic fieldmapping to create proposals for the mapping for fields with identical names

From the list of steps choose Maintain field mapping and conversion rules

A screen appears

Change the mode from display to change mode

Choose Extras -> Auto-Fieldmapping from the menu

Set the radio buttons according to your needs and choose Continue

For each proposal decide whether to accept or not accept it via the push buttons

3.3.2 Rework the rules created and check it against the mapping of 3.1; check whether all source fields are mapped.

You can use your own rules and mapping here; an example will be found at the end of

this exercise.

From the list of steps, choose Maintain field mapping and conversion rules.

A screen appears

Change the mode from display mode to change mode

Constant:

1. Position the cursor on the corresponding R/3 field

2. From the icon bar click on the button for constant

3. Fill in the value

4. Choose Continue

Move:

1. Position the cursor on the corresponding R/3 field

2. Choose Field mapping add source field (icon ), the Assign source fields dialog box appears.

3. Select the appropriate source field and choose continue

4. The system displays this field as the source field now and defaults a field-related move of data

Page 8 of 24 (Date: 20.04.23)

Page 9: LSMW FAQs

Fixed value:

1. Position the cursor on the corresponding R/3 field

2. From the icon bar click on the button for fixed value

3. A dialog box appears, where you can decide how to name the parameter; set the radio button on your selection and choose continue

4. In the next screen, maintain the rule (name, description, length, type, value)

5. Choose Continue

Prefix:

1. Position the cursor on the corresponding R/3 field

2. Choose Field mapping add source field (icon ), the Assign source fields dialog box appears.

3. Select the appropriate source field and choose continue

4. The system displays this field as the source field now and defaults a field-related move of data

5. From the icon bar click on the button ‘rule’

6. Set the radio button to prefix and choose continue

7. Enter the prefix in the dialog box

8. Choose continue

9. The system adds ‘concatenate ....’ to the rules

Translation :

1. Position the cursor on the corresponding R/3 field

2. Choose Field mapping add source field (icon ), the Assign source fields dialog box appears.

3. Select the appropriate source field and choose continue

4. The system displays this field as the source field now and defaults a field-related move of data

5. From the icon bar click on the button for translation

Page 9 of 24 (Date: 20.04.23)

Page 10: LSMW FAQs

6. A dialog box appears, where you can decide how to name the translation; set the radio button on your selection and choose continue

If you want to enter your own code, double-click on the fieldname, which starts the editor. If you want to use this function, you should perform a syntax check afterwards, Choose icon .

To check whether all fields are mapped choose Extras -> Non-assigned source fields from the menu there could be fields which do not need to be mapped!!

3.4 Display the documentation of R/3 field BBKPF-BLART

From the list of steps, choose Maintain field mapping and conversion rules

Click on icon (information) behind the fieldname to display the documentation

3.5 Display the possible values for R/3 field BBKPF-BUKRS

From the list of steps choose Maintain field mapping and conversion rules

Click on icon question mark behind the fieldname to display the possible field values

Page 10 of 24 (Date: 20.04.23)

Page 11: LSMW FAQs

4 Unit: Migration Customizing

In this stage, translation rules, fixed values and user routines are maintained

4.1 Question to test your understanding: What are the two possibilities to enter the maintenance of the reusable rules?

In step Maintain field mapping and conversion rules go into the editor for the specific R/3-field, double-click on the name of the rule (fixed value, translation, user routine)

Choose step Maintain fixed values, translations, user-defined routines from the list of steps and double-click on the name of the rule (fixed value, translation, user defined routine) there

4.2 Question to test your understanding: Which values are set for the fixed values you defined?

4.2.1 Please maintain the values

From the list of steps choose Maintain fixed values, translations, user-defined routines

Enter the maintenance of the fixed value by double-clicking on the name and look at / maintain field ‘value’

4.3 Question to test your understanding: What kind of rule is used when the translation does not find a value in the translation table? Where do you set up this?

From the list of steps choose Maintain fixed values, translations, user-defined routines

Enter the maintenance of the translation by double-clicking on the name and choose ‘control data’

4.4 Question to test your understanding: Where do you mark the ‘collection’ of values for translation?

From the list of steps choose Maintain fixed values, translations, user-defined routines

Enter the maintenance of the translation by double-clicking on the name and choose ‘control data’

The flag to be set is ‘add 1:1 translation values automatically’

Page 11 of 24 (Date: 20.04.23)

Page 12: LSMW FAQs

5 Unit: Read the legacy system data

In this stage, the source data is read

5.1 Maintain the file names and paths (step specify files)

5.1.1 Data on the application server:

DOC_HEADER: file documentheader.txt (ask your trainer for the path)

DOC_POSITION: file documentposition.txt (ask your trainer for the path)

In each file there is data for one source table

Delimiter used: tabulator

Order of fields as in source structure definition

Record end indicator (text file)

Code page 0120

From the list of steps, choose Specify files. A screen appears.

Change the mode from display mode to change mode

Position the cursor on line ‘Legacy data on the application server’

Choose icon to create a new specification

In the popup, enter file path and description and set the radio buttons according to the file attributes

Choose Continue

5.1.2 The file names for the read data and converted data are already set – please check

If you want to change them:

From the list of steps, choose Specify files.

Change the mode from display mode to change mode

Position the cursor on line ‘read data’ or ‘converted data’

Choose icon to change the name

In the popup enter the file path

Page 12 of 24 (Date: 20.04.23)

Page 13: LSMW FAQs

Choose continue

5.2 Maintain the file assignment (step file assignment)

5.2.1 DOC_HEADER documentheader.txt

5.2.2 DOC_POSITION documentposition.txt

From the list of steps choose Assign files

A screen appears where the source structures are displayed

Change the mode from display mode to change mode

Position the cursor on the source structure

Choose Create assignment (icon ). A dialog box appears where the source file names are displayed.

Position the cursor on the appropriate source file and choose Continue . The system displays the assignment

5.3 Check the files and do the upload

5.3.1 Have a look at the files: Do the field names match with the fields defined? Do the field values look o.k.? Do the upload for all records.

From the list of steps choose Assign files. Position the cursor on the file specification and use button display ( ) to display the file. The data is available in the form of two tables (format: text tab delimited). The structures are strictly hierarchical. In both structures, there is a column containing document numbers.Have a look at the field values – are there fields which are numeric, but in the data file the value is alphanumeric?

From the list of steps choose Read data

If necessary, the program for reading the source data will be regenerated

Choose icon execute on the selection screen

5.3.2 Display the read data, do a pickup on certain lines to check the field values, check the sequence of the records...

From the list of steps choose Display read data

Leave fields fromline and toline blank in the popup to display all records and choose continue

Do a pickup on one of the lines and check the values

In the file there should be:

- one header record starting with LSMW...

- one DOC_HEADER segment (document header) per FI document

Page 13 of 24 (Date: 20.04.23)

Page 14: LSMW FAQs

- one to x DOC_POSITION segments (document position) per FI document

5.3.3 Do the upload for the records of document ‘BC10000003’

From the list of steps choose Read data

If necessary, the program for reading the source data will be regenerated

Fill in the selection criteria

Choose icon execute on the selection screen

5.3.4 Display the read data again and check

From the list of steps choose Display read data

Leave fields fromline and toline blank in the popup to display all records and choose continue

Only the data for FI document BC10000003 is displayed

Page 14 of 24 (Date: 20.04.23)

Page 15: LSMW FAQs

6 Unit: Data Conversion

In this stage data conversion is done. After this, the source file for the import program exists.

6.1 Perform data conversion

From the list of steps, choose Convert data

If necessary, the program for converting the data will be regenerated

Choose icon execute on the selection screen

6.2 Display the converted data, do a pickup on certain lines to check the field values, check the sequence of the records...

From the list of steps choose Display converted data

Leave fields fromline and toline blank in the popup to display all records and choose continue

Do a pickup on one of the lines and check the values

In the file there should be:

- one BGR00 segment (batch input session header),

- one BBKPF segment (document header) per FI document

- one to x BBSEG segments (document lines) per FI document

6.3 Check which values for 1:1 translation have been added

From the list of steps choose Maintain fixed values, translations, user-defined routines

Double-click on the translation and choose 1:1 translation values

6.4 Check whether the translations are correctly, if not, redo the migration customizing and rerun the conversion

From the list of steps choose Display converted data and do a pickup

Check the field values

Page 15 of 24 (Date: 20.04.23)

Page 16: LSMW FAQs

7 Unit: Data Import

In this stage of migration, the data import into the R/3 database tables is done

7.1 Start the batch input program RFBIBL00 with following parameters:

Data transfer type B

No. of docs per commit work 1000

Extended log X

From the list of steps, choose Start Direct Input Session. A screen appears that is associated with the direct input program for FI documents already.

Fill in the parameters and choose execute

7.2 Run the import

7.2.1 Run the batch input session

Use transaction SM35 to run the batch input session

Data will be added to the R/3 database

7.2.2 Analyze the incorrect transactions

Use the functions of SM35 to analyze the batch input session

7.2.3 If there were errors, correct the field mapping, redo the conversion and the test the import again

see descriptions above

7.3 Have a look at the migrated documents via FB03.

7.4 If the session run through without problems, start RFBIBL00 with data transfer types “C” and “D”.

Data will be posted directly in this case

Page 16 of 24 (Date: 20.04.23)

Page 17: LSMW FAQs

8 Unit: IDoc / Recording / Additional Functions

Now you should make yourself familiar with the additional functions of LSMW

Create recordings

Import via IDoc

Transport of mapping and rules

8.1 Create a migration object for import of FI documents via IDoc FIDCC1 (basis type FIDCCP01) and perform the whole migration process

8.1.1 Choose IDoc FIDCC1, basis type FIDCCP01 in step “maintain object attributes”

Go to the LSMW initial screen

Type in project, subproject and object

Press enter, the list of steps is displayed

From the list of steps, choose Maintain attributes of migration object with double-click. A screen appears.

Change the mode from display mode to change mode

Set the radio button to IDoc (intermediate document)

Enter message type FIDCC1, basis type FIDCCP01

Save your entries

8.1.2 Define source structures and source fields identical to unit 2

See solution chapter 2

8.1.3 Define the structure relations necessary

E1FIKPF DOC_HEADER

E1FISEG DOCUMENTPOSITON

8.1.4 Create mapping and rules; some tips:

Valid activities can be found in table T022

Reference activities can be found in table TTYPE

Account numbers have to be transferred with leading zeros

Date should be transferred in internal ABAP format

Page 17 of 24 (Date: 20.04.23)

Page 18: LSMW FAQs

Example:Target fields

Source fields

Fieldname Fieldname Conversion method Coding/CommentE1FIKPF - FI-IDOC: Document header (complete document)BUKRS Fixed value Fixed value BUKRSBLART DOC_HEADER-TYPE TranslationBLDAT DOC_HEADER-DATE Transfer (move) Keep value in internal

formatBUDAT Constant '20001231'WWERT Constant '20001231'XBLNR DOC_HEADER-

DOCNUMBERprefix LS-

BKTXT DOC_HEADER-BKTXT

Transfer (move)

WAERS DOC_HEADER-CURRENCY

Translation

GLVOR Constant 'GLU1'AWTYP Constant 'EBKPF'AWREF DOC_HEADER-

DOCNUMBERTransfer (move)

E1FISEG - FI-IDOC: Item data for complete FI documentBUZEI DOC_POSITION-

POSNUMBERTransfer (move)

BSCHL DOC_POSITION-POSTINGKEY

Translation

WRBTR DOC_POSITION-AMOUNT

ABAP-Coding SELECT SINGLE * FROM TBSLWHERE BSCHL = E1FISEG-BSCHL.if sy-subrc = 0. if tbsl-shkzg = 'S'. E1FISEG-WRBTR = DOC_POSITION-AMOUNT. else. E1FISEG-WRBTR = DOC_POSITION-AMOUNT * ( -1 ). endif.else. write: 'Posting key does not exist; Document ', DOC_HEADER-DOCNUMBER, 'Position', DOC_POSITION- POSNUMBER.endif.

SGTXT DOC_POSITION-TEXT

Transfer (move)

HKONT DOC_POSITION-ACCOUNT

Prefix '0000'

8.1.5 Please use the source files from unit 5

From the list of steps, choose Specify files. A screen appears.

Change the mode from display mode to change mode

Position the cursor on line ‘Legacy data on the application server’

Choose icon to create a new specification

In the popup, enter file path and description and set the radio buttons according to the file attributes

Page 18 of 24 (Date: 20.04.23)

Page 19: LSMW FAQs

Choose Continue

From the list of steps choose Assign files

A screen appears where the source structures are displayed

Change the mode from display mode to change mode

Position the cursor on the source structure

Choose Create assignment (icon ). A dialog box appears where the source file names are displayed.

Position the cursor on the appropriate source file and choose Continue . The system displays the assignment

8.1.6 Read the source data

From the list of steps choose Read data

If necessary, the program for reading the source data will be regenerated

Choose icon execute on the selection screen

8.1.7 Run the import

From the list of steps, choose Convert data

If necessary, the program for converting the data will be regenerated

Choose icon execute on the selection screen

Start step Start IDoc creation – the converted data will be written to the IDoc database

Start step Start IDoc processing – IDocs from the IDoc database will be transferred for posting

Start step Create IDoc overview to check the import

8.2 Create a recording for transaction FB01 and perform the whole migration process

8.2.1 Create a recording for transaction FB01 (with 3 positions) and choose unique parameter names

On the LSMW initial screen, choose Goto Recordings.

Use icon (create) to create a recording

Enter name and description of your recording

Choose Continue and have the transaction recorded run the transaction with a data record as an example. You have to specify values for all those fields that you want to fill with your source data later on. The batch input recorder records the procedure while running the transaction.

Page 19 of 24 (Date: 20.04.23)

Page 20: LSMW FAQs

At the end of the recording you have to edit the results of transaction recording. In the last column, you have to assign names to all the fields to be included in the data migration. The LSMW uses the specified default value for all those fields that you did not assign a parameter name to.

8.2.2 Choose the recording in step “maintain attributes”

Go to the LSMW initial screen

Type in project, subproject and object

Press enter, the list of steps is displayed

From the list of steps, choose Maintain attributes of migration object with double-click. A screen appears.

Change the mode from display mode to change mode

Set the radio button to Batch Input Recording

Select the recording

Save your entries

8.2.3 As with a recording a flat source structure is needed, please define structure SOURCEDOCUMENT as follows:

Fieldname Type Length Description

DOCNUMBER C 10 Document number

DATE DDMY 10 Document date

TYPE C 4 Document type

CURRENCY C 2 Currency

BKTXT C 20 Document text

POSTINGKEY1 C 4 Posting key 1

ACCOUNT1 C 10 Account number 1

AMOUNT1 AMT1 15 Amount in document currency 1

TEXT1 C 6 Description 1

POSTINGKEY2 C 4 Posting key 2

ACCOUNT2 C 10 Account number 2

AMOUNT2 AMT1 15 Amount in document currency 2

TEXT2 C 6 Description 2

POSTINGKEY3 C 4 Posting key 3

ACCOUNT3 C 10 Account number 3

AMOUNT3 AMT1 15 Amount in document currency

TEXT3 C 6 Description 3

See solution unit 2

Page 20 of 24 (Date: 20.04.23)

Page 21: LSMW FAQs

8.2.4 Create structure relations, mapping and rules

ExampleTarget fields

Source fields

Fieldname Fieldname Conversion method Coding / commentDOCUMENTS – post document via FB01BLDAT DOCUMENT-DATE Transfer (MOVE) Date as DDMMYYYYBLART DOCUMENT-TYPE TranslationBUKRS Fixed value Fixed value

BUKRSBUDAT Constant '31122000'WAERS DOCUMENT-CURRENCY TranslationNEWBS1 DOCUMENT-

POSTINGKEY1Translation

NEWKO1 DOCUMENT-ACCOUNT1 Transfer (MOVE)WRBTR1 DOCUMENT-AMOUNT1 Transfer (MOVE)NEWBS2 DOCUMENT-

POSTINGKEY2Translation

NEWKO2 DOCUMENT-ACCOUNT2 Transfer (MOVE)WRBTR2 DOCUMENT-AMOUNT2 Transfer (MOVE)NEWBS3 DOCUMENT-

POSTINGKEY3Translation

NEWKO3 DOCUMENT-ACCOUNT3 Transfer (MOVE)WRBTR3 DOCUMENT-AMOUNT3 Transfer (MOVE)

8.2.5 Please use file document1.txt as source file; please ask your trainer for the path

From the list of steps, choose Specify files. A screen appears.

Change the mode from display mode to change mode

Position the cursor on line ‘Legacy data on the application server’

Choose icon to create a new specification

In the popup, enter file path and description and set the radio buttons according to the file attributes

Choose Continue

From the list of steps choose Assign files

A screen appears where the source structure is displayed

Change the mode from display mode to change mode

Position the cursor on the source structure

Choose Create assignment (icon ). A dialog box appears where the source file names are displayed.

Position the cursor on the appropriate source file and choose Continue . The system displays the assignment

Page 21 of 24 (Date: 20.04.23)

Page 22: LSMW FAQs

8.2.6 Read the source data

From the list of steps choose Read data

If necessary, the program for reading the source data will be regenerated

Choose icon execute on the selection screen

8.2.7 Run the import

From the list of steps, choose Convert data

If necessary, the program for converting the data will be regenerated

Choose icon execute on the selection screen

Choose Create batch input session

Choose Run batch input session

Data will be written to the database tables

8.3 Add documentation on following levels

8.3.1 Project, subproject, object

On the LSMW initial screen position the cursor accordingly and use icon (documentation)

8.3.2 Fixed value, translation, user-defined routine

Choose step Maintain fixed values, translations

Position the cursor on the name of the rule and use icon (documentation)

8.3.3 Field mapping

Choose step Maintain field mapping and conversion rules

Position the cursor on the field name and use icon (documentation

8.3.4 Display the documentation for the project

On the LSMW initial screen choose button ‘Project documentation’

8.3.5 Display the object overview

From the menu bar on the List of Steps screen, choose Extras Object. overview.

8.4 Carry out the transport of mapping and conversion rules

First, you have to export the mapping and conversion rules.

1 On the LSMW initial screen, choose Extras Export conversion rules. A dialog box appears.

Page 22 of 24 (Date: 20.04.23)

Page 23: LSMW FAQs

2 Select the project you want to export and choose continue

3 A screen appears where all reusable rules, recordings, subprojects and migration objects of the project are displayed

4 Select the objects you want to export

5 Choose export

6 Enter the name of the file in which you want to store the mapping and conversion rules. Leave the data format at ASC (= default value).

7 Choose Transfer.

Now, import the mapping and conversion rules:

1 Go back to the initial screen

2 Choose Extras Import conversion rules. A dialog box appears.

3 Enter the name of the file in which the exported mapping and conversion rules are stored. Leave the data format at ASC (= default value).

4 Choose Transfer. The file is being imported and its contents are analyzed. A list of the objects determined (reusable rules, recordings, subprojects and migration objects) is displayed for all object which already exist in the R/3 system you will see a flag (icon )

5 Select the objects to be imported.

6 Choose Import.

Page 23 of 24 (Date: 20.04.23)

Page 24: LSMW FAQs

Example for mapping and rulesTarget fields

Source fields

Field name

Field description Type Length Field name Length Conversion method Coding/comment

BBKPF – Document header for FI document (Batch-Input-Structure)BLDAT Date (Batch-Input) CHAR 008 DOC_HEADER-DATE 010 Transfer (move) Date as

DDMMYYYYBLART Document type CHAR 002 DOC_HEADER-TYPE 004 TranslationBUKRS Company code CHAR 004 Fixed value Value '0001'BUDAT Date (Batch-Input) CHAR 008 Constant Value '31122000'WAERS Currency key CUKY 005 DOC_HEADER-

CURRENCY002 Translation

XBLNR Reference document number

CHAR 016 DOC_HEADER-DOCNUMBER

010 Prefix Group number as prefix

BKTXT Document header text

CHAR 025 DOC_HEADER-BKTXT 020 Transfer (move)

BBSEG – Document line FI (Batch-Input-Structure)NEWBS Posting key for

next lineCHAR 002 DOC_POSITION-

POSTINGKEY004 Translation

WRBTR Amount in document currency (Batch-Input-Field)

CHAR 016 DOC_POSITION-AMOUNT

015 Transfer (move)

SGTXT Position text CHAR 050 DOC_POSITION-TEXT 006 Transfer (move)NEWKO Account or

matchcode for next position

CHAR 017 DOC_POSITION-ACCOUNT

010 Transfer (move)

Page 24 of 24 (Date: 20.04.23)