Pro forma invoice from a Delivery Output using "8 - Special Function"

SAP Gurus
I am interested to create a proforma invoice for a delivery that is created in the system using VL01N. I am using an option to use the Delivery output to be allow creation  of the pro forma invoice. I created a new output type and assigned 8 - Special function as the medium of the output.
I managed to find a BAPI that serves this purpose perfectly. Please look at BAPI_BILLINGDOC_CREATEFROMDATA. Enter the following Parameters.
In table BILLINGDATAIN insert one line with the following data:
ORDBILLTYP = ZFDP
REF_DOC = Delivery number
REF_DOC_CA = 'J'
The BAPI when it runs on own, creates the required pro forma invoice. But when it is attached to the output type to be triggered as a special function, does not work. What kind of routine should I enter in the processing routine.
Program on output screen is ZFDP_BAPI
Form Routine is ENTRY
there is a routine maintained inside the program ZFDP_BAPI called "ENTRY"
Inside the subroutine ENTRY, the BAPI_BILLINGDOC_CREATEFROMDATA is invoked.
Please advice.
Thank you.

Hello
Thanks for the reply. Earlier when I was using the BAPI BAPI_BILLINGDOC_CREATEFROMDATA, The BAPI used for the output type did not work as it uses u2018Commit Worku2019 statement and it interferes with the u2018commitu2019 of standard program. Due to this reason the transaction dumps every time.
Are you performing the output with dispatch time '4' ? - the answer is yes, I am.
Just double -checking with you that if you decide to use Use BAPI BAPI_BILLINGDOC_CREATEMULTIPLE and call it in background task, do you think that the we can get past this issue short dump issue? 
Thanks

