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!

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

Similar Messages

  • How to insert multiple line items in fv60 using bdc.

    Hi all,
          How to insert multiple line items in fv60 using bdcs

    hi
    chk this
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
    V_PEINH(30).
    DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
    PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
    DATA : BEGIN OF ITAB OCCURS 0,
            IND(02),
            LIFNR_001(010),
    data element: BSART
            BSART_002(004),
    data element: BEDAT
    data element: EKORG
            EKORG_004(004),
            EKGRP_006(003),
    data element: LPEIN
            LPEIN_005(001),
    data element: EMATNR
            EMATN_01_007(018),
    data element: EWERK
            WERKS_01_008(004),
    data element: EPEIN
            PEINH_01_009(006),
    data element: EWERK
           MENGE_01_013(017),
    data element: AUFEP
            EBELP_014(005),
    data element: AUFEP
         END OF ITAB.
    START-OF-SELECTION.
    FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT ITAB BY IND.
    START-OF-SELECTION.
    LOOP AT ITAB.
    REFRESH IT_MESSAGES.
    <b>V_IND = V_IND + 1.</b>
    <b>AT NEW IND.</b>
    <b>READ TABLE ITAB INDEX SY-TABIX.</b>
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0100'.
    PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                  ITAB-LIFNR_001.
    PERFORM BDC_FIELD       USING 'RM06E-BSART'
                                  ITAB-BSART_002.
    *perform bdc_field       using 'RM06E-BEDAT'
                                 ITAB-BEDAT_003.
    PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                  ITAB-EKORG_004.
    PERFORM BDC_FIELD       USING 'RM06E-LPEIN'
                                  ITAB-LPEIN_005.
    PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                  ITAB-EKGRP_006.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    <b>PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
    PERFORM BDC_FIELD       USING  V_EMATN
                                   ITAB-EMATN_01_007.
    CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
    PERFORM BDC_FIELD       USING  V_WERKS
                                   ITAB-WERKS_01_008.
    CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  V_PEINH
                                   ITAB-PEINH_01_009.
    *CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
    *perform bdc_dynpro      using 'SAPMM06E' '0120'.
    *perform bdc_field       using  V_MENGE
                                  ITAB-MENGE_01_013.
    *CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  'RM06E-EBELP'
                                   ITAB-EBELP_014.</b>PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    AT END OF IND.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BU'.
    ENDAT.
    CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
                                             UPDATE 'S'
                                        MESSAGES INTO IT_MESSAGES.
       LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
         IF FLAG = 'X'.
         CALL FUNCTION 'BDC_OPEN_GROUP'
         EXPORTING
            CLIENT                    = SY-MANDT
           DEST                      = FILLER8
            GROUP                     = 'GAMY_FAILURE'
           HOLDDATE                  = FILLER8
            KEEP                      = 'X'
            USER                      = SY-UNAME
           RECORD                    = FILLER1
           PROG                      = SY-CPROG
         IMPORTING
           QID                       =
          EXCEPTIONS
            CLIENT_INVALID            = 1
            DESTINATION_INVALID       = 2
            GROUP_INVALID             = 3
            GROUP_IS_LOCKED           = 4
            HOLDDATE_INVALID          = 5
            INTERNAL_ERROR            = 6
            QUEUE_ERROR               = 7
            RUNNING                   = 8
            SYSTEM_LOCK_ERROR         = 9
            USER_INVALID              = 10
            OTHERS                    = 11
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CLEAR FLAG.
         ENDIF.
         CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            TCODE                  = 'ME21'
           POST_LOCAL             = NOVBLOCAL
           PRINTING               = NOPRINT
           SIMUBATCH              = ' '
           CTUPARAMS              = ' '
           TABLES
             DYNPROTAB              = IT_BDCDATA
          EXCEPTIONS
            INTERNAL_ERROR         = 1
            NOT_OPEN               = 2
            QUEUE_ERROR            = 3
            TCODE_INVALID          = 4
            PRINTING_INVALID       = 5
            POSTING_INVALID        = 6
            OTHERS                 = 7
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
        ENDIF.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID              = IT_MESSAGES-MSGID
        LANG            = 'EN'
        NO              = IT_MESSAGES-MSGNR
        V1              = IT_MESSAGES-MSGV1
        V2              = IT_MESSAGES-MSGV2
        V3              = IT_MESSAGES-MSGV3
        V4              = IT_MESSAGES-MSGV4
      IMPORTING
        MSG             = V_MSG
      EXCEPTIONS
        NOT_FOUND       = 1
        OTHERS          = 2
       WRITE : / V_MSG.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
       ENDLOOP.
    IF FLAG NE 'X'.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
       EXCEPTIONS
         NOT_OPEN          = 1
         QUEUE_ERROR       = 2
         OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = PROGRAM.
      IT_BDCDATA-DYNPRO   = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR IT_BDCDATA.
        IT_BDCDATA-FNAM = FNAM.
        IT_BDCDATA-FVAL = FVAL.
        APPEND IT_BDCDATA.

  • How to handle multiple line items in lsmw

    hi all,
    how can i handle multiple line items in lsmw either by using direct input method or BDC recording.
    first preference is Bdc recording in lsmw . can u tell me the steps in detail.
    thanks,
    harini.c

    Hi Harini,
    Check this link.
    BDC - Header with multiple line items.
    Regards,
    Arun

  • How to Update multiple line Items in Sales order Interactive form

    Hi,
            I have created one online interactive form for sales order. In that I incorporated dynamic table logic .i.e. we can add row and delete row using buttons. Interactive form is working fine with one line item. But if I give multiple lines in table (line item) its creating sales order with single line item. So please help me how to pass multiple lines.
    Thanks & Regards,
    Krishna.

    Hi,
    Check out this link, this deals with the problem you are facing.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • SNC5.1- How to Publish multiple line items in SNC Web UI (Supplier view)

    Hi Experts,
    I am working in SAP SNC Supplier Collaboration project. I have a scenario where i am trying to "Publish PO" for multiple line items in Web UI. I am able to confirm each PO line item and Save PO. But if i try to publish one line item at a time, then the system publishes the 1st line item and it does not allow me to publish the remaining PO line items.
    All i can do is, Confirm and Save all line items, and then "publish" it at the end. In this way,i can view all the confirmed line items (POA) in SNC. But how do I Confirm/Save/Publish each PO line item?
    Appreciate your help.
    Regards,
    dmohite

    Hi dmohite,
    As the POC standard process Supplier should give confirmation for all PO items after confirmation of all items it should allow to Published the PO at Header level.
    If supplier does not give confirmation for all items it should not allowed to Published the PO at Header level but you are able Published the PO at header level without confirmation of all PO items.
    You can implement note no: 1320445 (manual implementation is required).
    After implementation of this note without confirmation of all PO items it won't allow to publish the PO at header level.
    Please let me know for any clarification.
    Regards,
    Nikhil

  • How to Create multiple line items

    Hi
    I have created a web dynpro application that accesses BAPI_REQUISITION_CREATE to create a requisition. The application so far creates a requisition with only one line item.
    How do I capture details about multiple line items from the user before submitting the form to create the requisition.
    Thanks in advance for your help.
    Sriram

    Hi Sriram,
        Create a form where u enter the requisition details of one line item.Suppose say if u have a button Add another Line Item on click of that fill  a value node say
    RequsitionDetails  of cardinality 0-n and clear the form.If u want u can also show the added item in  a table  below by bindin the data source to RequistionDetails. Now the user can enter another line item in the form.Similarly now he can enter multiple line items.On click of Submit u submit the records in the RequistionDetails node.Add all these records to the table parameter which u r passing.
    BAPI_REQUISITION_CREATE_Input input = new BAPI_REQUISITION_CREATE_Input();
    wdContext.node<<>>.bind(input);
    for(int index=0;index<wdContex.nodeRequsitionDetails().size();index++)
    zTestStruc test = new zTestStruc();
    test.setattr1(wdContex.nodeRequsitionDetails().getRequsitionElementAt(index).getattr1());
    input.add<<>>(test);
    Hope this solves.
    Regards,
    Sowjanya.

  • Mapping Multiple line item. Target node generation problem

    Hi,
    I am trying to create a mapping to handle multiline items.
    my source structure is
    ns0:OrderCreate>
    <ns0:Header>
    <ns0:OrderCreateBody>
         -<ns0:OrderCreateProperties>
         -<ns0:PurchaseOrderNumber>
            -<ns0:OrderCreatePartners>
         -<ns0:OrderCreateDetails>
                   --<ns0:OrderCreateProductLineItem>
           -</ns0:OrderCreateDetails>
    </ns0:OrderCreateBody>
    </ns0:OrderCreate>
    Here    <ns0:OrderCreateProductLineItem> is the node which will occure multiple time in new requirment (which is mapped to E1EDP01).
    my target structure is
    <ORDERS05>
    <IDOC>
       <EDI_DC40>
       <E1EDK01>
       <E1EDK14>
       <E1EDK05>
       <E1EDK02>
       <E1EDKA1>
       <E1EDKT1>
       <E1EDK36>
       <E1EDP01>
    - - POSEX
    - - MENGE
    - - MENEE
    - - <E1EDP02>
    - - <E1EDP19>
    - - <E1EDP35>
    Currently for each line item ( <ns0:OrderCreateProductLineItem>) target structure contains one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode ).
    In Multiline Scenario for each occurance of node <ns0:OrderCreateProductLineItem> target structure should have one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode for every line item ).
    For example if source is ::
    ns0:OrderCreate>
    <ns0:Header>
    <ns0:OrderCreateBody>
         -  <ns0:OrderCreateProperties>
         -  <ns0:PurchaseOrderNumber>
            -  <ns0:OrderCreatePartners>
         -  <ns0:OrderCreateDetails>
                  - -  <ns0:OrderCreateProductLineItem>
                                  - -  <ns0:OrderCreateProductLineItem>
                                  - -  <ns0:OrderCreateProductLineItem>
           </ns0:OrderCreateDetails>
    </ns0:OrderCreateBody>
    Then target should be ::
    <ORDERS05>
    <IDOC>
       <EDI_DC40>
       <E1EDK01>
       <E1EDP01>
                  - - POSEX
                  - - <E1EDP02>
                  - - <E1EDP02>
                 - - <E1EDP19>
       <E1EDP01>
                  - - POSEX
                  - - <E1EDP02>
                  - - <E1EDP02>
                 - - <E1EDP19>
        <E1EDP01>
                  - - POSEX
                  - - <E1EDP02>
                  - - <E1EDP02>
                 - - <E1EDP19>
    How to acheive this mapping please suggest ?
    Edited by: gumshu on Oct 4, 2011 2:26 AM

    Hello,
    The details you have provided are incomplete, e.g where do you get
    - - POSEX
    - - <E1EDP02>
    - - <E1EDP02>
    - - <E1EDP19>
    But if you want  E1EDP01 to appear multiple times, you can use this mapping
    OrderCreateProductLineItem -> removeContext -> E1EDP01
    Hope this helps,
    Mark

  • How to Print Multiple line items(only the one's that are selected in va22)

    Hello All ,
    My smartform should print the multiple selected line items that i as a user should be able to see as the output .
    In my case i dont have any program that calls the transaction va22
    directly from the transaction VA22 i give the ISSUE OUTPUT TO .
    The Driver program that calls my smartforms fetches the data from table VBAP .
    Two cases that i get because of this fetching logic .
    1. When i try to fetch the data based on only VBELN in the output i get all the items that are in the particular Quotation .
    2 . When i try to fetch data based on VBELN and POSNR in the ouptut when i select multiple items and give print the first item that i i selected is displayed .
    Now what i need is to print only those data that i select in VA22 .
    say if there are items A, B , C, D ,E  in the Quotation .
    and before printing i select A , C , D then only those items should be printed .
    I hope any one  of the Experts  can solve my problem .
    Thanks & Regards
    Faran

    Hi
    I think you will need to do some enhancemwnt for this. What you can do select the lines in table comtrol and before issuing output you need to find a suitable wnhancement place where you can export the selected lines and make the corresponding change in logic for the same?.
    Secondly uou can make a custom report also where user will select lines of po and print..but in this way you will need to many calculations
    Nabheet

  • LSMW to create Sales Order refer to Quotation with multiple line items.

    Hi Gurus,
    I am new to LSMW, and my requirement is that, I have a file downloaded from another system, it is like this:
    Quotation No.  Sold to party  data        item no.       material no.     quatity
    556                         10000012                 10              19077                1
    556                         10000012                 20              19078                1
    557                         10000011                 10              19076                1
    And it is required I need to create orders in VA01 refering to quotations, and then delete all the items from quotation, and add the items in the file. I am now doing it through transaction recording in VA01, but I came to a difficult part, that is how I can process line items. Because the items number will only be decided at runtime, so I can not record a BDC for that. And I have read some guides on LSMW, one of it said that transaction recording in LSMW can not deal with deep structures. So could any1 help on this?
    Best regards,
    Vincent

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • Multiple line items upload in LSMW

    There are 265 line items in an entry. I have around 50 such entries to be uploaded vis LSMW.
    The problem is that, while creating a recording, do i need to record 165 line items (164 line items are of debit and only 165th line item is credit)??
    I am creating the recording for Tcode FB05 ie GL entry.
    PLEASE SUGGEST ME THE SIMPLE WAY TO UPLOAD THE LARGE SUM OF ENTRIES IN LSMW.

    Hi.
    You need not record for 165 line items. You can just record One entry in FB05, with 2 line items alone (one Debit and one credit). The Debit/ Credit indicator will be one of the fields in Recording.
    Now you need to structure this field in your template and create the Field Mapping.
    So, in the Excel template, you maintain all the multiple line items you want - against each line item you can mark this indicator as Debit/ Credit.
    Let me know if this works.
    Regards
    Srini

  • Mapping of Multiple Line Items

    Hello All,
    While trying to post a purchase order creation into R/3, there are several line items in the purchase order. Each has different quantity, GL account, cost center and unit price. So how should I map it to the target field.
    Occurence of order detail
    order detail                      0..1
          list of item details       1..1
          Item detail                  1..unbounded
          base item detail           1..1
          line item number          1..1
          buyer line item num      1..1
    So occurence of buyer line item number is not unbounded. so how can I duplicate this buyer line item number?
    For example, In the XML source message I have 5 line items.....
    for line item one, I have quantity A, GL account B, cost center C and unit price D,
    for line item two, I have line item X, Quantity Y, GL account Z, Cost center M and unit price N, etc
    When I am trying to map I am able to pick only the first line item. Can anyone throw some light on how I should map all the line items data?
    If anyone can help me with mapping of this. A bit in detail please
    Regards,
    Neelima
    CSC

    Hi Neelima,
    Check out this blog....
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool ( with PO only)
    Multiple line items are generated basically using Context.
    Hope this will help.
    Let me know if you need more details.
    Nilesh

  • IDOC to JDBC, problem with the multiple line items structure and mapping

    Hi,
    I have a scenario where the ORDERS data need to update the SQL table. for the idoc which consists one line item its ok but for multiple line item its just updating one line item. In the destination side we have only one table for purchase order which consists of lineitem as a field.(no different tables for Header data and Line item data)
    Can anyone suggest me how to create a structure for target side and how to map them.
    Regards,
    CJ

    Hi Rajan,
    The table structure is
    [PO_DATE]
          ,[VENDOR_NO]      ,[PAYMENT_TERM]      ,[MATERIAL_CODE]      ,ORDERED_QTY]      ,RECEIVED_QTY]                                 
          ,[UOM]       ,[RATE]       ,[CURRENCY]       ,[PO_EXCRATE]       ,[TAX_CODE]       ,[BASE_VALUE]       ,[TAX_VALUE]
          ,[TOTAL_VALUE]       ,[ADVANCE_PAYAMT]       ,[TOTAL_QTY]        ,[SNO]       ,[POLINEITEM]
    Datatype structure:
    PO_XI_MT_ORDERS05 1-1
    STATEMENT   1-UNBOUN
      TABLENAME 1-1
        ACTION   optional
        TABLE    1-1
        ACCESS  1-1
           PO_NO   0-1
           PO_DATE 0-1
    Correct me if im wrong.
    Regards,
    CJ
    Edited by: kuncjy on May 5, 2011 11:32 AM

  • LSMW- Recording : Multiple Line Items

    I am trying to create an LSMW recording that simulates transaction O3I7.
    The thing is that we have different line items. This is similar to a sales order where we have header details and items details.
    I created a recording. Then I created two structures. One header Structure and one Item structure. I define the specific header fields under the header structure and the item fields under the item structure.
    However LSMW gives me an error. Because in LSMW each recording is considered as one target structure. I can't have more source structures than Target structures. Since I have One recording LSMW gives me an error.
    I tried to create two recordings but this does not work since LSMW will read each one as a different transaction.
    Does anyone know how to create LSMW recording with multiple line items so he/she can help?
    Thx

    Hi,
    Not sure about the transaction that you have mentioned. However, in LSMW recording, you can load the items along with the header in 2 steps using 2 data files.
    Step1: Create the header along with the first line item. Here you use a file which contains the header data along with the first line item data.
    Step2. Add subsequent line items to the header. In this case you need to enter the transaction in change mode. The data file may contain items data only. Please be sure to have an identifier at header level to add the items in that specific document.
    Hope this helps.
    Best Regards, Murugesh

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

Maybe you are looking for

  • Trigger not working correctly

    Hello all. I am working on a project, Yes it is for a class. I am creating a simple Boat rental db. I am trying to construct a Trigger that will verify when a Reservation is made for a particular date and time in the future (current day and beyond) t

  • Fail to install O365 additional product once some already installed

    Hi community, I have following issue trying to install additional O365 product in case some product already present on my virtual machine(VM). I mean I can install several products at once e.g. OfficeProPlus, Visio and Project. But in case OfficeProP

  • Calling a abap method in a javascript

    Hi all, I've been browsing a bit through this forum, but there has no answer been completely covering my problem... I would like to call an abap method in the javascript in order to check some values... This is what I have done: <script language="Jav

  • Problem calling Mac to Iphone?

    I had this problem (I could call Iphone to Mac OK but not the other way round) and I found the solution was to EDIT entries inmy phone book to remove the . in any numbers!  ie my phonebook entries were say  123.454.5656 and this would never work, as

  • Transactions tables (((urgent)))

    hi can we know the tables used by the transactions i have got the program name and then through se80 we can c the module pool but i want a diff way and i also dont want sql trace i want to know the tables used for co03. when i run this transaction co