Copy Sales Order to A/R Invoice

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,
If you need discuss about DI programming, it is better post it on SDK forum.  In this forum, you may discuss about achieving it by DTW.  However, I don't think that has any time benefit for this task.
Thanks,
Gordon

Similar Messages

  • Routine for copying sales order header text to invoice

    Hi friends,
    My requirement is to copy header texts from sales orders when creating an invoice (VF01). In T-Code VOTX the system suggests two routines :
    1 - DATEN_KOPIEREN_01 include LV45TE01
    2 - DATEN_KOPIEREN_02 include LV45TE02
    Does anyone already use one of these routines? When invoicing more than one sales order does the routines work fot this case ?
    Best Regards.

    Hello.
    .....goto transaction VOFM
    Menue: Copying requirements -> Billing documents
    ...or maybe: Data transfer -> Billing documents
    Put a break-point and the header routine......for long-text you should use transaction VOTXN
    Edited by: Erik Hoven on Feb 24, 2009 12:28 PM

  • 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

  • Request: "Draw Document Wizard" when copying from Sales Order to A/R Invoic

    Hi Colleagues
    Our clients complain about not being able to choose the exchange rate from the base document when copying the Sales Order to A/R Invoice.
    The "Draw Documents Wizard", where you can choose this option, starts only when you're in the "A/R Invoice" form and copying data from the Sales Order. But "Draw Document Wizard" doesn't start when you're in the Sales Order and copying all its data to an A/R Invoice, and they use only this sequence.
    Is it possible to add the "Draw Documents Wizard" for the "Sales Order -> A/R Invoice" chain in one of the next versions of SAP BusinessOne 2007?
    Thanks!

    Hi,
    is this happening for perticuler user or for all users.?
    check any addon is running ,If yes stop addon and check again this activity.
    Check general authorization too for perticuler user..
    Hope it will help you.
    Regards
    Deepak Tyagi

  • Sale order 'value changes' after invoice creation

    Experts,
    A sale order was created / shipped / invoiced. The invoice did not go to accounting because of credit auth error. We have a procedure to fix it and then release it to accounting (transaction VFX3). All OK until this point.
    While fixing the auth error, an user changed the freight condition value in the sale order. Then invoice is released to accounting. Now, the value of freight in order and invoice match. How is it possible to change the value of an invoice after its creation?
    Any input would be appreciated.
    UV

    when the value is changed in the sale order, it would automatically transfer
       the new pricing to the existing open SD invoice pending accounting entry??
    Certainly not.  The control is in VTFL where if you select the billing item category for the combination of your delivery type and billing type, you can see a field "Pricing Type".  If you maintain any value other than "B", system will copy the price from sale order to billing and you can, as I said above, can change manually in billing.  On the other hand, if you have maintained "B" in the above field, system will not  consider sale order price but will check your pricing condition maintained in VK11 which you can check in VK12 or VK13.
    thanks
    G. Lakshmipathi

  • Return sales order( with ref. to Invoice) need to have less quantity

    Hi Friends,
    Here one issue is coming while creating a return sales order with ref. to  invoice.
    Example is:
    In original invoice an article X is of price 10 having 10 quantity and hence total price 100.
    but now customer wish to return only 5 articles and creating this Retun sales order with refernce to this invice
    now in return sales order quantity is coming correct i.e 5 but the amount is still the same i.e 100.
    But this should be 50( 5*10).
    Please can someone help to find the reason why the price is not changing while quantity is changing.
    I have already check the copy control but there also setting seems to be correct.
    Also when i try to update the pricing via condition tab the price got changed. but that is manually.
    Thanks
    Punit.

    Thanks Jignesh,
    But can you please tell which pricing input should be the best.
    As "price redetermine" option can't be selected as price keep changing.
    also i did that for "same price and redetermine tax" but doesn't seems to be working.
    Please if you can suggest any option where the price of the article will be same (the old one when article was sold) as proportionate to quantity without redetermining the price.
    like article x has qty 10 and price 10 hence amount 100
    but later price of article change to 11
    then if i chose redetermine price then for five article this will be 55 which is again wrong( it should be 50 as at the time of sale the price was 10)
    Hope I made the issue clear enough. Which setting in pricing one can recommend.
    Regards
    Punit
    Thanks

  • Sales Orders Report which are invoiced

    Hi gurus,
    I want to take a report of Sales orders which are invoiced. Its order related invoice.
    Eg.
    from 01.04.2008 to 30.04.2008 I created 120 Sales orders, out of 120 i created invoices for 80 Sales orders. Now i want the report of the Sales orders(80) which are invoiced. How can we get this report.
    In VA05 Report we can find out open & all sales orders, but we cant find this report. other than this any report is there, please let me know.
    Cheers,
    Sumith

    Hi,
    1. You can use VA05, to find out the list of orders out of those 120 orders which are not yet invoiced. Thus you will know the invoiced orders.
    2. In this way, go to table VBAK to get the list of 120 orders you have created.
    Give these 120 orders in VBUK table as preceeding document adn find the follow on documents which are of document category M. This will give the list of orders adn the invoice numbers created for them.
    Now the rest of the orders are open orders.
    Hope thsi helps you
    Pls reward if it helps you

  • Sales Order/A/R Reserve Invoice & Inventory Transfer

    Hi
    Suppose I have 2 warehouses A and B. A has 3 units of a particular good and B has 6 units of that same good.
    I understand that if I want to create an A/R invoice for a sale of 7 units of the good, I have to transfer 1 unit from A to B or 4 units from B to A before the tax invoice can be created. Does this requirement to have the stocks in one warehouse also apply to an A/R reserve invoice? Can I create an A/R reserve invoice for 7 units of the good before the transfer is performed?
    My second question is this.
    A sales quotation may be created when the required goods are in different warehouses. Can I create a sales order with the required goods still in different warehouses?
    Thank you for your patience with my questions as I am new to SAP B1 and do not have access to a test system at the moment.

    Hi,
    Only Delivery or normal invoices are related to inventory. For Sales Order/A/R Reserve Invoice, you do not need Inventory Transfer.
    Thanks,
    Gordon

  • System should Not copy sales order header text

    Hi all,
    My requirement is system should not copy sales order header text while copying sales order to sales order with same order type.
    for example i have order type OR - standard type with 500 line items with reference to that same sales order we are creating another order with same line 500 line items,but requirement is system should not copy source document header text in to target document header text,
    Do you have any standard functionality to avoid this or we need to go exit
    Regards
    Nishad

    Hi,
    You can do it via standard SAP configuration.
    Transaction VOTXN.
    In the access sequence you have the corresponding Text ID added with "Text Object" VBBK. That's the reason why you are copying text.
    Change the entry.
    Check below link on how exactly to do that. This doc says about how to copy customer text to the sales order. But procedure is same for you as well. Just the object is different.
    [Text type config|http://learnsaptips.blogspot.com/2010/09/text-type-configuration-in-sap.html]
    Hope it helps!
    Best regards,
    Rahal

  • Required Copy Sales Order using API

    Hello Everyone,
    I got a requirement to copy a sales order using API. Did anyone tried this?
    If possible give me API name or the script.
    Thanks in advance.
    Thanx and Regards,
    Akil

    These might be helpful to you.
    1. OEOIMP: Script To Populate Order Import Interface Tables From Existing Sales Order [ID 436215.1]
    2.http://sriniik.blogspot.in/2010/05/copy-sales-order-book-order-sales-order.html

  • Sales orders that have been invoiced are still in the Billing due list

    Friends :
    We have  sales orders that have been invoiced are still in the Billing due list. When i look at sales orders it has 0.00 price.
    The error message is
    Billing not possible because repair is not yet completed
    The item is not relevant for billing
    The item has been fully invoiced already
    Full pints will be given.
    Van bills

    Hello,
    I believe these are repair orders, and invoices through order related billing. Check the incompletion log in the order, check whether the repair is complete. Go to the order VA02 --> Order ---> Environment --> Status. You may know the over all status of the document. Check for the billing status, if the billing status is not invoiced, then you need to generate invoice or Reject the line item.
    Prase

  • Copy Sales Order Plant in Header to all items

    HI,
    can anyone tell me how to copy sales order header plant down to all items.  I looked in sales order maintain settings and can't config here.  Thanks in advance for your assistance.
    Stacey

    These were the first things I  checked when the issue started happening and have not found the source of the issue, all of the orders I checked. 
    1º  Customer Material Information (Info-Record) (sold-to/material)
    2º  Customer Master Data > Ship to Party
    3º  Material Master Data
    the issue is that the rush orders are intermittenly incomplete for some items missing plant.
    They have had different ship to's, sold to's and different materials on each order that has had the issue.  I have checked each one that is incomplete and it has the plant in the material master, the plant has been in the customer material info record, and the customer master data ship to party as well as in the material master mrp data itself. 
    I have not been able to consistently see a reason that this should occur so for a short term solution I wanted to use a user exit, set config or something to populate the plant in all incoming rush orders so they wont be incomplete.   The rush orders come in and ship the same day, they can't wait for someone to check the incomplete orders and manually populate the plant in the item on the order. 
    thank you for your help and explanations, but do you know where I can add this to user exit or something to fix short term always have the same plant in all items on this order type?
    Stacey

  • Linking Sales Order to A/R Invoice

    Hi Folks!
    Good Day!
    My concern is somewhat related to this previous thread: [linking AR Invoice to Sales Order;
    I'm running a query but unfortunately it returns multiple results of one result. I mean the result duplicates or even triplicates. I know that the contruction of my joining of tables is the reason. Can you help me to arrange my tables and their linking? thanks
    My query goes like this:
    SELECT T0.[DocNum], T0.[CardCode], T0.[DocDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[U_FREE], T3.[DocNum], T3.[DocDate], T2.[Quantity], T1.[OpenQty], T1.[OpenQty]* T1.[Price] AS Amount
    FROM [dbo].[RDR1]  T1 INNER JOIN [dbo].[ORDR]  T0 ON T0.DocEntry = T1.DocEntry INNER JOIN [dbo].[INV1] T2 ON T0.DocNum = T2.BaseRef INNER JOIN [dbo].[OINV] T3 ON T2.DocEntry = T3.DocEntry 
    WHERE T0.[DocStatus] ='O' AND  T0.[DocDate] BETWEEN [%0] AND [%1]
    My query will display the mentioned fields with the condition of Open Status and belongs to the period inputted.
    Thanks and regards,
    Fringe

    Hi Fringe,
    I believe in your context, there is a possibility one Sales Order fulfilled by more than one Invoice isn't it? This is actually a logical result, considering that you want the query to display Invoice number also.
    SO 1001 :  ItemA - 25
    SI (Sales Invoice) 3001 : ItemA - 10
    SI (Sales Invoice) 3002 : ItemA - 8
    The result should be like this:
    Doc No - Item Code - Qty - Open Qty - Invoice - Qty Invoiced
    1001 - ItemA - 25 - 7 - 3001 - 10
    1001 - ItemA - 25 - 7 - 3002 - 8
    The problem is, you want the query to display invoice number. Since a Sales Order could have a link with more than one invoice, of course your query will display ItemA with open quantity valued of 7 having duplicate rows. If there are 5 Invoices linked with the SO, and the SO status itself not yet closed, the row will be 5 also.
    There are 3 ways to overcome this problem:
    1. You create two separate query for two different purpose. The first one you only create a list of outstanding Sales Order without displaying the invoice number, thus, the result shouldn't be duplicate. The second one, you create a query which join the RDR1 table with INV1 and OINV table, which act as a summarize of which SO correspondence to which Invoice.
    2. You use Crystal Report. Therefore, you could grouping the result based on Sales Order.
    3. You create a rather complicated query, which concatenate Invoice number as a string in one field, instead of displaying Invoices number in multiple rows.
    1001 - ItemA - 25 - 7 - 3001, 3002 - 10, 8
    Best Regards,
    Hendry Wijaya

  • Sales order detail in AR invoice

    Hi,
    I want know Sales order details like SalesOrder No, Sales Order Value. Total Sales Order Qty in AR Invoice PLD screen. Please help how can i retrieve the information.
    Thanks in advance.
    Rajesh

    Rajesh
    Expanding to what Kamlesh has replied.  Adding Sales Order fields to the Invoice PLD would require a bunch of formula fields and the results might not be all that perfect.
    So as Kamlesh mentioned, create the UDF's you need for each data component you need from SO in the Marketing document rows.
    To these UDF's at the Invoice rows add SQL based formatted searches which will fetch the values from SO.
    Map these UDF's in the Invoice template.
    Suda

  • When copying sales order, its coming as booked (Using custom workflow)

    Hi,
    While copying sales order using custom workflow, if the source sales order is booked, the new sales order is also coming as booked only.
    But in standard workflow, its coming as Entered. Any idea which parameter I need to check?

    Hi Asit Garg,
    Correct me if i am "X".
    You want to trigger the workflow for two different scenario that is 1. when the sales order is changed 2. when the sales order is created with delivery block.
    For the 1. As you said it is working fine.
    For the 2. sales order created with delivery block.
                 Make your workflow to work like this, Whenever the sales order is created trigger the workflow and at first step check for the condition weather the sales order have the delivery block or not if not terminate the workflow through terminating event if not proceed as you wish.
    Hope it will helps you,
    Regards
    Balaji E.

Maybe you are looking for

  • Report based on Procedure

    Hi All, I have a discoverer report based on a function, function is executed and insert the Data into Global Temporary table. When I try to execute the Function in one Discoverer TAB and Display the Data by SELECTING FROM Global Temporary table in an

  • Can you import music from an itunes from one computer to another?

    can you import music from itunes on one computer to another?

  • How to create a Portlet application in OPM 10.4

    Hello, We would like to create a portlet application. The purpose of creation of such application is to embedded this in the portal. Can we get the pointer on this please?

  • Mitigation Monitor Email Notification

    Hi experts, When the mitigation monitor doesn't run the report for a specific period of time, or anything changes in the assignation period, then he gets a alert notification. can any one please tell, where it is defined like 1. what are the workflow

  • Slow Motion Problems With Twixtor Pro in AE CS5.5

    Hello forum! I recorded some footage at 1080p and at 60 fps. My shutter speed was 1/1000 and the ISO was 3200. After importing my footage and applying twixtor pro to a solid and setting the color source to my footage, i get a lot of ghosting effects.