Similar Messages

  • What are customizing steps to create pro forma invoice from STO delivery?

    I have copied FUPI output for pro forma invoice billing type F8. I tested and was able to successfully get it to work for a regular delivery that was created from a standard sales order.  However, I need this to also work for a stock transport order created delivery but I keep getting the error that the item is not relevant for billing.  I have searched the web for 2 days and did find one posting that was exactly the same issue that I have and the person asking the question said they solved the problem but did not provide the answer as to how.
    I tried changing the item category NLN billing relevance to D from a J and that did not work either. I need the pricing to print on the pro forma invoice also.  On a standard sales order created delivery it works like a charm.
    this is what I hope to accomplish - create sto - create delivery from sto - create pro forma invoice for customs 
    Any help would be greatly appreciated.
    thanks in advance
    Donna

    Hi
    In VOV7 the billing relevance for  item category NLN should be  maintained as A (delivery related billing)
    Then you need to maintain copy controls  in VTFL between NL to F8
    In copy controls at header level copying requirements should be 009
    At item level for item category NLN copying requirements should be 010
    Pricing is picked from the OVKK settings that is for your sales area, CPP as the receiving plant is the customer, and DPP from the billing type of F8 For this combination you need to maintain Pricing Procedure
    In VTFL At item level for item category NLN the pricing type should be B
    If you need to maintain this settings you can create F8 proforrma invoice in intra comapny STO
    Regards
    Raja

  • Wrong payer value while creating PRO FORMA invoice for multiple delivery

    Hi experts,
    I am trying to create PRO FORMA Invoice for multiple deliveries thru VF01.
    The problem here is the payer value is copied as the value of payer for the first delivery to all invoices. All other fields are picked up properly.
    Please help me to idenify the problem. Also if I create the invoices thru VF04 the invoices the created with correct payer.
    Thanks in advance.

    Hi Ankur,
    Thanx for the input.
    Right now we have customized routine 909 for header level and std. routine 004 for item level.
    Code for routine 909 is
    FORM BEDINGUNG_PRUEFEN_909.
    SY-SUBRC = 0.
    Fakturasperre
    IF LIKP-FAKSK NE SPACE.
    SELECT SINGLE * FROM TVFSP WHERE FAKSP = LIKP-FAKSK
    AND FKART = TVFK-FKART.
    IF SY-SUBRC = 0.
    PERFORM VBFS_HINZUFUEGEN USING '000000' '014' SPACE SPACE SPACE.
    SY-SUBRC = 4.
    EXIT.
    ENDIF.
    SY-SUBRC = 0.
    ENDIF.
    break-point.
    SELECT * FROM VBFA WHERE VBELV = LIKP-VBELN.
    IF VBFA-VBTYP_N = 'U' .
    PERFORM VBFS_HINZUFUEGEN USING '000000' '148' LIKP-VBELN
    SPACE SPACE.
    SY-SUBRC = 4.
    Insert + Unicode/Upgrade Project
    STOP.
    LEAVE SCREEN.
    Insert - Unicode/Upgrade Project
    ENDIF.
    ENDSELECT.
    ENDFORM.
    can u please check n confirm if the wrong value is coming due to this code?
    Thank in advance.

  • Creating Invoice from a Delivery Note using SDK

    Hi,
    I am working on SAP 2005 A Patch 4 with SQL 2000 SP 4. I am using VB.NET (VS2005). I am trying to create a Invoice from a Delivery note which is created based on a Sales order.
    I am getting the following error
    Error occured while saving Invoice: 0 - '15' is not a valid value for field 'BaseType'. The valid values are: '-1' - '',  '0' - '',  '23' - 'Sales Quotation',  '17' - 'Sales Order',  '16' - 'A/R Returns'
    The Code that i used to create the invoice is as follows
    Dim oInvoice As SAPbobsCOM.Documents
            oInvoice = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oDelivery = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
            Try
                If oDelivery.GetByKey(iDlvNo) = True Then
                    sTaxCodes = sTaxCode
                    oInvoice = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                    oInvoice.CardCode = oDelivery.CardCode
                    oInvoice.SalesPersonCode = oDelivery.SalesPersonCode
                    oInvoice.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
                    oInvoice.DocumentSubType = SAPbobsCOM.BoDocumentSubType.bod_None
                    oInvoice.Address = oDelivery.Address
                    oInvoice.ShipToCode = oDelivery.ShipToCode
                    oInvoice.Address2 = oDelivery.Address2
                    oInvoice.JournalMemo = "Invoice - " & oDelivery.CardCode
                    oInvoice.Comments = "Based on Delivery  " & oDelivery.DocNum
                    oInvoice.PaymentGroupCode = oDelivery.PaymentGroupCode
                    oInvoice.DocDueDate = Now.Month & "/" & Now.Day & "/" & Now.Year
                    For iRowNo = 0 To oDelivery.Lines.Count - 1
                        If iRowNo > 0 Then
                            oInvoice.Lines.Add()
                        End If
                        oDelivery.Lines.SetCurrentLine(iRowNo)
                        oInvoice.Lines.ItemCode = oDelivery.Lines.ItemCode
                        oInvoice.Lines.Quantity = oDelivery.Lines.Quantity
                        oInvoice.Lines.Rate = oDelivery.Lines.Rate
                        oInvoice.Lines.BaseType = SAPbobsCOM.BoAPARDocumentTypes.bodt_DeliveryNote
                        oInvoice.Lines.BaseEntry = iDlvNo 'DocEntry of Delivery Note
                        oInvoice.Lines.BaseLine = iRowNo
                        oInvoice.Lines.TaxCode = sTaxCodes
                    Next
                    iReturnValue = oInvoice.Add()
                    If iReturnValue <> 0 Then
                        pcompany.GetLastError(iReturnValue, sErrorDescription)
                        Throw New Exception("Error occured while saving Invoice: " + _
                                           iErrorNo.ToString() + " - " + sErrorDescription)
                    Else
                        MessageBox.Show("Invoice created succesfully")
                    End If
                End If
    Since in the error message it has specified that i have given the BaseType as Delivery which has a value of 15 i changed that from bodt_DeliveryNote to bodt_Order which has a value as 17.
    When i tried creating the invoice again it gave the error
    Error occured while saving Invoice: 0 - Target item number does not match base item number.  [RDR1.TargetType][line: 2]
    I am not able to proceed further ... can any one help me
    thanks in advance
    Ganesh

    Greetings,
    I am having a similar problem, only I'm doing it as suggested in Louis' reply.  In fact I copied that code and tried it.  It's giving me a 2028 error with no description.
    I had been doing it slightly differently and the error I was getting was 5002 "Item no. is missing [INV1.ItemCode][line 2]"  I don't have 2 lines and I'm certain I have an item code.  The numbers I'm putting in for baseentry & baseline are absolutely in the table and the order is open.
    Here is that code:
            oDNUpd = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oDNUpd.CardCode = CardCode.Text
            oDNUpd.Lines.BaseEntry = CInt(SalesOrder.Text)
            oDNUpd.Lines.BaseLine = CInt(baseline.Text)
            oDNUpd.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
            oDNUpd.Lines.Add()
            lretcode = oDNUpd.Add
    I'm using SBO 2005 patch 7 (and the new dll).  I have similar code doing a stock transfer and it's working fine.
    Thanks for any suggestions you can offer
    John

  • Packing list and Pro forma invoice

    Dear Experts,
    Can i print a Pro Forma Invoice from the Sales Order (before delivery) ?
    Can i print the Packing list without making handling units (the materials comes in Cartoons) ?
    Thanks for your time

    Hi,
    For both, yes.
    To print order related proforma invoice, in t.code VF01 select the relevant order related proforma invoice document type and create the proforma invoice. Then you can print it.
    In the same way you can print the packing list in VL02 or VL02N t.code. In VL02N, go to menu Outbound delivery ->Issue delivery output. Here select the output for packing list and print. Printing packing list without making handling unit really depends on the packing list print program.In the program if it is coded to look for handling units, then without handling unit you can't print. Otherwise, you can try.
    Regards

  • Convert Multiple Deliveries into one PRO Forma Invoice

    Hi,
    I need to create a single PRO FORMA invoice for all the multiple deliveries for a single single Customer.
    1. Which Copy control do I have to do it?
    2. Should I do at Header or Item Level?
    3. What are the Config settings required to do this?
    4. What kind of checks to be done in this process?
    I checked the Copy control in SPRO in Pro Form Invoice (F8) for Delivery: Its 009.Looks like this is Header level.
    Thanks
    Kiran

    Hi Shiv ram,
    Thanks for ur reply..
    As per your reply:
    In VF01, enter the delivery documents and click on enter button. Then go to Menu - Environment -> split analysis.
    I didnot find this option in VF01. Am in 4.7EE.
    If the reason is foreign trade data, then I suggest in the copy control (transaction VTFL) for billing document (proforma invoice), put the following values;
    You are right to some extent. Once this Proforma Invoice is created, I need to move this data to GTS system.
    For determine export data - 'B' Redetermine the export data
    For Allocation number and Reference number fields - 'E' - Actual billing document number.
    I didnot understand any thing in this.
    Can you please provide more clearity.
    Thanks
    Kiran

  • Pro forma invoice problems if billing plan is used

    Hello experts,
    i have a problem again with the billing plan.
    To problem now is the pro- forma for following case:
    A billing plan is used for the items in the sales order. only at the end when the delivery gets prepared at the end, the pro forma invoice will be created.
    The billing relevance for the item category is 'I' - with the billing plan type (a partial billing with % used).
    For the proforma the entire value should appear on the Pro forma finally when the manufactured modul passes the customs.
    I am struggling with the correct copy control settings.
    The already billed values do not appear on the PRO Forma - for the 'real bills' it is ok.While creating the pro forma the related message appears in the log.
    Which settings in copy control for the copy control (sales order --> billing type (pro forma) do I need to use if I need to have the entire sales order item value on the pro forma bill.
    all helpfull answers are highly appreciated.
    Thanks a lot in advance
    Kurt

    Hi Kurt,
    If you are using a billing plan say periodic billing plan; then i dont think you will have a delivery created against it. From the order / contract; it would be a billing document.
    If you are planning to use any of the billing plans; then invoices are bound to split based on invoicing dates and the settings of billing plan.
    If you are planning to pull all the parts for the purpose of customs then probably you can plant to develop a new output type that would print the details from the billing document (instead of Proforma from delivery). This new output type will be used for "N" number of billing documents against a sales order / contract in order to capture all the part numbers in it.  So if you have 3 parts in the order and 6 invoices, then the new output would get triggered 6 times and you will end up with 6 prints.
    Making changes to incorpoate billing plan related copy control settings would turn your development / configuration more complex.
    I hope i understood your question correctly.
    Hope this helps;
    Regards,
    Syed Nasir

  • Dynamic layout elements determination logic for output of Pro-Forma Invoice

    This is my requirement below. Please give the suggestion    
    Business requires output to be generated in name of the client, with client logo and scenario specific data elements. To do this in Standard SAP will require to define hundreds and hundreds of layouts. By making most of the client/scenario elements on the layout we can greatly reduce the number of required layouts and reduce implementatuion effort and lead-time.
         The goal is to define a generic table that will hold most of the dynamic layout elements for different document types and countries, including logo, sender address etc.
          For this we will create Z-versions of the output types BA00 ( Order Confirmation, ZPRI (Pro-Forma Invoice) and RD00 (ZD00 Invoice).The layout text blocks will be permanently fixed.The print Program user-exit should call the Z-table that holds the dynamic layout elements and retrieve these elements and merge them with the matching layout text block.
    Message was edited by: janardhan b

    Hi Janardhan,
       Even I have faced the similar situation.but what we have done is instead of calling the dynamic text elements..Why don't we call the text elements based on the required condition ,Then u dont have to maintain all the text elements required in the table.In the table we can only have the doumnent type,client name,logo name and address.
    In the print program if u r using script layout then call the required text elements (write_text) based on the client name and document type that is fetched from the Z-table,Otherwise if u r going for smartforms then with in the layout give the condition under the conditions node of the window or the text.

  • Creating Excise Invoice from Sales Delivery using DI API.

    Hi Experts,
    I have been searching a lot for any Business Object for creating Excise Invoice base on Sales Delivery using DI API.. But have not yet found any one.
    I want to create Invoice for excisable items from Sales Delivery using DI API.,for Excisable items we cannot create standalone A/R Invoice . We need to create Excise Invoice also . But How to create Excise Invoice based on Sales Delivery using DI API. Is there any Business Object for that.
    Please suggest me.
    Thanks and Regards,
    Pooja Singh.

    Hi all,
    I have not received any reply for this thread. Does this mean that there is no provision for creating Excise Invoice from Sales Delivery ? Actually I was asked to create sales delivery and then Outgoing Excise Invoice and then Sales Invoice using DI API.
    But I don't find any Business Object for this in SDK ? Is it really not possible to create Outgoing Excise Invoice from Sales Delivery using DI API.? If possible then how?
    Please reply me if anyone has got any idea in this regard.
    Thanks and Regards,
    Pooja Singh.

  • Canceling pro forma invoice

    In case of repair orders, is it possible and recommended to cancel pro forma invoice?

    The pro forma invoice is not a sales document, but a print out (usually from invoice document, sometimes also from delivery document).
    Therefore you can only cancel the printout, or you will cancel the real invoice.
    Some scenarios that use pro-forma invoices when invoice get's created, but release the documents to accounting later and print the real invoice after realeasing it to accounting.
    So if you do not want to create an real invoice, then cancel the invoice after the proforma got printed. But to answer qour question: I doubt that there are many scenarios where it would make sense.

  • Function module to create Invoice from the Delivery no ?

    Hi All,
    Is there any way (function module) to create an Invoice from the Delivery no and the Billing Type ? We do not want to go with BDC for transaction VF01.
    Details:
    We want to generate a pro-forma invoice while saving the delivery. We will have 'Special Function' (NAST-NACHA = 8) in the output determination and a routine would be called from there. That routine would contain the code to generate the Invoice. We will have only the 'Delivery no and the Billing Type'  in that routine. So trying to find any function module which can create an Invoice from the Delivery no and the Billing Type.
    Any suggestion / hint  is welcome.
    Thanks,
    Ashok

    Hello Ashok Satapathy ,
                                        The only option  for you is to call the FM "GN_INVOICE_CREATE" .
    There is no special FM availaible to pass only the delivery number at this point.
    You need to retrieve all the delivery information details and need to pass it to the FM "GN_INVOICE_CREATE".
    Thanks,
    Greetson

  • Very High Pro Forma Invoice Issue

    Hi, any one explain about this
    Very High Priority- Pro Forma Invoice Issue
    how to create proforma invoice issue and where it can be used. In which scenarios we can use it.

    Hello,
    You can create Proforma Issue with the billing type F5 for Order related billing and F8 for delivery related billing.
    A Proforma invoice is an invoice provided by a supplier in advance of providing the goods or service. The term pro forma (occasionally written proforma) comes from a Latin phrase meaning, "as a matter of form". Its meaning depends on the context in which it is used. In business terminology, A pro forma document is provided in advance of an actual transaction. Such a document serves as a model for the actual documents of the transaction. A pro forma (or proforma) invoice is a document that states a commitment from the seller to reserve some goods to be sold to a certain person, the buyer. The buyer places an order and if the seller agrees, it extend a proforma invoice; when the buyer receives this invoice and agrees to all the terms specified in it, the goods are sent and the proforma is replaced by a commercial invoice (the definitive document). <b>A proforma invoice doesn't establish any obligation of transfering money from the buyer to the seller.</b>
    Regards,
    Gauravjit.
    Reward points if the explaination is helpful

  • How to create pro forma invoice (F8) in this way

    hi all,
    we would like to create pro forma invoice with reference to DO(PGI done). At the same time update
    LC#Number under the header text and update Box No. under the item text.
    we're looking for one step solution(either BDC,bapi...etc) because there will be printing come out once the invoice is saved. we don't wish to come back to update the header text and item text again to print second time.
    thanks.

    Hi
    In VOV7 the billing relevance for  item category NLN should be  maintained as A (delivery related billing)
    Then you need to maintain copy controls  in VTFL between NL to F8
    In copy controls at header level copying requirements should be 009
    At item level for item category NLN copying requirements should be 010
    Pricing is picked from the OVKK settings that is for your sales area, CPP as the receiving plant is the customer, and DPP from the billing type of F8 For this combination you need to maintain Pricing Procedure
    In VTFL At item level for item category NLN the pricing type should be B
    If you need to maintain this settings you can create F8 proforrma invoice in intra comapny STO
    Regards
    Raja

  • Pro forma invoice for particular customer.

    Gurus :
    one of our Customer 389, is asking for a Pro Forma invoice to be created with each on of their orders when they ship. Can this be set up?  and how
    Full points will be given.
    Thank you
    Van bills

    Hi
    Proforma inv can be created with ref to order and del
    F8 is the proforma inv which is created with ref to del in std SAP
    F5 is the proforma inv which is created with referance to order in std SAP
    Proforma inv is a type of billing doc which is used for export transactions which gives info abt billing but it cant be treated as an actual billing doc or even as a duplicate bill
    No billing doc can be created referring Proforma inv
    You can give as many as Proforma inv to a customer because billing status doesnt get updated
    The final actual billing can differ from the details given inProforma inv
    Data from Proforma inv doesnt get transferred to accounting
    Regards
    Raja

  • Pro-Forma Invoice

    Good morning,
    I'm Spanish, and I'm travelling to the US soon, and I would like to purchase a MacBook, but I need an invoice, prior to adquiring it (a pro-forma invoice), to get the money in advance in order to be able to buy it there.
    Does anyone know if it's possible to get it, and how can I do it?
    thank you very much

    Hi there,
    I've had to do a very similar thing, but I don't think SBO totally covers the whole principles of pro-formas.
    The way I found to handle this was to raise a sales order for the goods, the go into "AR Reserve Invoice" and copy from the order (this updates the GL from an invoice point of view but doesn't downdate stock).
    On receiving payment, match against the Reserve Invoice then from within the Reserve Invoice take the "Copy To" option at the foot of the form and choose "Delivery", process the delivery then go back into it, right click and take the "Close" option to preclude this appearing on a "Delivered not Invoiced" report.
    The only issue with this is that obviously the invoice transaction will affect both the sales and vat accounts, but if payment doesn't come through then you can always credit this.
    You may decide to compliment this with a query or approval to tie up the process (but unfortunately it does need to be kind of manual in certain areas).
    Hope this helps, if you get stuck drop me a line.
    Julian

Maybe you are looking for