BAPI to create a billing document with reference to delivery or sales order

Hi,
Does anyone know any BAPI or function module that allows the creation of a billing document with reference to a sales order or to a delivery.
Maybe the BAPI_BILLINGDOC_CREATEFROMDATA may be used to create a billing document with reference to a sales document, but i'm looking for a solution where I only need to indicate the number of the reference sales order or the reference delivery and maybe some few data more without the need of transfer all the items and conditions information.
Thanks.
Kind regards,
Paulo Sousa

Hello Paulo,
To create a billing document based on a delivery use BAPI_BILLINGDOC_CREATEMULTIPLE. In table BILLINGDATAIN insert one line with the following data:
REF_DOC = Delivery number
REF_DOC_CA = 'J'
If it runs fine, table SUCCESS will bring back useful data, like BILL_DOC (Billing document number).
Regards,
Joã

Similar Messages

  • Returns Process - Billing Document with reference to delivery

    Dear All,
    In standard returns process we are creating billing document with reference to sales order.
    How can we make the billing dcoument to be created with refernce to delivery as the business wants the invoice document to be created only when the delivery is posted.
    Kinldy advise what are the configuration settings required.
    With Regards
    Mohammed Raees
    Edited by: Raeesuddin Mohammed on Aug 30, 2011 7:25 PM

    Hi Raees,
    Isnt your process flow like this: Sales Order>Delivery>Billing>Return Order>Return Delivery-->Billing?
    In general, to ensure that you're creating the invoice always w/ref to a delivery document pls do the following:
    1) In VOV8, where you cnofigure your sales doc type remove the order related billing i.e. keep it blank.
    2) In VOV8, put the billing doc in delivery relevant doc.
    3) In VOV8, in shipping section put the delivery doc type.
    4) Create copy controls between the delivery doc type and billing in VTFL at header and item levels.
    5) In the item category for this order type+ item cat grp ensure the billing relevance is either B, C or F.
    6) Maintain no copy controls between sales order and the billing in VTFA.
    I hope this helps.
    Regards,
    Raghu.

  • Billing Document with Reference to Delivery Doc

    Hi Guru's,
    Just wanted to know why thus my billing document still get the quantity in reference to sales doc even my item category settings in VOV7 has Billing Relevance = 'A'.
    Note that my doc floow has.. SO>DEL>G.I.-->BILLING.
    Thank you in advance.
    Rellie

    Dear Rellie
    Go to VTFL, select your item category for the combination of your delivery type and billing type and maintain "B"  for the field "Billing quantity".
    thanks
    G. Lakshmipathi

  • Creation of compliants with reference to r/3 sales order.

    dear friends
    Is it possible to create compliants in CRM with reference to r/3 sales order? if answer is yes please provide  the solution how to configure the same.
    regards
    naveen

    Hi Naveen
    I dont know why you want to create complaints with respect to the sales order.
    The usual process the companies follow is to create complaints wrt to the invoice number.
    But incase you wish to create complaints wrt to sales order, then you can use implementation of a BAdI CRM_COPY_BADI_EXT for the same in the CRM system which will allow you to create a complaint in CRM System wrt sales order in ECC.The path for the same in CRM system is IMG>CRM>Transactions> Settings for Complaints> Integration>Business Add-Ins for Document Referencing> Business Add-In: Create Complaints with Reference to External Document
    Secondly maintian the assignment between the Business Object type of referenced doc and Transaction type using path IMG>CRM>Transactions> Settings for Complaints> Integration>Business Add-Ins for Document Referencing> Assign Business Object Types to Transaction Types
    Now go to CRMD_ORDER and open the transaction type CRLP, you will get pop-up for creation of complaint where you can choose the transaction type and business object type and reference sales order number/ invoice number and create the complaint.
    Hope this will help
    Regards,
    Rekha Dadwal
    You gain a point for every point that you reward. So reward helpful answers generously

  • Create a billing document with no accounting document

    We have a requirement to create a billing document with no acocunting document. After this billing document is created, the status on all preceeding documents- SO,Delivery and Billing -should be status closed.
    It should perform somewhat like the Proforma invoice. We cannot use a proforma invoice setting for SD document category or Trasaction group for reporting purposes.
    So we configured a billing type and removed the account determination procedure. Now we are able to create a billing document, there is no accounting document, the preceeding documents are status closed. However the billing document itself has an account determination error and is status B-Posting Document not created (account Determination error).
    Is there a way I can get rid of this error message and have a status of Cor D(C-Posting document has been created, D-billing document is not relevant for accounting)
    Thanks for all help in advance.
    -Pratibha

    Hi,
    I would recommend you go to OBA7 --> Create a new FI Doc Type (i.e. XY) --> In the Accounts types Allowed, remove "Customer" check box (here you can control whethere you want posting to be permitted for Vendor, Customer, Assets, Material or G/L Account to suit your requirement) --> Save it.
    Now, go to VOFA --> Go to your given Billing Type --> In the "Document Type" field, replace the value with "XY" created earlier --> Save it.
    Perform your transaction again up to Billing. No Accounting doc would be created where the posting has been disabled in your FI Doc Type earlier (depending on your requirement).
    Hope this helps.
    Thanks.

  • How to create the billing document without reference

    Hi,
    I want to create a billing document in R3 without any reference with sales order or delivery.
    Aare there any FM or procedure to achieve this.
    If you cna send me the sample code it will be really helpful.
    Regards,
    sasi

    Hi,
    Iam trying to use the FM BAPI_BILLINGDOC_CREATEMULTIPLE
    But iam unable to create through this.
    If you have any sample code on this.It will be really helpful.
    My scenario is,
    I have an existing floe of data
    ie salesorder--delivery-billign document.
    But my requirement is to create two billing documents point to two different sales areas.
    Sincle we already created the billing document it will not allow to create one more billing document.
    Thats why iam lanning to create the billign document wihtout any reference.
    Please help me.
    Regards,
    sasi

  • Can create twice billing document for the same delivery in STO

    Hi experts,
    I donot have problems in Standard Sales order when I create billing doc via VF01. When I try to create another billing doc in VF01 for the same delivery it says error, as the item is already invoiced.
    This is correct. 
    But while creating invoice for STO order, system allows me to create more than 1 billing document for the same delivery. If we accidentally or purposefully create it allows to create many.
    Could you let me know where in SPRO (IMG) I can control this?
    Thanks,
    Pri

    Hi
    STO billing if it is intercompany STO followed by IV billing type you can create only once
    No special settings reqd to achieve this as you bill  (IV billing type) the delivery the first time, the delivery status gets completed
    If Intracompany, the billing type is proforma invoice F8  and this can be created as many times as you wish as proforma doesnot update accounting
    if your issue is this
    Even this also if you want to restrict only once then try with copying requirenments 311 at item level (i hope standard item category NLN is used) in VTFL between header NL to F8
    Regards
    Raja

  • Adding item positions with reference to contract in sales order

    Hi all,
    I would be very grateful if some of you could help on this:
    I have a requirement to add lines with reference to a contract while the user is creating or modificating it via VA01 or VA02. The logic flow will be as follows:
    if the user enters a new item position with reference to a contract, and the qty entered exceeds the qty in the position selected of the contract, we have to skip the standard error message and try to spli the quantities in several positions with the same material in the contract.
    As an example:
    the contract 000000000001 has 5 lines:
    line     material       qty
    01       mat1           100
    02       mat1           50
    03       mat1           50
    04       mat2           n/a
    05       mat2           n/a
    if the user picks up the line 02 of the contract to create a new line in the sales order, and enters 180 as qty, the sap standard will raise an error, saying the qty has exceeded the contract qty. Ok, we have to skip that error (maybe could we set it as a warning??) and 'split' the qty as follows:
    in the sales orders, 3 lines will be created automatically
    line    material     qty
         mat1         100
         mat1         50
         mat1         30
    and of course, the released quantities in the contract must be updated: i.e the contract should be as follows:
    line     material       available qty
    01       mat1           0
    02       mat1           0
    03       mat1           20
    Any ideas? : )
    What i've done by the moment is to check is that 'split' is possible, in userexit_save_document. If not (e.g. if the user enters 220 for mat1 in the previous example), a custom error will appear. If it is possible, then the sales order will be created (only with the line the uswer entered) and I will trigger somehow a FM processed in background to modify the sales order.
    my question now is: how can i add lines to the created sales order, making reference to some contract lines?
    I've seen BAPI BAPI_SALESORDER_CREATEFROMDAT2 is used to create a document with reference, but can i use it to MODIFY an existing sales order?
    any help would be greatly appreciated.
    thanks a lot for your help.
    regards.

    Hello,
    there's a function module called 'BAPI_SALESORDER_CHANGE', which could change a sales order. The problem could be,that these BAPI's enque the salesorder. So if you start them in background via an userexit, you have to be sure that the salesorder is updated and dequeued by posting.
    An other way could be to use the exit 'userexit_check_vbap' in MV45AFZB. It's called after creating a new position or changing a position. All existing positions at that time in a internal table 'XVBAP', which you could change. (But be carefull, that you don't create an endless loop !).  
    The check about the contract quantity is in a form routine called 'vbep-wmeng_pruefen_folgebeleg(sapfv45e)'.
    Have a look into the form 'vbap_pruefen_ende' in FV45PFAP_VBAP_PRUEFEN_ENDE. There's the whole thing done including the call of the userexit.
    Regards Wolfgang

  • Need Single Billing Document for Materials and Services in Sales Order

    Hello Friends,
    I am selling FERT items and DIEN items in the Sales Order.
    Document flow as follows:
    Finished goods - Order-Delivery-Billing
    Services - Order-Billing
    In this process 2 seperate billing documents are created
    i.  Delivery Related Billing document for Finished goods.
    ii. Order related Billing document for services.
    I want to create a single billing document for both the items (FG & Services) in the sales order.
    Please suggest.
    Thnx.

    Sorry for the delay friends.
    Somebody suggested me to make services 'relevant for delivery' to ensure single billing document.
    What I did were the following steps:
    1. Copy Item Category TAD to ZTAD and make is 'relevant foir delivery'
    2. Assign Item Category ZTAD to Sales Order type and Item Cat Group 'LEIS'
    3. Go to Deliveries Item Categories and through new Entries add ZTAD. Make ZTAD relevant for Picking.
    4. Go to copy control 'Order to Delivery' and insert ZTAD in Item Categories relevant for this combination.
    Now when I create sales order with materials and services, they pass over to the delivery document and in the Services item, storage location/plant is greyed out. Only the picking quantity is required to be filled.
    PROBLEM :
    I am not getting the price of Services item in the billing document.
    Billing document copies all line items (tangible and intangible) from Delivery Document
    It takes the services item details/quantities etc. to VF01 but the price comes '00.00'
    Any suggestions.
    Is this legally viable? Someone told me its not legally correct.
    Thanks.
    Mohammed

  • Error while copy with reference of quotation to Sales Order

    Dear All
    I am creating the sales order with reference to quotation . while , doing so , I get an error of
    Customer not maintained in Distribution channel - 'D1' .
    The Quotaion is having following structure
    Sales Organisation -- AAAA
    Distribution Channel - S7
    Division                     - D3
    But while copy the error erupts notifying to create the customer master for division 'D1' . If created of division D1 then the sales order is created with reference of quotation.
    Kindly guide.
    AVS

    Perhaps the configuration settings have been changed (to make D1 the reference division for D3 for master data ) since the quotation was originally created.

  • Want to procure material  with reference to WBS and sales order

    Dear all
    If i have assigned account assignment in PO means then while GR my material value is going to consumption. I dont want to book consumption at GR level i want to do consumption at delivery level. Also i want to procure material for particular WBS and Sales order.
    How to process the same. Kindly give some idea.

    Hi
    If you wanna toprocure the material wrt to WBS element or sales order the you have to make use of the Account assignment category P- projects ( That can be WBS elements /network ) And sales order C or any specific account assignment category created by you.
    Example :
    Sceneraio- When you are creating a slea order in SAP by T.code VA01 then at time of saving the SO the system is creation the WBS automatically ( that has to be mapped in SAP) .The Sales order number and the WBS element are  same .When you are cretating PO for  the Material wrt to  this WBS element then the system at time of the GR will be posting the consumption account which is booked to WBS element that in turn against the particular sales order.
    In SPRO - customizing i for the account assingment category P  in the Consumption Value is V
    Which is posted to consumption at time GR. Please  try create new account assignment category
    Consumption Value is E i.e accounting by sales order .
    Regards

  • BAPI_BILLINGDOC_CREATEMULTIPLE, creating a Bill doc with a single line item

    Hi there,
    I am trying to create a Billing document with reference to Sales document using this BAPI (BAPI_BILLINGDOC_CREATEMULTIPLE)
    ..but the generated billing document is creating only single line item where as the original Sales document is containing a Two line items, ie. 1 main line item an a Sub line item for this .
    I am passing the Values mentioned below..
    As per requirement is need to create a Pre invoice or a Proforma with Provided Sales Document.
    it_billingdata_in-ORDBILLTYP =  Proforma/Preinvoice
    it_billingdata_in-REF_DOC =  Reference Sales doc number
    it_billingdata_in-REF_DOC_CA = Reference Sales document category('C').
    Can some one please suggest any thing else do i need to pass apart of these field..
    Appreciate of some one answer me.
    thanks
    Srinivas

    Hi Srinivas,
    You need to loop on the internal table 'it_billingdata_in' based on the Sales Order line items and pass the value to 'it_billingdata_in-REF_ITEM' for every line item of the Sales Order.
    Hope this helps.
    Regards,
    Pranav.

  • Creating Billing Document Without Reference

    Hi all,
    I'm trying to create a billing document without reference to any order or delivery, using the function module BAPI_BILLINGDOC_CREATEMULTIPLE. In the internal table field BILLINGDATAIN-ORDBILLTYP i'm using FX (Billing from External Transact).
    I'm getting the error VF(027): Delivery type  cannot be invoiced with billing type FX.
    Does anyone know how to avoid this? Is there any configuration missing in the standard billing type FX?
    Thanks in advance,
    Nuno A.
    Edited by: Nuno Miguel Pires Afonso on Feb 9, 2009 4:30 PM

    Hi,
    You have to enter sales document type in DOC_TYPE field, Now system will not give error.
    These are the minimum fields you have to maintain in BAPI.
    Sales area,DOC_TYPE,ORDBILLTYP,BILL_DATE, sold to party,ship,bill to party,payer, plant,material and quantity.
    and in CONDITIONDATAIN maintain condition type,value and currency.
    Regards,
    Chandra

  • Create single billing document by sales order with division 00 and delivery with division 01

    Hello,
    I have a task to config the SAP system that would be possible create single billing document with different divisions.
    Scenario:
    1 doc: Create Sales order (division 00 - services) -> Create Billing doc
    2 doc: Create Sales order (division 01 - materials) -> Create Outbound delivery and Post good issue -> Create Billing doc.
    Sales order 1 and sales order 2 have the same:
    dates;
    custumers;
    Sold-to-party;
    payment terms;
    incoterms;
    and others;
    When I create VF01 with documents Sales order and Outbound delivery system splits in two different billing documents due to different divisions.
    I read www.scn.sap.com forums and test it DV system.
    I use and change settings in these transactions:
         VTFL
         VTFA
         VOFA
         VOFM
    But it doesn't work.
    Please give me feedback or give advices how to config in antoher way.
    Thanks a lot for your time and efforts.
    Rolandas

    You need to do configurational change and customization as recommended in the following note:-
    Note 50752 - Invoice combination for different divisions
    G. Lakshmipathi

  • Create SD Billing document from Vistex Claim Request or Billback document

    Is there a way to create SD Billing document(VF01) from Vistex Claim request or Billback document. Our business is requesting that they do NOT want to settle the billback in Vistex instead want to create a SD Billing document.
    I found a check box 'create billing document' in Vistex Claim request document type configuration - but that does not seem to do anything at all.  What is this for? does anyone know? 
    Is there another way Vistex allows to create SD billing document ?
    Please help.
    thanks
    Suren

    Hi,
    The sole purpose of Vistex is to create chargeback/billlback documents with reference to a Billing document in SD.
    After create the CB/BB docs in Vistex, settlements can be done only in Vistex and cannot be brought back to SAP.
    Other option is to create a Credit/Debit memo as applicable instead of doing the settlements in Vistex, however tracking the document flow and reporting will turn out to be more complex.
    In any case, take the help of an ABAP per who would suggest if any workaround in the form of a dewvelopment is possible or not.
    Regards,
    Amit

Maybe you are looking for