LSMW - Upload Sales Orders

Hi All,
I've worked with LSMW to record transactions in the past, but I'm unsure of what the best approach is for sales orders. Our requirement is to upload a simple tab-delimited text file that contains the PO#, PO type, Material, Grid (we are using AFS), Name/Phone/Address of the ship-to party, and shipping notes text.
My main question is concerned with handling the multiple line items on the orders. I have seen some posts here that suggest using one LSMW to do the header data (VA01), and then a second to do line item data (VA02). However, I need this to be one step. I see there is a BAPI with Business Object BUS2032, but I have not worked with that method.
Any idea on the easiest way to complete this?  I'd like to have a simple step for a user to run to automate entering 15-20 orders a day.  Any help is appreciated, thanks!
J

Hi,
Firstly you can create the sales orders using the BPAI with header data and for line item details you can go for anothere BAPI
BAPI_SALESORDER_CHANGE. hope it will work.
~linganna

Similar Messages

  • Problem in Uploading sales order text data using LSMW

    Hi All,
    I am facing Problem in uploading open sales order data from legacy to SAP using LSMW.
    We are trying to upload sales order data using LSMW Standard Batch/Direct input using program name RVINVB10 and program type D. We are not able to upload item text but have no problem in uploading remaining data.
    the details we are passing to BTEXHKOM structure are......
    BTEXHKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXHKOM-LAISO = 'EN'.
    BTEXHKOM-TDID = 'Z009'.
    and the for structure BTEXLKOM
    BTEXLKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXLKOM-TXPARGRAPH = '/'.
    CONCATENATE LITEM-DEPTID LITEM-DEPTNAME
    INTO BTEXLKOM-TXLINE SEPARATED BY ' '.
    we have three input source structures.
    IHEADER Header structure
    LITEM Line item structure ( Material data )
    IPARTN Partners structure
    The structure relationships are
    BTEXHKOM <<< IHEADER.
    BTEXLKOM <<< IHEADER.
    Please let me know if I am doing some thing wrong or some thing else need to be done.
    Thanks,
    Chindam.

    you can pass below values also
    OLDNR         :  order number and item nuber
    TXPARGRAPH  : VBBK
    TXLINE        : your text.....

  • Lsmw for sales order upload

    Dear Friends,
                 I am trying to upload sales order data using transaction VA01 by Batch Input Recording method in LSMW. But I am not able to get line items due to the fact that I am not able to assign two source structures. So i am trying to upload by Abap Coding in LSMW. But still I am not able to get the Item Data. So Kindly help me in this.
    With Regards,
    H.Krishnan

    use the first method (Direct Input)
    Object : 0090  (Sales)
    Method : 0000
    Programname: RVINVB10
    In structure relations u can find header and line itemas.
    before that define 2 structures.
    ===================================================
    After creattion of one structure..
    again click on create button> now it will ask samelevel/lowerlevel..give ur option>then u can add the fields in the next step.
    pls.reward if it helps u and close this thread
    Thanks
    Eswar
    Message was edited by: Eswar Kanakanti

  • How to upload sales order line items?

    SAPGurus,
    For years my customer service department has been asking for a way to upload sales order line items into the VA01 sales order-entry screen.
    Many of our customers submit PO's with huge amount of line items, up to 1,000 lines. Our CS reps need to key in the data line by line (or copy/paste
    approx 17 lines at once from Excel into the VA01 screen), and we are looking for a way to make this process leaner. One idea we have is that user creates the order header, and then has a way to upload the material numbers and quantities in a separate (newly created Z-transaction) screen in one go.
    Obviously rules then need to be built that deal with the various pop-up messages related to e.g. ATP, material status, etc.
    Does anyone have any experience or thoughts on how we could achieve this? A way to make the sales order-entry process a bit less time-consuming? Any feedback would be greatly appreciated !
    Thank you,
    RVS

    Take the inputs from this Blog created by  SUNIL PILLAI                   
    Sales Documents upload  using Standard Direct Input Program in LSMW
    G. Lakshmipathi

  • Upload sales order

    Hi Friends,
    How to upload sales orders...
    Is it possible through LSMW or we have to go for BDC.
    please help me...
    with regards

    Hi,
    If you want to use LSMW then you need to create two recordings,
    Header Data(T.Code: VA01)
    Item Data(T.Code: VA02)
    Header Recording Data:(VA01)
    1.Sales OrderType
    2.Sales Org
    3.Distr Chl
    4.Div
    5.Sold-To
    6.PO No.
    7.Data
    8.Plant(If required)
    9.Material (First line material)
    10.Qty & mandatory field as per ur system requirement.
    Item Recording Data:(VA02)
    1.Sales Document No.
    2.Item No.(20,30 etc)
    3.Material Code
    4.Qty & mandatory field as per ur system requirement
    I uploaded the same way...
    Barathi

  • Scheduling problem in LSMW for Sales Order

    I am doing LSMW for Sales Order using the BAPI method.
    I am able to upload the item details along with their quantities also but the problem that I am now facing is the scheduling problem.I am unable to schedule the item quantities, only the last quantity passed is taken as the final quantity and the consolidated quantity is also getting ignored.
    I am using E1BPSCHDL structure, in this structure I am mapping Itm_number , req_date and req_qty(scheduled qty).....
    in the structure E1BPSCHDLX, the same fields are mapped as 'X'.
    in the structure E1BPSDITM, I am mapping the item info along with the consolidated qty(TARGET_QTY), but this is getting ignored and the last scheduled qty is taken as the final consolidated qty and the rest scheduled qty data is getting rejected.
    Please do help... I dont know why this problem is coming... tried n number of alternatives but of no hope... do try to help me
    with regards,
    Daya.

    Check the format of your date and check the format expected.
    sometimes you can have diff like YYYYMMDD, MM.DD.YYYY,...
    Look at the converted data.
    Hope this helps,
    Erwan

  • How to upload Sales Orders into B1 from an excel file?

    Hi,
      I'm a new comer. I'm looking for a program of uploading Sales Orders into B1 from an excel file. Where can I find a reference book for it? Or I appreciate if someone could offer a program sample.
      Thanks
      ZAP

    Hello ZAP.
    I do not have such code, but i this link /people/janos.nagy/blog/2010/01/25/exporting--importing-authorization-using-ms-excel-in-sap-b1 you can find an excel example about authorization, and using Single Sign On (SAP B1 must have run with excel)
    The method is similar, you can run any DI API operation from excel.
    Here is an example to add a sales order
    Dim oDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
            oDoc.CardCode = CUSTOMER_CODE
            oDoc.DocDate = Today
            oDoc.DocDueDate = Today
            oDoc.Lines.SetCurrentLine(0)
            oDoc.Lines.ItemCode = ITEMCODE
            oDoc.Lines.Quantity = QTY
            oDoc.Lines.UnitPrice = PRICE
            If oDoc.Add <> 0 Then
                MsgBox("Error " + oCompany.GetLastErrorDescription())
            Else
                MsgBox("SAles order added")
            End If
    You can repeat the setcurrentline section as many time as lines you have in the SO:
    Regards,
    J.
    Ps: Reference: SDK help and sample programs, which included in every patch.
    Edited by: János Nagy on Feb 10, 2010 9:50 AM

  • Uploading sales orders in background

    Hi everyone,
    Iam trying to upload sales orders in background.As my program is a customised program of the standard sales order uplaod program RVINVB10 ,it is a direct input program which updates the tables using the function modules.
    So to run direct input programs in background we are using transaction BMV0,creating a job and running it with the desired variant.the file which has the salesorders to be uploaded is also in the application server.
    the problem is we have to upload bulk data so when ever an error occurs in the transaction BMV0,it says "Job cancelled after system exception ERROR_MESSAGE" . but my requirement is it should log the error and continue creating the other orders and log all the errors possible instead of cancelling the job.
    please help.
    Regards,
    Sravanthi

    Hi,
    One your bapi has returned the error table  'GT_RETURN'... you can use the following logic...
    LOOP AT gt_return INTO gs_return WHERE type CA 'AE'.
        CLEAR gs_bapi_errors.
        CALL FUNCTION 'MESSAGE_TEXT_BUILD'
             EXPORTING
                  msgid               = gs_return-id
                  msgnr               = gs_return-number
                  msgv1               = gs_return-message_v1
                  msgv2               = gs_return-message_v2
                  msgv3               = gs_return-message_v3
                  msgv4               = gs_return-message_v4
             IMPORTING
                  message_text_output = gs_bapi_errors.
        APPEND gs_bapi_errors TO gt_bapi_errors.
      ENDLOOP.
    * Update successful
      IF gt_bapi_errors[] IS INITIAL.
        REFRESH gt_return.
        CLEAR ls_return.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
                  wait   = c_x
             IMPORTING
                  return = ls_return.
        IF NOT ls_return IS INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          APPEND ls_return TO gt_return.
          PERFORM store_bapi_errors.
        ENDIF.
    * Update failed
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    This will not interrupt your processing...

  • Upload sales order item data

    Hi All,
    I need to upload sales order item data.Could you please tell me the steps in R/3 to replicate data BW.
    Thanks
    Raj

    Hi,
    Steps to upload sales order item:
    1) Maintain extract structure (LBWE)
    2) Maintain Datasource. (LBWE)
    3) Replicate datasource in BW
    4) Assign Infosources (RSA1 - BW)
    5) Maintain comm struc/transfer rules (RSA1 - BW)
    6) Maintain infocubes and update rules (RSA1 - BW)
    7) Activate extract structures (LBWE)
    8) Delete setup tables / setup extraction (For deleting – LBWG and for setup use OLI7BW).
    9) Infopackage for delta init
    10) Set up periodic V3 update (LBWE)
    11) InfoPackage for delta load.
    Hope this helps.
    PB

  • LSMW for sales order uploading

    Hi Guys,
    I need to upload single time sales order detials into SAP through flat file, is any sap standard LSMW methods are available or I need to develop a Z program.
    Could you please give your suggestions?
    Thanks,
    Gourisankar.

    Hi gourishankar,
    LSMW is not a bad one, but striaght BDC programme with BAPI would be the
    best
    so see this link it may help you.
    http://www.****************/Tutorials/LSMW/Bank/page1.htm
    thanks
    karthik

  • LSMW  - Open Sales Orders

    Hello  Friends
    I want to find if anybody can guide me on how to get all open sales order tables , i want to create a format and create a flat file for uplodading the file , for this what do i need and how do i do it.
    Also for creating LSWM can i use the existing one which i can just Assign the New file to the existing one .
    Regards.

    Dear Mehmood,
    I want to find if anybody can guide me on how to get all open sales order tables
    You want to extract all the open sales orders- which you can get from Table:VBUP key in overall document status in selection screen ( You can use VBUK also- but if there are certain sales orders in which some of the items are completed or few of them open, using VBUK - you will not get exact records)
    Secondly, you can get the data by using Query also- in SQVI
    design a query with VBAK / VBAP & VBUP
    so that from VBAK you can give time period & sales area details
    from VBAP - you can enter plant relevant details to filter certain records & item category as well
    where as VBUP- filter wth the status.
    once downloaded store in flat file.
    Now Create LSMW object by using batch input recording method. after mapping the relevant fields,
    prepare the flat file in such a - it suits to the upload file / recording file. then you can upload the already downloaded n stored open sales orders in flat file.
    Hope this is what you are looking for.
    Regards,
    ReazuddinMD

  • Upload SAles order with 5 Charcteristics for Configurable materisl

    Scenario
    1.We are workign with configurable material
    2.There are 5 characters which pops during the sales order creation.
    Issue.
    We are trygint to develop a upload program with Lsmw , let us know if anyone have come across such scneario and how it was addressed.
    thanks in advance.

    i made a recording and tried running it and worked fine..

  • LSMW-BAPI Sales order creation

    Hi All,
    I was trying to create sales order through the LSMW BAPI method.
    For the first line item i'm getting the correct quantity that i''m passing.
    But from second line item onwards quantity field is appearing as 0 (zero) even though i pass the different quantity values.
    i'm assiging the quantity to the REQ_QTY field in the schedule line items structure.
    Please suggest any solution for this.
    Thanking you.
    with regards,
    Bharath

    Hi,
    Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved.
    Please let me know if u can help me, i wanted to do it using idoc
    Regards
    Sanju

  • LSMW bapi sales order

    hi folks,
    iam doing LSMW Bapi method for sales order creation do we need to create mandatorly header and item structure for in source structure creation in LSMW ?points will be rewarded for useful answers.

    Yes u need to create two structures one for header and the other for line item. Within Src structure first create Structure for Header Data then create another structure UNDER Header Data (LOWER LEVEL).
    ~Sid

  • LSMW ( For sales order item)

    Dear all,
           I have a question, can LSMW batch change some data in sales order line item?
           For example,  there has a sales order with 20 items. I have to change the material group in item 10 and 50, can i achieve this by LSMW?

    Dear all,
            I still cannot found item in my recording. In my recording just show below information:
            I am not sure if "  BDC_OKCODE                     =ITEM" means item?
    SAPMV45A 0102
        BDC_CURSOR                     VBAK-VBELN
        BDC_OKCODE                     /00
        VBAK-VBELN                     17380
    SAPMV45A 4001
        BDC_OKCODE                     =ITEM
        BDC_SUBSCR                     SAPMV45A
        VBKD-BSTKD                     1
        BDC_SUBSCR                     SAPMV45A
        KUWEV-KUNNR                    211011
        BDC_SUBSCR                     SAPMV45A
        BDC_SUBSCR                     SAPMV45A
        RV45A-KETDAT                   2008.06.23
        RV45A-KPRGBZ                   D
        VBKD-PRSDT                     2008.06.23
        VBKD-ZTERM                     0001
        VBAK-AUGRU                     002
        BDC_SUBSCR                     SAPMV45A
        BDC_SUBSCR                     SAPLV45W
        BDC_SUBSCR                     SAPMV45A
        BDC_CURSOR                     RV45A-KWMENG(01)
        BDC_SUBSCR                     SAPMV45A
    SAPMV45A 4003
        BDC_OKCODE                     =T\02
        BDC_SUBSCR                     SAPMV45A
        BDC_SUBSCR                     SAPMV45A
        BDC_CURSOR                     RV45A-KWMENG
        RV45A-KWMENG                                     2
        VBKD-PRSDT                     2008.06.23
    SAPMV45A 4003
        BDC_OKCODE                     /00
        BDC_SUBSCR                     SAPMV45A
        BDC_SUBSCR                     SAPMV45A
        BDC_CURSOR                     VBAP-MATKL
        VBAP-PRODH                     50...510..5100
        VBAP-MATKL                     730
        VBAP-SPART                     10
        VBAP-KONDM                     11
        VBKD-KDGRP                     12
        VBKD-KONDA                     11
        VBKD-PLTYP                     11

Maybe you are looking for