02-16-2007 9:01 AM
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
02-16-2007 9:04 AM
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
02-16-2007 9:04 AM
To avoid problems like that use icod method in lsmw for creating customers instead of bdc.
Message Type DEBMAS
Basic Type DEBMAS06
BR, JAcek