Delivery to Draft Invoice

I would like to copy a Delivery to a Draft Invoice using the DI API.  I haven't found any "copy to/copy from" functionality in SAPbobsCom (like the GUI has).  After it is copied, I will be updating several fields in the Draft Invoice before I save it.
The easiest way I could find right now, is to do a SaveXML on the Delivery, and GetAsXML on the Draft Invoice.
Anyone have other ideas doing this?
Thank you!

Hi Paul,
There are a couple of options for converting a delivery to a draft invoice:
1) As described above you can export the delivery to XML, change the XML (eg by XLST) and then add it back. You may need to change some data in the delivery (eg document date, object type) before loading it back. The XML for a draft document is slightly different to a standard document so you'll need to add the DocObjectCodeEx node to the XML before you load it.
The big benefit of the XML approach is that it can be used to copy all the standard fields and UDFs easily.
2) You can do the same thing through code. Create an instance of the delivery object and retrieve your order using the GetByKey method. Create an instance of a draft document object and then set the properties of the draft object to the values from the delivery. You can step through the lines of the delivery, adding new rows to the draft document as you go. Although there are a large number of fields that make up a marketing document, a lot of them are either not relevant for a delivery or they will default through once you've set the BaseEntry, BaseLine and BaseType values on the row.
The disadvantage with this approach is that it only copies across the fields you've coded and therefore will not automatically copy across UDF values if you add a new UDF field.
Kind Regards,
Owen

