Skip to Content

LSMW using BAPI

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 01: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 01: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.