Professional Documents
Culture Documents
doc
Press Enter
Amount: 12
Press Enter
Amount: 12
Press Save
LSMW Set up
Start the LSMW (Transaction LSMW)
Create Project LSMW-xx - Description LSMW Demo
Create SubProject SUBxx - Description First Subproject
Create Object CTxx - Description FI Documents – Call Transaction
GLITEMS
Name Description Length Type Value
ID Record Type 1 C P
KEY Posting Key 4 C
ACCOUNT G/L Account Number 10 C
AMOUNT Amount in Document Currency 15 AMT1
TEXT Item Text 6 C
MAPPING
There are a large number of fields in the object definition! To save time, the following is the
list of fields for which we need data.
DOCUMENT HEADER
Field Meaning Length
BLART Document Type 2
BUKRS Company Code 4
BLDAT Document Date 8
WAERS Currency Code 5
BKTXT Document Text 25
DOCUMENT ITEM
Field Meaning Length
NEWBS Posting Key 2
WRBTR Amount 16
NEWKO G/L Account 17
SGTXT Document Text 50
QUESTIONS
What values did we use in the manual data of the transaction for these fields?
Which source fields map to which target fields?
Look at the source data – which fields will need translating?
What field(s) are not supplied in the source?
397556327.doc
Structure Relations
Assign BGR00 and BBKPF to the Document Header
Assign BBSEG to the Document Item
FIELD MAPPING
TARGET TARGET SOURCE SOURCE FIELD REMARKS
STRUCTURE FIELD STRUCTURE
BBKPF BLDAT GLHEADER DATE Assign the field as DDMMYYYY
BBKPF BLART GLHEADER TYPE Translation needed
BBKPF BUKRS Constant Value ‘UKCC’
BBKPF WAERS GLHEADER CUR Translation needed
BBKPF BKTXT GLHEADER REF
Look at the convert file – can you find any of the errors?
ERROR HANDLING
There are at least 3 errors.
A missing currency code in the translation table.
A document with financial postings out of balance.
JPY data being incorrectly formatted.
These will all be fixed by setting up ABAP code in the Mapping Step
Make the Processing Points and Global Data Definitions visible by choosing the
menu option Extras > Display Variant and pick the correct options.
CURRENCY FORMATTING
Look at the code created to fill BBSEG-WRBTR. It will not work for currency codes
such as JPY which have no decimal places.
Can you think of a way to make this processing work for any (valid) currency code?
Hint use the WRITE … TO … format with an addition.
Having implemented and checked the code, rerun the LSMW from the convert step
and confirm that the documents all post successfully.
397556327.doc
We shall be using the second technique as we do not know which position in the list our contact of
interest is.
The next stage is to assign field names to fields where you will be supplying data. Do this by
positioning the cursor on the field and double clicking
Field Suggested Name
RF02D-KUNNR KUNNR Customer Number
*KNVK-NAME1 SURNAME Surname
KNVK-TELF1 PHONE New phone number
Do not assign a field name to RF02D-D0360 – this is the Customer Contact Check Box and
will be the same for all records.
The assumption we are making is that the data on Customer Number and Contact Name has been
extracted from SAP, so will be valid . Compared with an LSMW data load, the mapping is extremely
simple.
Object Type and Import Technique – choose Batch Input Recording, using the name of the recording
created above.
397556327.doc
Then work through the remaining steps, verifying the layout and mapping, process the batch input
session.