BAPI/Pointers on merging multiple sales orders

Hello Gurus,
I have a requirement to create a sales order with reference to multiple orders. I have used BAPI_SALESDOCUMENT_COPY to create the first order with reference to the original order, saved this order and then modify this order with the data from the remaining orders (by reading the data from the order using BAPI_SALESORDER_GETDETAILBOS). This is turning out to be very complicated as we are using BOM and I have to change the item number and the higher line item number of subsequent order data that I am including in the merged order.
Is there a better way of doing this? Is there a BAPI/Function Module available to create a sales order with reference to multiple orders?
Any help or pointers to achieve this requirement will be helpful to me.
Thanks in advance.
Thanks,
Sandeep

Thanks Rob. We have the copy controls set so we will need the data to be transferred from the original document to the copied document.
In Createfromdat1 or createfromdat2, where do I specify multiple referenced orders?
As an example if I have the following orders in my system:
Order 1000                            line 10
          Line 20
          Line 30
Order 2000                          Line 10
          Line 20
Now I need an order which has the line items from both these orders:
Order expected:                 Line 10
          Line 20
          Line 30
                                          Line 40 which is  Line 10 of order 2000
          Line 50 which is  Line 20 of order 2000

Similar Messages

  • Merge multiple sales orders in One

    Hi All,
    I want to merge multiple sales orders into a sales order (new), with all pricing details. How do I do that by using standard SAP BAPI 's or FM's.
    Currently I am doing it through BDC programing which is taking long time.
    Kapil Shivaji Sonavane

    Hello,
    1. use FM to get all sales order information.
    loop at it_sales_order_numbers.
    user FM to get sales order info.
    endloop.
    2. use BAPI to create new sales order and combine all above information into one internal table.
    **********Poorna************

  • Wrong VL-367 error while creating delivery from multiple sales orders

    Hi,
    We have a Z program* that runs BAPI_OUTB_DELIVERY_CREATE_SLS with multiple sales order items to create one delivery.
    The program runs as a job. The problem is sometimes Bupi turns "VL367 - an item with no delivery quantity..." error for some of the items. But actually we have no availability problem, after a minute in the next job the delivery is being created for those items.
    We couldnt find the the state that causes this wrong error. Have any ideas, is there any problem with the bapi ?

    Hi,
    You should check if you got other Sales Order that might be have items with quantities confirmed. Quantities confirmed in a sales order will be appear as unrestricted stock, although is reserved, and therefore for example:
    Sales Order A: item 10, quantity 10
    Unrestricted stock: 10
    Sales Order B: item 10 (Same material as Sales Order A), quantity 2
    Creating outbound delivery for Sales Order B will generate the message, because that stock is being taken for the Sales Order A already.
    Hope it helps.

  • Create multiple sales order

    Dear all,
       how to create multiple sales order using rfc's.
                                                  regards,
                                                   malli.

    I Don't think there is a RFC for it. But you can create the Function and make it RFC enable.
    the Interface of The RFC should allow and take information to create multiple orders.
    inside the RFC ,
    you need to loop the table parameters
    since the main table contains information of all the orders.
    and
    Call the BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    and pass appropriate information for each loop and create order.

  • Urgent: How to copy multiple sales order items into a return sales order?

    Dear developers,
    I have a requirement to copy multiple sales order items into a single return sales order. For example, generated return sales order have 2 items, item 10 is created with reference to sales item 2610/10 and item 20 is created with reference to sales item 2611/20. What's more, when it happens, copy control should be taken care of. I know it is possible to create this kind of order by transaction. But how to do it in coding?
    In current SAP release, there is only BAPI for creating with reference on 1:1 relationship which means copy one document to another but what I need is N:1 copy.
    Any suggestion is high appreciated!!
    BR,
    Tony.

    Hi ,
    If you are creating sales order by using bapi then after calling bapi you can check import parameter <i><b>SALESDOCUMENT</b></i> in the bapi function module .If this parameter is not initial then sales order is created in this case you can create return order. If this import parameter is initial then sales order is not created and you cannot use return bapi function module.
    Bapi is simple method than BDC.
    In above case it is required to call BAPI_TRANSACTION_COMMIT after every successful sales order creation.
    One more important point is you have to clear import parameter <i><b>SALESDOCUMENT</b></i>  before calling sales order creation function module.
    Thanks,
    shyla

  • Bapi for Delivery Creation from Sales Order

    Hi
    I have multiple sales order and i want to create 1 outbound delivery from it just like what Vl10A is doing.
    Can i have BAPI or fumctiona module for same.
    Best Regards
    Subham

    Check this thread:BAPI for Delivery Creation
    Also search the forums..there are many threads addressing the same issue.
    Regards,
    Kiran

  • Create multiple sales orders from single service notification?

    Is it possible to create multiple sales orders from a single notification (IW51)? 
    We currently create sales orders directly within transaction IW51 (Create Service Notification).  We kick off the sales order creation by pressing the "SALES ORD." button in the notification screen.  We're now interested in creating a 2nd Sales Order which would tie directly to the same Service Notification.  This is so that we can have the second order assigned to a different account assignment WBS (there are two different parties doing work on the service notification).
    I assume you would have to go to VA01 to create the Sales Order, but am not sure how to tie it directly to the service notification from here.  I treied to do a create with reference, but there is no ability to create with reference to a service notification.
    Do I have to create a second service notification for the 2nd Sales Order for this to work?  I want to avoid doing this if at all possible.
    I'm running SAP R/3 Enterprise
    Thanks for your help!

    Hi,
    go to vtaa- copy controls for sales document to sales document.
    select your combination of order and quotation go to item level. There select value 0(zero) in field positive/negative negative.
    No need to change update document flow.
    After setting zero in copy control that be told on above. create order with respective to the quotation.
    After saving the order.
    go to document flow to see the status in between quotation and order.
    If you placed setting right, then u certainly observe for quotation status will be open. so you can create no. of sales order with respect to that quotation..
    Have a good day..

  • Multiple Sales Orders from One Quotation.

    Hey SD Gurus,
    I want to create multiple sales orders referring to one quotation. When I create the first sales order the status from quotation change to Completed and this doesn't enable me to create a new sales order. Please let me know how to satisfy this requirement. Thanks in advance.
    Please search the forums before posting - see [rules of engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Ian Kehoe on Mar 2, 2012 2:17 PM

    Hi,
    go to vtaa- copy controls for sales document to sales document.
    select your combination of order and quotation go to item level. There select value 0(zero) in field positive/negative negative.
    No need to change update document flow.
    After setting zero in copy control that be told on above. create order with respective to the quotation.
    After saving the order.
    go to document flow to see the status in between quotation and order.
    If you placed setting right, then u certainly observe for quotation status will be open. so you can create no. of sales order with respect to that quotation..
    Have a good day..

  • Auto-create delivery for multiple sales orders

    I would like to ask how to create auto-create 'single' delivery
    for multiple sales order during release sales order in R11i.
    It is found in my example during release sales order, multiple
    sales orders fulfill release sales order criteria, a single pick
    slip is generated but it is found that each sales order have
    individual delivery with it. It will casue multiple pack slips
    for a singles pick slip. Is it normal feature for auto-create
    delivery, or any setup to solve it?
    Thanks in advance.

    Am not able to do Single Delivery for Muktiple sales orders
    Have you searched the forum for this question as to why you were not able to generate ??  It could be due to multiple reasons.  Please search the forum and update here what steps you have taken after taking the inputs from here, if the problem is still not resolved.
    thanks
    G. Lakshmipathi

  • Single idoc generation for multiple sales orders

    Hi,
    Pls let me know how do we generate single idoc for multiple sales orders.
    Its not collecting idoc. As we know we can generate an idoc for one sales order correspondingly
    my requirement is to generate single idoc number for multiple sales orders.
    Do we need to write a program.

    Amar,
    To understand take HRMD_A04 as example. Root segment has Maximum 9999999999 defined.
    Segm.type       E1PLOGI
    Minimum number  1
    Maximum number  9999999999
    Parent segment
    Hier.level      2
    This means that this IDOC types has capability to hold multiple HR Master data objects. PFAL program creates this IDOC and it has facility to mention the Objects per process, check selection screen.
    I checked for INVOICE01/02 its not possible there. Hope this clarifies.

  • Delivey for Multiple Sales orders

    Hi,
      I am new to SD and would like to know how do we create a single delivery corresponding to multiple sales orders.
    Can someone please advice me about the same?
    Thanks and Regards,
       Aditya

    You can group together entire orders, order items of different orders or partial deliveries of individual order items in one delivery but only if this has been agreed with the customer.
    Prerequisites
    Order combination can only be carried out if the orders concerned have the appropriate indicator in the order header.
    The orders or the order items and schedule lines must have identical shipping criteria. This includes the following data:
    Shipping point
    Ship-to party
    Incoterms
    Sales organization
    If you try to combine items that have different goods issue dates, you receive a warning message. You can ignore this warning message. The earliest goods issue date of all the items is selected automatically as goods issue date of the entire delivery.
    Entering the Indicator
    You can enter the indicator that makes order combination possible in two places:
    In the customer master record, you can give a customer general allowance for order combination. The indicator depends on the sales organization, the distribution channel and the division as it is entered for a particular sales area.
    You can specify that all orders for one particular customer can be combined by entering an X in the Order combination field on the Shipping screen of the customer master record. The indicator is copied from the customer master record into the order header.
    You can specify manually that individual orders can be combined and then revoke the combination allowance later, if necessary. You can specify that orders can be combined by entering an X in the Order combination field of the Shipping tab page on the Order Header screen. If you want to block order combination, deselect this indicator (the checkbox should appear blank).
    Process Flow
    During delivery creation, you must distinguish between the following two situations:
    Creating an individual delivery
    You can manually add additional orders or order items to this delivery if the customer allows combination and order items fulfill the criteria for order combination.
    Processing a delivery due list
    The system automatically combines the order items in one delivery if the customer allows this and if the order items fulfill the criteria for order combination.

  • Deletion of multiple sale orders at one shot

    Hi Friends,
    Can anyone tell me how to delete multiple sale orders at one shot?
    Friendly
    Rama Rao

    Hi
    Try doing it through LSMW, I used LSMW for deleting deliveries in mass and it worked
    Anurag

  • How can I create multiple sales orders with reference to one contract?

    Hello Gurus,
    Can you please how can I create multiple sales orders with reference to one contract?
    thanks!
    Rakesh

    hi
    Lets consider example
    In your contract for line item 1 you have entered qty 100
    You careated sales order with 70 quantity, and now you want to creat another sales order for 30
    For this first you need to check what is your item category in contract (VA42)
    Goto VOV7
    SPRO - IMG  - Sales and distribution - Sales - Sales document item - Define item categories - Go to change mode
    Make the completion rule = B Item is completed after full quantity has been referenced

  • How to create one delivery for multiple sales order

    Hi!! Friends,
    Can some one explain the steps to be followed in creating one delivery for multiple sales order in SAP SD.
    Regards
    AKASH
    Message was edited by:
            AKASH TAMBI

    Hi.,
                  You can combine different orders in to one delivery ,But for the customer Order combination should be checked in  the sales area data of the shipping tab,we can combine orders but the ship to party,Route,Inco terms,Shipping date,shipping point should be same,you can do in T.code VL04 & VL10
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • Combine multiple sales order in a single delivery

    Hi Experts,
    As per standard SAP we have a facility to combine multiple sales order in one delivery  if orders have same shipping point,ship to party & delivery date.
    But we have a requirement that the orders should get combine in a delivery only when shippping point,ship to party,delivery date & pricing date are same for orders.
    Please let me know is there is any standard config available or do we need to write any exits & so...
    Please reply ASAP .

    Hi,
         I think this is not there in standard functionality.
          In this case you need to go for user exit for delivery routine 101, include program FV50B101
    Check delivery routine 101 in VOFM and with the help of your abap consultant this can be done.
    Thanks,
    Swamy H P

Maybe you are looking for