12-05-2007 11:24 AM
Hi,
I have a Header data & Item data and i want to upload them through LSMW using BAPi.Can any one tell me how to create a flat file for this.whether i should create separate flat files for Header & Item Details or else should i create both in one flat file. if so how to create a flat file & how should be the Header and Items should be differentiated.
Thanks,
Sudhir Uppalapati
12-05-2007 12:58 PM
Hello,
If you create 2 files, you have to define a field in both files, to link header with item data. For example, create a field 'GROUPNUMBER' in both, which contains a unique number for each header - item combination.
LSMW will than handle the linking of header - item data automatically.
Kind Regards,
Bart
12-05-2007 1:00 PM
Hi
In your header and item internal tables, take fist field as count (length based on records).
Take header details and item details in same flat file but give this count field as first field in flat file.
Example
Count field1 field2.....
00001 header details
00001 item details1
00001 item details2
00002 header details
00002 item details1
00002 item details2
Reward if it dose.
Thanks
Siva Kumar
12-05-2007 1:04 PM
hi sudhir ,
no need of creating 2 file.just create 2 structure
1 for header and 2 for item.
while filed mapping just add identifier field in the start
and assign idetifier = h
idetifier = i.
H AGENCY1 1000 000 10000
I MODULE 10 1000
if any problem plz let me know