Skip to Content
author's profile photo Former Member
Former Member

LSMW - ME21 How to map multiple line items

Hi all,

I am using LSMW tool with batch input recording technique to create POs via ME21. I have defined source structures as HEAD with POSI as its subordianted structure. This settings worked perfectly for one single item line. However, it created a new transaction for each line item in the file. I did some searches in this forum and I noticed that someone suggested to dynamically set the line positon at the processing points. I tried a few times and could not get it work. Anyone knows how to map multiple items in LSMW, please help.

Here is part of my recording:

EKPO-EMATN(01) 000995NM

EKPO-MENGE(01) 1 RM06E-EEIND(01) 2006.04.27 EKPO-NETPR(01) 10 EKPO-WERKS(01) 0001 EKPO-LGORT(01) 0001

My input file looks like this:

H 77777400 NB2006.05.140001001T

L000995NM00000000052006.05.15 1000010001CAON

L000998NM00000000052006.05.15 1000010001CAON

H 77777400 NB2006.05.140001001T

L000995NM00000000052006.05.15 1000010001CAON

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 01, 2006 at 04:28 PM

    Hi

    I don't know how you have defined the structure of your file:

    if you have defined two different structures you should use twi different files;

    if you have defined only one structure then you can use a first field as flag indicating the kind of the information (header or item) so you can insert a routine to check the kind of record and transfer the data only if the structure is right.

    You can do it by inserting abap code in MAPPING step.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      If you have used a b.i. recording, all abap code is inserted in std table /SAPDMC/LSGBDC.

      The program to generate the B.I. session is automatically created when you run "Create Batch Input Session" step.

      What means the numbers of items you can insert depend on the totals of items you have used while creating your b.i. recording:

      If you have simulated to insert only one item, you'll be able to insert only one item in your project.

      So you should simulate to insert severals items not only one, but I think it should be better you use a std method to create PO by LSMW:

      - Std B.I: object 0085, method 0001 (RM06EEI0);

      - BAPI : object BUS2012, method CREATEFROMDATA1

      Max

  • Posted on Jun 14, 2012 at 10:38 AM

    Hi

    I am also looking for the similar solution where i want to create PO with more than one line item.

    Please help with how did you managed to resolve this?

    --erpMan--

    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.