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

Similar Messages

  • 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

  • How to bulk import data into CQ5 from MySQL and file system

    Is there an easy way to bulk import data into CQ5 from MySQL and file system?  Some of the files are ~50MB each (instrument files).  There are a total of ~1,500 records spread over about 5 tables.
    Thanks

    What problem are you having writing it to a file?
    You can't use FORALL to write the data out to a file, you can only loop through the entries in the collection 1 by 1 and write them out to the file like that.
    FORALL can only be used for SQL statements.

  • How can I create multiple QR Codes from an Excel File?

    Hi there,
    I am currently trying to set up business cards with a QR Code on the back of each card. Therefore I have an excel spreadsheet, which contains all the data necessary for the business card like name, function, e-mail adress,... the data is then filled in automatically by using the standard function with tags for each column (e.g. table column name is filled in as <<name>> in the specific location on the business card and once executed it is matched with the data from the excel file).
    Is there anything which could help me to automate the personalization of the QR Codes?
    All the best

    For free? Not at the moment. CC does have the ability to create QR codes but only one at a time. In CS6 (perhaps earlier versions?), regular poster/advanced scripter Jongware devised a script to prepare a QR code but again, could only do one at a time.
    However, someone did build on Jongware's QR code to do this from an InDesign file that had the necessary information in tagged text boxes and would prepare QR codes accordingly. However, it would leave them in the InDesign file (e.g. not separate EPS/PDFs).
    So, a long workaround would be:
    install the script and read the thread on the adobe forums (jongware's QR code plus the additional improvement): http://forums.adobe.com/message/4787823#4787823
    data merge the current data into the indesign file using the similar structure as the fourth poster in that post had written
    once all the QR codes are written, create a PDF of the file and then use one of various methods to break up the PDF into single page files: http://colecandoo.wordpress.com/2013/07/13/breaking-up-is-hard-to-do-indesign-files-into-i ndividual-pdfs-that-is/
    It's a lot of work to generate multiple QR codes. A paid solution offered by either Meadows DPS or Woodwing (two companies I have no affiliation with whatsoever) or any other plug-in provider for that matter: http://www.adobe.com/products/indesign/indepth.displayTab3.html may be an alternative that is worth pursuing.

  • How to Fetch Sales Order Item Quantity from Customer table(ztable)?

    Dear Guru's,
    My scenario:
    While creating Sales order the item quantity should be fetched from a Ztable. So iam using the Userexit "V46H0001 - - Customer functions for resource-related billing", in that i have implemented my code in the Function Exit - EXIT_SAPLV46H_001 and the FM documentation says
    This function module allows you to change item information for generating a new item.
    In order to achieve this, you must change the relevant field in the structure C_VBAPKOM.
    So i activated that exit and wrote the following code to test it as follows;
    break-point.
    C_VBAPKOM-zmeng = 10.
    But it seems not working, even it doesn't stop at the break-point when i type the material number for the item in the sales order and press enter...
    Please guide me in this regard, am i correct in choosing the User-Exit? what else have to be done in order to fetch the item quantity from the ztable....
    Please suggest if there is some other way to do this, i also heard that we can do this through Routines...
    Thanks in Advance...
    Regards
    Karthik D

    I have solved this  and you can found how i solved in the last reply of the following thread....
    [SD UserExit - V46H0001 - Customer functions for resource-related billing|SD UserExit - V46H0001 - Customer functions for resource-related billing]
    Thanks
    Karthik D

  • 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

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • How to get sales order data in substitution of fi-docu from GM posting ?

    How to get sales order data in substitution of FI documents from goods movement posting?
    When I posting a material document with movement type "501E", the system will creating a FI document automatically. And I need to get the sales order data in the substitution of FI document.
    I tried to export the data of the material document in user-exit "MB_CF001 Updating of material document data upon posting", but this user-exit does not triggered in the posting process at all. what's the problem?
    Do you have better solution or idea for this? Please help me. Thank you!

    Hello Harish,
    Please use BAPI_BUSPROCESSND_GETDETAILMUL to read details of sales order. This works as a remote enabled counterpart of CRM_ORDER_READ.
    Similarly if you want to display sales order from R/3, use FM BAPI_BUSPROCESSND_DISPLAY.
    Regards
    Kaushal

  • 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.....

  • How to Split 1 Order into Multiple Deliveries based on Partner Function ?

    Hello,
    How can I split one Sales Order into multiple deliveries, based on the partner function "managed by" ?
    The requirement is that one order will be created for different "managed by".
    If partner function "managed by" is same at line item level in order, than the items having same "managed by" can be combined in one delivery, else delivery will split and multiple deliveries will be created from 1 Order.
    Jatin Mistry

    Hi,
    You need to create a new requirement in tcode VOFM for that, together with your ABAP consultant. This requirement will be used in copy contol.
    http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
    MdZ

  • Can't combine Sales Orders into One Delivery

    A customer has started sending us 850's for their products.  Each 850 creates a new Sales Order from the ORDERS IDoc.
    We can not combine two different Sales Orders into one Delivery even if all the data is identical other than the Order Number itself.  The Error Message is VL067.
    The log reveals that the only data difference is the Address number.  Each time a new Sales Order is built SAP creates a new Address Number even though the customer is the same, and then it won't let you combine those two Sales Orders into one Delivery because the Adderss Number is different.
    We either need to make SAP stop creating a new Address for the same Customer, or we need to make SAP ignore the difference in Address Number when combining them into one Delivery.
    Any ideas?

    Hello Shiva,
    My apologies - I am too focused and forgot to say thank you for your tip.  I appreciate your time.
    I have discovered that the address check is only made if the value of ADRDA in VBPA is B or E, which both mean that the address was manually entered - actually, it came in via IDoc.
    Does anyone know how to control that value so it is not B or E?
    Thanks in advance.

  • How to copy Sales Order to A/R Invoice (or at least set the BaseRef)

    Hi, currently if I need to 'convert' a Sales Order into A/R Invoice, I have to do it via the SAP application directly. What I'm trying to achieve is to automatically do it via an EXE application (I have one ready for other purpose -> connect to SAP via DI).
    So far I know how to create a new A/R Invoice and close the Sales Order, but the problem is that I can't 'link' the Invoice to the original Sales Order (ie. the BaseRef field). Is there a way to do it?
    Furthermore, is there any easier way? ie. simply call a 'copy' method or something else, instead of writing the same information (field by field) from Sales Order to Invoice?
    Please advise.
    Thanks.

    Hi Afandi,
    This will solve your problem
    Private Sub CreateInvoice()
            ' init the invoice object
            oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oInvoice.CardCode = cmbCustomer.Text
            Dim sNewObjCode As String
            Dim i As Integer
            ' Get last added document number (the order that was added)
            oCompany.GetNewObjectCode(sNewObjCode)
            ' this loop adds the different items to the invoice object
            i = 0
            Do
                oInvoice.Lines.BaseEntry = sNewObjCode
                oInvoice.Lines.BaseLine = i
                oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
                oInvoice.Lines.TaxCode = TableLines.Rows(i).Item(4)
                i += 1
                If i <> TableLines.Rows.Count Then
                    oInvoice.Lines.Add()
                End If
            Loop Until i = TableLines.Rows.Count
            ' Try to add the invoice object to the database
            lRetCode = oInvoice.Add()
            If lRetCode <> 0 Then ' If the addition failed
                oCompany.GetLastError(lErrCode, sErrMsg)
                MsgBox(lErrCode & " " & sErrMsg) ' Display error message
            Else
                cmdInvoice.Enabled = True
                MsgBox("inv Added to DataBase", MsgBoxStyle.Information, "Order Added")
            End If
    Mohamed

  • How to update sale order haeder conditions

    hi
    how to update header conditions using sale order bapi ' create from data 2'.
    regards
    Siva Shanmugam.A.V.

    u can use  'BAPI_SALESORDER_CHANGE'
    and see the following link
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
    Edited by: krupa jani on Nov 25, 2008 11:15 AM

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • How to copy sales order item text in to purchase requisition

    Hi Experts,
    We enter text for the sales order items in the sales order item details.
    we have done settings for the purchase requision to copy text from sales order into purchase requisition and this works for purchase requisitions automatically created from sales order.
    we need to get text from sales order to be copied in purchase requisitions which are created by converting the planned order.
    we have tried SPRO settings SPRO->Materials Management>purchasing--->text for purchase requisition.
    but this settings does not works for Pur Req. created by converting the planned order.
    is this because planned order does not have segment for text like sales order and purchase requisition?
    Please let me know if it is possible through standard SAP or with the lease development, any help will be appreciated.
    Thanks
    Anand

    Hi Rajesha,
    Thanks for your reply, some of the items in sales order are procured externally by us and our customer maintains text related to price and specification in the item details of the sales order, MRP creates planned order for these materials and these planned orders are always converted in pur requisition, we want that text from the sales order item details should be copied in to the purchase requisitions converted from planned orders.
    is there any user exit which can be called at the time of saving a purchase req or user exit for converting planned order in to pur req.?
    if there is any such exit available, then I think I can read the pegged requirement of the planned order where sales order item will be found then read the text in the item then copy this text in pur req then save pur req may work.
    but this will be a bulky development, please let me know if we can shorten the development.
    Thanks again
    Anand

Maybe you are looking for

  • Subquery in a Materialized View

    I have a requirement where we have to build a summary view to show a customer's latest transaction. There can be several million customers so I am thinking if a Materialized view that gets refreshed once every day is a good option here. This is a Dat

  • Error Message When Opening Interactive Demand Planning

    Hello Experts, I have one user who is receiving the following error message when trying to open Interactive Demand Planning Workbook.  Only one user is experiencing this issue.  Has anyone run into this before?  GP: Graphics product not available in

  • Word document to pdf conversions

    We have an application written in delphi. We need to develop an automated process to convert word documents to pdf format. I was wondering what was the best way to do this. Thanks.

  • Add Yosemite Mac To Windows Domain

    What are the steps I need to follow to add a Macbook Air with the latest version of Yosemite to a Windows 2008 r2 domain? I have gone through the directory utility and set up DNS etc. but when I log out to the login screen the wifi does not connect a

  • Is there a fix for a slow response when pressing stop?

    When pressing stop (either by mouse or pressing spacebar), there is always a one to two second delay before the music actually stops. Why is this? Any fix? I have been using Digital Performer and that always stops on a dime. It is a bit annoying to h