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: 

LSMW using BAPI

sudhir_uppalapati
Participant
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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