Sales order with multiple billing doc's

HI Guys
My client has specific requirement related the freight charges .Freight charge is represented with a condition type in my pricing procedure. If a given sales order has multiple shipments (I.E deliveries) then this freight charge is getting calculated partially at item level and passing on to the   billing documents accordingly. Customers receive invoices with part of those charges. They will receive other parts with other shipments and invoices until sales order is completed
As per my clients business it would be more logical that Freight charges are invoiced on the first invoice. And not as parts in each billing doc
There are two things which are striking to my mind in terms of solution
1.   Since it’s only to do with showing the freight charges on the output sent to the customer. Is there any option to display the complete freight charges on the 1st billing doc’s output type? And restrict to display in the remaining billing doc of a given sales order. Any idea how to achieve it this way
2.   Can this be controlled with the help of copy controls between delivery and billing doc at an item category level .i hope there should be some standard routine in place if not what should be my logic in this routine that helps to accomplish this task
3.   Create a routine and assign it to the condition type ZMIN…Not sure what logic should I built in here to get the above  requirement up and running
Please guide me a way forward on this……………..
Thanks for your support.
Will reward without fail …
Mohit

Hi Madhu,
The billing document cannot be deleted. It can either be cancelled or a credit memo created with reference to it. You can also check in the same VBFA table, if for a billing document any cancellation exists. If yes, then, the delivery cost becomes relevant. Else it does not.
However, there could be a timing issue. Say if there are 3 deliveries and 2 of them are taken for billing at the same time in different sessions. (I am not sure if SAP will allow this because of the locking of VBAK table but still a possibility). Then, when the routine goes back to VBFA with the Sales order number, it does not find any billing document. So there is a chance that the freight charges may appear on both deliveries in full. So, you may want to test a few scenarios like this to make sure the logic is good and accommodates all scenarios. 
Hope this helps.
Regards,
Mukund S

