LSMW Example
LSMW Example
LSMW Example
use a standard SAP object to update Customer Master Records. Business Object 0050 is already pre-defined in the system with standard Batch Input Interface Program RFBIDE00. Create an Object CUST_OBJ within Project as LSMW_DEMO and Subproject as CUSTOMERS as shown in Figure 20.
Figure 20 LSMW Object with Standard SAP Object Note! For the Demo example 2, I will list only those steps that are different from the first demo example.
Figure 8
Source Structure
Figure 9
Note that your input file will have four fields as key fields and you need to update three fields in the system.
updates to BGR00, BKN00 and BKNA1 structures. (If you do not maintain Structure relations for mandatory entries, you might get a message such as Target structure BKNA1 needs a relation to a source structure.) Even though you dont want to update any fields in these structures, you need to create a relationship with source structures. In all, you need to create relationship for four target structures. Create relationship between source structures XD02S with these target structures with icon Create Relationship Keep Cursor on these four target structures and click on icon Create Relation and structure relations are maintained as shown in Figure 22.
Figure 23 LSMW Conversion Rules Choose radio button Constant (Figure 23) to enter value XD02 transaction code. -- Keep your cursor on field KUNNR and click on Assign source field icon
Choose source field Customer from source structure XD02S. (See Figure 24.)
Figure 24 Assign Source fields -- Similarly, choose source fields for Sales Organization, Distribution Channel, and Division. (See Figure 25.)
Figure 25 Field Mapping and Conversion Rules -- Scroll down to structure BKNVV fields and assign source fields to three fields Sales Office, Sales Group, and Customer Group (Figure 26).
Figure 26 Field Mapping and Conversion Rules Save and go back to main screen.
Figure 13 File attributes Create an Excel file (Figure 14) with your data and save it as a Tab-delimited text file on your local drive (C:\) and name it XD02.txt.
Figure 27 Converted data into multiple structures Note that if you had only one record in source file, the converted file has four records. Earlier, creating this input file, so that the standard interface program can read it, was a
big nightmare, the primary reason being that it could have multiple record layouts. Even for a simple conversion with one input record, you would have to create this complex file with many record layouts. The advantage of LSMW is that it prepares these multi-layout files automatically.
the system. You can confirm this by viewing the customer master records (XD03).