Similar Messages

  • Many Delivery Notes / One Invoice

    Hi all,
    We are a business that sends out many truckloads of product, and need to send a separate delivery note with each truck, but we want to send the client only one invoice for this. At the moment the system produces multiple invoices. What is the easiest way to consolidate those invoices into a single invoice?
    Cheers,
    Nick
    B1 8.8 on MS SQL 2008

    Hi Nick.......
    You might be doing Copy To option from Delivery to Invoice. In such case for one delivery only one invoice will will be created. So for multiple deliveries multiple invoices will be created.
    But If you use Copy From Option then you can create One Invoice against  multiple Deliveries.
    Juts Open AR Invoice Directly select Customer and then press the Copy From  Button and then it will give the list of delivery doc and just press Ctrl and select the deliveries one by one against which you want only one invoice......
    This will solve your problem.......
    Regards,
    Rahul

  • Draft invoice and payment terms

    A customer has 30 day credit terms (for example), but when creating a DRAFT invoice the docuemnt date, posting date and due date defaults to todays date. 
    When converting the draft invoice to an INVOICE, the due date remains as today - not the payment terms of 30 days from posting date.
    How can the payment terms be activated to ensure correct aging of the invoice?
    2005A PL23

    The 'due date' appears as soon as the Customer is selected in Invoice not while saving as 'Draft'. The due date is based on the 'Payment Terms' set in the 'BP Master Data'.
    I request you to check if the 'Due Date' is set properly before saving the document as draft. It should be as per the payment Terms of the BP. If not check the Payment Terms of the BP.
    I have checked this feature with SAP B1 2005B PL: 38 and works properly.

  • Problem with PRC Generate Draft Invoice

    Hi
    PRC Generate Draft invoice does not generate an invoice for select customers. Receive the "No Eligible Expenditures or Events"
    message - however there is a valid manual billing event created. Validated
    that all prerequisite information has been completed - project setup, agreement
    funded, budget baselined, amount within customer credit limit, customer active,
    etc. This process works fine for some customers but not others - it does
    appear to be customer specific, not project specific.
    Performed the following steps:
    1) Created manual billing event - bill amount populated ONLY
    2) Ran PRC:Generate Revenue for a Single Project - no revenue since bill amount only
    on event
    3) Ran PRC: Generate Revenue Accounting Events - no revenue event since bill amount only
    4) Ran PRC:Create Accounting - no accounting transactions created since no revenue generated - bill event only
    5) Ran PRC:Generate Draft Invoice for a Single Project - ran this individually for
    each project.
    For the customer thats working we get the below in the log file :-
    ...Checking Number of Customers#1
    ... Checking for Number of Active Bill Customers #1
    ... Checking for Number of Active Ship to Customers#1
    ... Checking Number of Active Customers#1
    Going to check relation()
    Checking for active bill to address
    Checking for active ship to address
    ...Checking Billing Contact For Cust #11637
    ... For Bill Cust #11637
    ... For Ship Cust #11637
    ...Checking Relation - 1
    ...Validated bill to customer -
    ...Validated ship to customer - ...Customer #11637 is paying for 100% of this event.
    Entering paifai()Current system time is 03-MAY-2009 14:37:45
    For Customer for which it doesnt work it show the below in the log file :-
    Checking Number of Customers#1
    ... Checking for Number of Active Bill Customers #1
    ... Checking for Number of Active Ship to Customers#1
    ... Checking Number of Active Customers#1
    Going to check relation()
    Checking for active bill to address
    Checking for active ship to address
    ...Checking Billing Contact For Cust #11070
    ... For Bill Cust #11070
    ... For Ship Cust #11070
    ...Checking Relation - 1
    ...Validated bill to customer -
    ...Validated ship to customer -
    Leaving paigaa.Current system time is 03-MAY-2009 14:45:41
    paiend -No of events updated with billed flag is 0
    Can someone throw some light.

    Hello,
    You can check the things below :
    1. Check the Hard Limit. The hard limit setting may be preventing the invoice from
    being generated. To check this,
    1. Navigate to Billing -> Agreements.
    2. Query the agreement for the customer and project you are having
    difficulties with.
    3. If the HARD LIMIT box is checked this could prevent the invoice from
    generating. Uncheck the HARD LIMIT setting.
    4. Save your changes.
    5. Resubmit the PRC: Generate Draft Invoices process.
    2. If Customer on Top task, then check whether the 'Ready to Bill' for the specific Top Task in the Control Billing by Top Task window.
    Thanks,
    Sathish
    www.projectsaccounting.com

  • Not able to Interface Draft Invoice to AR

    Hi,
    We have one Draft Invoice which is Approved, Released, and AR Period also open and Remit-To-Address also defined but we are not able to Interface it to AR.. Could you please tell me what could be the reason.
    Thanks
    Bharath

    Hi Dina,
    Thanks for your reply, Project, Customer and Project Manager are Active not end dated & Log file also not showing any reasons.
    Could you please tell me anything else I have to check to resolve this case
    Regards
    Bharath
    Edited by: 983186 on Jan 23, 2013 9:44 PM

  • Print all delivery number on invoice print out

    Hi ,
    When we create a  invoice against two delivery only one first delivery number shown on invoice ?
    but my client want to print all delivery number on invoice print out.
    can you please guide me how to provide it coz only one delivery print .
    Regards,
    Aditya

    Hi Adhithya,
    Ask your Developer to add all the Deliverys under the billing form need to print in the billing
    give him the logic VBRK-vblen go toVBFA pass the VBLEN pick all deliverys display in the billing form.
    which need to add in the out put type.
    Thanks...

  • Delivery Date in Invoice Form

    Hello, has anybody an idea how to print the Date of the delivery in the invoice? This is necessary in germany. I did´t find an variable in INV1 or in OINV. Am i blind again, or must i create an userfield in the Invoice?
    thanks

    Hi Andre!
    It's not so difficult to implement your task.
    1. write an query to retrieve ShipDate from Delivery
    it could be like following lines:
    [code]     IF $[INV1.BaseType] = 15
              BEGIN
                   SELECT
                        T0.DocDueDate -- <i>or T0.DocDate</i>
                   FROM
                        ODLN T0
                   WHERE
                        T0.DocEntry = $[INV1.BaseEntry]
              END
         ELSE
              BEGIN
                   SELECT $[OINV.DocDate]
              END[/code]2. Create UDF for Invoice matrix
    3. Link the Query to that field (autoexecuting on ItemCode column)
    That's it!
    Hope it'll help..

  • Error at Draft Invoice

    Invoice rejected in oracle the reason for rejection is invoice line with the same invoice number have been separated by the grouping process, causing duplicate invoice number.

    Hi,
    We operate in Oracle 11i and the error message I get is in Project Accounting, Draft Invoice Review Page. The error is: Invoice rejected in oracle the reason for rejection is invoice line with the same invoice number have been separated by the grouping process, causing duplicate invoice number.

  • Change Picking data, then call Delivery Note and Invoice in the background

    I have designed a GUI where the picking data (from table LIPS) is changed.  Now my SD consultant wants the program, when a SAVE or CONTINUE button is clicked, to do the Delivery Note and Invoice in the background.
    To quote:
    Your progrm must change the values in the delivery in txn VL02n, when the delivery is saved it updates LIKP and LIPS amongst othr tables. When the invoice / billing doc is created it is done with ref to the delivery. Billing doc created using txn VF01, the main tables of the billing doc are VBRK (header) and VBRP (item).  And for completion sake, tables VBAK and VBAP are the sales order tables!
    In my PAI module, how do I do the calling of these two functions?
    The consultant suggested I use a BDC. Why can't I use Call Transaction.... ?   What is the best way to do this?
    At the moment, my SAVE button updates an internal table of LIPS, and for test purposes it exits to List Processing to test if the amounts changed correctly.
    Hope someone can help.

    Hi
    Ok.
    Do you mean "Accual GI Date" in Item overview ?
    I have performed a test. When I check "Goods Issue delivery" indeed it has posting date in the past.
    Now for the invoice:
    I set
    "Billing date"
    "Serv. rendered" date
    and "Prining date" in the past.
    Would it be enough to post everything in the last month ?
    regards
    Rafal

  • How can we get Delivery Slip and Invoice number for the SO in custom Report

    Hello,
    I am developing a new report for the Sales Order.For this , I have to diplay the Deliver slip and Invoice number.
    Could you please explain the logic for this.
    Thanks and Regards
    NTR

    Hi,
    Pass sales order number to table VBFA-VBELV. You will get the complete doc flow. VBTYP_N differentiate whether it is delivery,GI or invoice etc. (Check for domain values for more info on this)
    Thanks,
    Vinod.

  • Create multiple delivery with one invoice

    Hi all,
    can you tell me how to do multiple delivery with one invoice,
    i tried in vf01 by giving their my 3 delivery nos but it is generating three invoices
    pls explain this in details
    points will be rewarded
    regards,
    smmmmmm

    Dear Sameer
    As per your requirement run the Tcode VF04 (Billing Due list) and select the Delivery Documents for which you want to to have single Billing Document by clicking on Collective Billing document/Online  Push Button in that screen.
    To Have Single Billing Document for Multiple Delivery you need to have Payer,Terms of Payment,Incoterms(part 1 and part2) same for all materials orelse the billing document will split and this split analysis is visible during creating of Billing document.
    Hope this will help you in solving your problem.
    Regards
    PSH

  • To Flag PO for final delivery or final invoice if contract expires

    HI Experts,
    whenever the validity date of outline agreement is expired and there is a PO created with ref to the same Outline Agreement, the system does not allow to flag for the final delivery or final invoice for the PO, so that there can no further processing for the PO.
    We just want only to close the PO (by setting flag final delivery or final invoice).
    Please advice
    Lipika

    HI,
    When Purchase order is created with reference to contract, system carry
    out the check whether Document date of PO should be within contract
    "validity start" and "vaidity end" date. If document date is outside
    the "validity start" and "validity end" date of PO, message 06 040
    "Validity period of contract does not start until &" or message
    06 041 " Validity period of contract expired on &" is raised.
    Same check is also carried out during any change in PO (txn ME22N).
    Please use one of following option to close the PO.
    1. Change the category of message 06041 as warning in customization.
    Txn OLME.
    Environment Data -> Define Attributes of System Messages ->System
    Messages
    2. Change the validity end date in contract and close the Purchase order. Validity end date can be reverted.
    BR
    Nadia Orlandi

  • How to get data from ECC --- Sales Order,Delivery,Transfer Order & Invoice

    Hi,
    Good day.
    I'm ABAPer and I need to get Sales Order,Delivery,Transfer Order & Invoice data from ECC.  The said data will be displayed in the custom form that I need to create.  How exactly do i get the said data above? 
    Can I get them in the tables avaialable in GTS? Where?
    Or do I get the data directly in ECC? How?
    Thank you very much!
    Best regards.
    Brando

    First of all push ECC data in to GTS server through T.code:/N/SAPSLL/MENU_LEGALR3. First click on Master data tab there enter customer/vendor number then execute.
    2-Go to document tab there enter Sales order no/PO number then execute it.
    Then go to GTS server in compliance management module you can get all the information.
    Regards
    Sitanshu Panigrahi

  • Create draft invoice document from a sales order

    When i create an invoice document from a draft invoice document from a sales order, this invoce is linked to the order sales.
    Sorry for my english, i hope you can understand

    It would be difficult to know what question do you have.  Try to ask question.  Your English is not bad at all.
    Thanks,
    Gordon

  • Multiple delivery into One invoice

    Dear All
    Issue regarding multiple delivery into one invoice
    1 When i am creating multiple delivery doc into one invoice, its possible for domestic[local sales] but when i am creating multiple delivery doc into one invoice for export it is not possible.
    I have checked with the threads and tried it out with copy control with VBRK/VBRP [001/003/004]
    Is there any specific customization for exports?
    Regards
    Sandeep Bhowmick

    Dear Lakshmipati
    As per your instruction i have done the split analysis:
    split analysis:
    Split due to different header data
    Field Name                           :$00000001           $00000002
    Number of foreign trade data      : 0000000266         0000000267
    The invoice is generating against one delv document, it could not be combined. In copy control any changes i have to make
    Regards
    Sandeep Bhowmick
    Edited by: Sandeep Bhowmick on Jan 17, 2009 7:33 AM
    Edited by: Sandeep Bhowmick on Jan 17, 2009 7:34 AM

Maybe you are looking for

  • YouTube Issues: Pitch Black Video Screen! Am I the Only One?

    Just recently I have experienced a complete inability to view videos on YouTube. Everything loads just fine on the page *except* the actual video to be watched. In its stead there's just a pitch black rectangle, but nothing else. I have tried finding

  • Dynamic Format mask for attribute in a JTable

    I've a JClient app. I need to define format and color of a field at runtime depending on some row informations. I've the same problem in a Form and In a JTable. Could someone suggest how can I do that ? TIA Tullio

  • How to put java files in  *.jar

    I have 5 *.java files in 1 directory. I want to put those 5 classes in a *.jar file without using some special tool. How is the best way to do that. It is something with the command prompt? All help welcome. Grtz Lehtori

  • Mysterious warning triangle in my project

    I suddenly have one of those orange warning triangles on my project name in the event browser.  Now I know that usually means that there is some missing media, but in this case, there are no files in red (which is what missing media looks like).  Whe

  • Report Building - Gross Margin

    I'm looking for a way to duplicate the margin analysis report in the cost management module of Oracle. However I would like to add extra information like backlog, etc. I want a report to show me all orders (open and closed). If it is open then I woul