Similar Messages

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • One sales order with two bill to party at the document header

    Hello to all
    We have the following issue: create one sales order with two bill to party and only one payer. The reason is that the materials are paid with the same customer(only one account document) but we need to print two invoices one by each bill to party and each invoice printed with its own invoice number)
    We are thinking in one development due to the key users won´t create different line items or create different sales order.
    The process will be the following:
    1-Create the sales order with one payer and two bill to party or a new bussiness partner(you can use only one bill to party in each customer)
    2-Invoice the sales order. The system will create only one account document because there is only one payer but the system will create two printed documents with the invoice.
    So if someone had the same requeriments, any help will be appreciated.
    Thanks in advance.

    Pablo,
    You intend to create one invoice (one payer) but 2 different document print layouts.
    That should work. But, you have stated 'printed with its own invoice number'.... does this mean you need 2 distinct document numbers in the system? That will not be possible.
    An alterantive is to create a Proforma invoice and a regular invoice and send it to the 2 parties involved.
    Ashutosh

  • Sales order with multiple Schedule lines

    Hello,
    Could you please help me to create a sales order with multiple line items.
    for example, I need to create a sales order with line item 10 with schedule lines more than 3.
    Thanks in advance,
    Bhaskar.K

    As already explained  Sh. Line Catg. is determined with Item Catg.of the item + MRP type automatically  . As per your assignment in ( SD-sale-sales document-Sh. line-Assign Sh. line Catg.) system automatically propose the Sh. line Catg of your entered item
    Now for three Sh line  - in VA01  create the order  with your  item , give quantity  -now  select the line item, click on the  Display item Details ICON extreme left  bottom of the screen, than click on Sh. line tab here you maintain as many sh. line as you required.
    Actually these Sh lines are nothing but the Requested Delivery Date And Quantity which is ultimately pass on to (Transfer the Requirement) MRP
    Hope this'll help you
    Ashok
    Edited by: Ashok ku. on Aug 17, 2009 11:16 PM

  • Sales order with milestone billing

    Hi,
    We are migrating sales orders with milestone billing to ECC 6.0 system.   There are line items in the sales orders in the billing plan which have been completely billed.  For line items which have not been billed, there is billing block which flows from the WBS element attached to the line item.
    We want to transfer the sales orders to the new system with same status of billing completed for the line items for billing dates which have been billed.  This will ensure that billing is not done again in the new system for these billing dates.
    Kindly guide as to how we can achieve this.
    Regards,
    T Saravanan

    Hi,
    We are moving the orders from ECC 6.0 system to ECC 6.0 system only.
    The challenge is to that customer wants the orders with milestones  completely billied as it is in the system.
    When we bring the orders to the new system, how to ensure this status for milestones which have already been billed.
    Regards,
    T Saravanan

  • Sales order with milestone billing in real estate scenario

    dear Sir;
    My client is in real estate buisness; typically the process is sales order-mile stone billing. my client requirement is that they wants to change the sales order value in between milestone.
    for ex: if sales order value is Rs 100 and they done billing of Rs20 by milestone billing, they wish to change the order value to Rs 80.
    currently we are following process like reversing all the billing doc and posting and change the sale order value and re billed it.
    please suggest some suitable solution.
    regards
    Ashish

    Dear Friend,
    This can be done by configuring billing plan in SAP SD.
    Go through the following links.
    Configuration of Milestone billing / Periodic Billing
    Billing plans
    Thank you,

  • 1.     Multiple Sales Orders with single billing .

    Hi gurus,
    I am doing in EC6. how can i get single billing document for multiple sales orders. please tellme that configuration settings i need to do.
    I am wating for reply
    Thanks and regards
    DVSk

    Hi,
    Order-to-Bill Copy Control Settings are maintained in
    T. Code: VTFA
    But Header Data, say exchange rate differences or Payer or Terms of Payment, for both the Orders must be same in order to avoid Invoice split.
    You may write routine, based upon your requirement in VOFM and attach it to Field: Data VBRK/VBRP (Under "Item" - left hand tree structure).
    for your Order-toBill combination.
    Best Regards,
    Amit

  • Condition records  wrongly populated in sales order instead of billing doc.

    condition records are maintained billing wise to populate in the billing document for pricing condition where as while creating the sales order   itself i am getting the condition records populated in the sales order which is not correct as it needs to populated in the billing document only

    yes after looking at  pricing analysis itself we have  concluded that these condition type has the key combination  billing document F2 and displays the condition record within the sales order itself, but this condition record with key combination billing doc. F2 should be populated in billing doc  only what is the reason behind this

  • User Exit to copy Sales order data to Billing Doc

    Hi,
    I want a User Exit to copy a particular field value from sales order to Invoice.
    The field which I am copying is STCEG(VAT Reg number)..
    I am using the exit
    USEREXIT_FILL_VBRK_VBRP but I am not able to acheive my solution.
    Is there any other way other than copy croutines with USER EXITS.
    Thanks.

    That's strange. SAP documentation says:
    "This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data."
    Check you code. In debugger, set a watchpoint on VBRK-STCEG and check why the value gets lost.
    Regards
    Clemens

  • Production order from sales order with multiple line item(for one material)

    Dear Gurus,
    I am working in MTO scenarios. If there is several line item in a sales order for one material, multiple production order( same as no. of sales order line item) is getting created against each of the line item.My requirement is,since the material code is same in each line item and sales order is one, one production order should be generated for all line item. please tell me how to do it.
    (Here for one material, multiple line item is required for some specific reason)
    Regards
    Rajib Pathak

    Hi,
    This is not possible.
    In Std SAP will create one production order for one sales order. The stock is also allocated to thet particular sales order only. Because each and every sales order may vary in any one of the parameters. Considering this, SAP has designed like this.
    Regards,
    V. Suresh

  • Adding Sales Order with multiple lines

    Hi all,
    I have a C# program whereby I am trying to get Sales Orders from one database (source) and create them in another database (destination). I can't get the code to work properly as lRetCode is never equal to 0 but is -5002.
    How can I fix it so that it adds the sales orders properly?
    Here is the code snippet:
                unaddedSOs = sList.Except(dList).ToList(); // contains the header information
                // Add the Sales Orders that are missing to destination database
                SAPbobsCOM.Documents sboSO =   (SAPbobsCOM.Documents)oCompanyDestination.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);  // Destination
                // Loop through unadded Sales Orders
                foreach (var item in unaddedSOs)
                    // Set properties of the Sales Order object
                    sboSO.CardCode = item.cardCode;
                    sboSO.CardName = item.cardName;
                    sboSO.DocDate = item.docDate;
                    sboSO.DocDueDate = item.docDueDate;
                    // Add Sales Order Document Lines
                    SAPbobsCOM.Recordset rsLines = oCompanySource.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset); // Source of lines
                    // Get Sales Orders from source database
                    rsLines.DoQuery("SELECT ItemCode, Quantity, Price FROM RDR1 WHERE DocEntry = '" + item.docNum + "'");
                    rsLines.MoveFirst();
                    if (rsLines.RecordCount > 0)
                        while (!rsLines.EoF)
                            sboSO.Lines.ItemCode = rsLines.Fields.Item("ItemCode").Value;
                            sboSO.Lines.Quantity = rsLines.Fields.Item("Quantity").Value;
                            sboSO.Lines.Price = rsLines.Fields.Item("Price").Value;
                            sboSO.Lines.Add();
                            rsLines.MoveNext();
                    // Try to add the Sales Order to the database
                    int lErrCode = 0;
                    string sErrMsg = "";
                    int lRetCode = sboSO.Add();
                    if (lRetCode != 0)
                        int temp_int = lErrCode;
                        string temp_string = sErrMsg;
                        oCompanyDestination.GetLastError(out temp_int, out temp_string);
                        // Incase adding a Sales Order failed
                        if (lErrCode != -4006)
                            // Display error message
                            MessageBox.Show(lErrCode + " " + sErrMsg);
                MessageBox.Show("Done!!!");
    Kind Regards,
    Kinyanjui.

    Hi Kinyanjui,
    I think you're always writing to the same line:
    int row = 0;
    while (!rsLines.EoF)
        sboSO.Lines.SetCurrentLine(row);
        sboSO.Lines.ItemCode = rsLines.Fields.Item("ItemCode").Value;
        sboSO.Lines.Quantity = rsLines.Fields.Item("Quantity").Value;
        sboSO.Lines.Price = rsLines.Fields.Item("Price").Value;
        sboSO.Lines.Add();
        rsLines.MoveNext();
        row++;
    Best regards,
    Pedro Magueija

  • How to create sales return with multiple invoices

    Hi ,
    I am creating a sales order return with reference of billing document using FM SD_SALESDOCUMENT_CREATE, if i give one Billing document as a reference document it is creating document perfectly.
    But my Requirement is to create one Return sales order with multiple invoices.
    I tried to pass reference document no's in Item level , but it take first reference document number only , for that reference document only return is creating.
    Can you any one help me how to create this.
    Thanks in advance
    Swapna.

    Hello Venkat,
    As I know it is not possible to create a single return order for multiple invoices in the background.
    It is possible in the foreground by following the below steps.
    1) Goto VA01 --> enter the Sales order type and Sales area.
    2) Press F8 or click on create with reference, provide the first invoice.
    3) Now the main screen would appear, displaying line items from Invoice1.
    4) Without going back, again goto path, Sales document -> Create with reference
    5) Enter second invoice2. and the items from invoice2 will also appear in the Sales order line item.
    ------ Enter as many number of invoices by repeating the above step--------------------
    6) Press save, so one sales order is created for multiple invoices.
    Regards,
    Thanga

  • Create Sales Order With Reference to Billing Document Using BAPI_SALESORDER

    Hi,
    How can i create a sales order With Reference to Billing Document Using BAPI_SALESORDER_CREATEFROMDAT2?
    Thanks in advance,
    Alejandro.

    I have to create sales order with reference to existing billing document. I have tried to following bapis.
    1. BAPI_SALESORDER_CREATEed
    I have successfully created document with following details.
    -->ORDER_HEADER_IN:
    DOC_TYPE =                  ZRK
    SALES_ORG =              3000
    DISTR_CHAN   =            00
    DIVISION =                    00
    ORD_REASON =            100
    SD_DOC_CAT   =          L
    CURRENCY       =         EUR
    REF_DOC          =         100000028
    REF_DOC_CA    =         M
    -->ORDER_ITEMS_IN:
    ITM_NUMBER    =           000010
    MATERIAL          =          701791
    TARGET_QTY     =          0000000001000
    CURRENCY        =          EUR
    REF_DOC           =          100000028
    REF_DOC_CA     =          M
    -->ORDER_PARTNERS:
    PARTN_ROLE      =          SP
    PARTN_NUMB      =         W12001
    COUNTRY             =         NL
    by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in  ORDER_ITEMS_IN
    COND_TYPE          =        PNET
    COND_VALUE        =        14,56
    COND_D_UNT        =         PC.
    folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
    is it something related to configuration problem?
    2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
    I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
    Unpermitted combination of business object BUS2032 and sales doc. category L.

  • ERP - SD Sales orders with billing plan (material number change appear)

    Sales and Distribution.
    Regarding sales orders with billing plan.
    We create the sales order and create billing plan at header or item level.
    We issue down payment request(s) upon receipt of sales order.
    Often during the life time of the sales order one or more of the material numbers are changed after the down payment request(s) has been issued and paid by the client.
    Our issue is that prior to changing the material number in the sales order we have to reverse the payment(s), reverse the down payment request(s) and after the material number change re-issue the down payment request(s) and register the payment again.
    We wish to find a solution avoiding all the reversals.
    If you have a similar situation please inform how to handle material number change in the sales orders with billing plan.
    Best regards
    Lise

    Dear Consultor SD ,
    There is no setting to create the invoice based on schedule line.
    What you can possibly do is create multiple deliveries based on the schedule line and
    then invoice the individual deliveries.
    If you want system to split the deliveries based on schedule line, then you will have to include Schedule line also
    in the COMBINATION REQUIREMENT in VTLA.
    Thanks & Regards,
    Hegal K Charles

  • COPA - Multiple Sales Order with one wbs element.  COPA does not reference

    COPA - Multiple Sales Order with one wbs element.  COPA does not reference of reference of sales order.
    Hi All
    Currently we are in process of implementation of project related to Club Service for one of the client.
    Concept of this project is - there is "X" company engaged in supporting the different shared services for their client e.g. Client IBM - Shared Support Services of IBM is
    u2022     IDM
    u2022     Software Installation
    u2022     Help Desk
    u2022     Maintenance
    Co.. "X' is performing these services for IBM.    So for Co. "X" - IBM is one engagement. Like this way Co. X is performing such activities for many companies e.g. microsoft, HP, ABN AMRO etc.
    Objective - Get the consolidate report from COPA (Customer wise/services wise/sales order wise e.g. IBM/HelpDesk/10002/10).
    We propose a solution to create a project for each engagement and with WBS element. Each WBS element of different services e.g.
    Project IBM Inc.  100.100
    WBS Element    100.100.IDM 
    WBS Element    100.100.SoftIns
    WBS Element    100.100.HelpDesk
    WBS Element    100.100.Maintainance
    For this engagement (IBM), we are creating a sales order with line items (for services) and account assignment is WBS element.  In a sales order, there may be two lines for one services.   In a particular period, there are many such sales orders for this engagement... Milestone billing/period billing is used depending upon the services rendered.
    Now Cost Object will be WBS Element. So cost and revenue will posted to WBS and from this it goes to COPA.  In a month of May 2009 two - sales order is booked with three different line items with account assignment is WBS element.
    Sales Order Line Item No.....Item                  Account Assignment                      Revenue
    10000          100     IDM      100.100.IDM              1000
    10000          200     HELPDESK      100.100.HelpDesk              2000
    10000          100     Maintenance      100.100.Maintainance         3000
    Another Sales order booked with two different line items
    10000          100      IDM     100.100.IDM          3000
    10000          200      HELPDESK     100.100.HelpDesk          4000
    Cost will be booked directly against WBS element.
    In sales order level, there is no profitability segment, as cost object is WBS element.
    Billing, revenue will be posted directly to wbs element, from this revenue and cost of sales goes to COPA.
    Now in COPA,
    1.There is only one line for WBS element ex. 100.100.IDM with revenue 4000 (combing both the sales order)
    2.There is only one line for WBS element ex. 100.100.HelpDesk with revenue 6000 (combing both the sales order)
    3.There is only one line for WBS element ex. 100.100.Maintainance with revenue 4000
    In above case 1 & 2 we will not have reference of sales order and sales order line item in COPA table. There is only one line for this.  So we can not have reporting to sales order level.
    Is there any way by this the reference of sales order and sales order line will come in COPA for case 1 & 2.
    Please help in this issue.
    Regards
    Abhay Dev
    Ph:- 91-22-67782229
    Cell:- 91-9819175185

    Hi,
    For these case (multiple materials with different characteristics); have you consider going to next level of WBS Elements. Meaning; lets say currently you are assigning WBS "Engineering (which is a level 2 WBS)" to all the items in SO. Instead under "Engineering" create 2 or 3 level 3 WBS Elements as E1, E2 etc and assign them 1:1 to your sales order line items. This would eliminate the exit as welll as complex development option. And also will let you get all the data in COPA and in turn you can pull to BW as well for reporting. Just a thought.
    Regards
    Sreekanth

Maybe you are looking for