Skip to Content
avatar image
Former Member

LSMW for Sales Order with Multiple lines

Hello Everyone

We are facing issue regarding Sales orders.We have 50 Sales Orders with multiple lines and lines sometimes exceed to 30 to 40. Now the issue is we want to run LSMW but when in file i use 2nd line item and try to upload system creates new sales order for 2nd line item. However we need multiple lines on each sales order and want to run without ABAP program are there any possibilities that we will upload sales orders with LSMW.

Best Regards

SD

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    May 15, 2013 at 08:45 AM

    Hi,

         You can create the sales order using BAPI

    1.BAPI_SALESORDER_CREATEFROMDAT2  - This is used to load the sales order with condition types.

    BAPI_SALESORDER_CREATEFROMDAT1 - This is without loading condtion types.

    http://sap-img.com/abap/bapi-salesorder-createfromdat2.htm

    Hope it will help....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 15, 2013 at 08:54 AM

    Hello SD

    As suggested by Ajaya in the above post...you will have to use BAPI (BAPI_SALESORDER_CREATEFROMDAT2) to create a sales order with multiple line items.

    Regards

    Shiv

    Add comment
    10|10000 characters needed characters exceeded

  • May 15, 2013 at 08:56 AM

    Hi,

    In LSMW, use Program #  RVINVB10 under the batch input method

    Refer the link for steps

    http://scn.sap.com/thread/1492940

    regards,

    santosh

    Add comment
    10|10000 characters needed characters exceeded

    • the easiest way to achieve it is to have 2 source files, one with the header data and the second with the item data.

      of course they need to have a common field, which is the sales order number.

      the file with the header data is the parents segment, the item data file a child in the structure definition.

  • May 16, 2013 at 04:33 AM

    Hi,

       it is advisable to run the Sale order Transactions with BDC,it is more convenient.

    Shiva

    Add comment
    10|10000 characters needed characters exceeded

    • I actually disagree on that comment.

      Convenient is the way you know, if someone only knows LSMW and nothing about BDC, then LSMW is more convenient for him.

      further the above mentioned program RVINVB10 that is used in LSMW, is nothing else than the SAP given batch input program that can also be called from outside LSMW and was used from ABAPers in data migration before LSMW came up.

      An own recording with BDC recorder or from within LSMW is certainly the worst method as a recording is static, and with different number of items you need a dynamic way to achieve the goal

  • avatar image
    Former Member
    May 16, 2013 at 11:24 AM

    hi,

    i did't get you. you have 30 to 40 line items, what exactly you want to do??

    warm regards,

    Jagadeesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 16, 2013 at 11:51 AM

    Dear Jürgen L Thanks

    Can you please elaborate

    "2 source files, one with the header data and the second with the item data"

    Because what i suppose to enter in header Data Just Sold to Party and PO Number" and in

    Item Data : Material No + Qty + Price 

    Because i need to make multiple lines.

    Can you please show me the fields for header and item data that would be grateful as well as helpful.

    Thanks And Regards

    SD

    Add comment
    10|10000 characters needed characters exceeded

    • an error in each step....you should start with reading the documentation again.

      The homepage of LSMW can be found here in SCN at http://scn.sap.com/docs/DOC-26158

      In that document you can find the links to the general documentation in help.sap.com too:

      http://help.sap.com/saphelp_nw70/helpdata/en/4d/455035082e2271e10000009b38f889/frameset.htm

      In the header data file I would actually put the PO number first. Always try to have the fields that are used to join the source files at the beginning

      of course you have to assign the your source structure to all mandatory structures, here assign the header structure as well. Keep in mind that you have to fill mandatory fields/all fields that are needed to create a sales order. I thought your few fields are just used as an example, I doubt that you can create an order with only those few fields. All fields that are not in your source may need to be assigned as constant values. Have you ever created a sales order manually with VA01? Just try it with your few fields, and note all fields that you have to fill manually to get a step further. (Keep in mind that defaults from user parameters are not taken automatically in LSMW execution, you have to "maintain" such fields yourself as if you had no user parameters maintained.

      Regarding logical path, just search SCN, enter LSMW logical path into the search field on top right of the forum, I got more than 300 hits. No need to explain it again.