Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

handling multiples line items in lsmw

Former Member
0 Kudos

hi

how to handle multiple line items in lsmw using bdc recording. can anyone please send the code for that for xd01 transaction or for any transaction.

regards

sri

2 REPLIES 2

Former Member
0 Kudos

Hello,

Check this link.

Lets assume ur file structure for header and item is like this.

Header : ORDERNO ORDERTYPE field1 field2.

Item : ORDERNO VORNR MATNR QTY.

As u can see in the input file the header and item orders are linked through the common field ORDERNO. In most of SAP systems external numbering for sales order is not allowed even though it is necessary to maintain a common field between the header and item files even if they are not mapped to sap database. Ur input file contains entries like-

Header : 1000 OR 100.00 20.00

1001 RT 50.00 10.00

Item : 1000 0010 Material1 10.00

1000 0020 Material2 10.00

1001 0010 Material1 10.00

Please fallow the fallowing steps.

1. Create a structure for header with all the necessay header fields.

2. Create a structure for item below the header in the hierarchy level and use a common field from header into the item. ( both of them should have same name and should be the first field in the structure).

3. After mapping it to the standard lsmw or custom program structure create two flat files with structure similar to the structure mentioned above and upload the data.

I hope my info helps u in some way.

Vasanth

Former Member
0 Kudos

To avoid problems like that use icod method in lsmw for creating customers instead of bdc.

Message Type DEBMAS

Basic Type DEBMAS06

BR, JAcek