Adding multiple deliveries to a shipment

Hi all,
My requirement is to add multiple deliveries to a shipment. for that I am using a BAPI, SD_DELIVERY_ASSIGN_TO_SHIPMENT. In the description of this, it is said that we can append deliveries to shipment. But, i am not able to do so.
I have passed the shipment number in export parameter and all the header related info in changing parameters.
In the tables parameters, I have passed the data as below
C_XVVTP:
MAN TKNUM TPNU VBELN
200 2039 0002 13000926
200 2039 0001 13000925
C_YVTTP:
MAN TKNUM TPNU VBELN
200 2039 0002 13000926
200 2039 0001 13000925
C_XVTSP:
MAN TKNUM TSNU TPNU U
200 2039 0002 0002 I
200 2039 0001 0001 I
C_YVTSP:
MAN TKNUM TSNU TPNU U
200 2039 0001 0002 I
200 2039 0001 0001 I
I_DELIVERIES:
VBELN TPRF
13000926 0002
13000925 0001
I_XTRLK:
VBELN
13000926
13000925
I_XTRLP:
VBELN POSNR
13000926 000002
13000925 000001
I_XVTTS:
MAN TKNUM TSNU T
200 2039 0002 I
200 2039 0001 I
By passing the data in this format, I am not able to add deliveries to the shipment. It is not returning any message or error. Can anyone please tell me if there is any parameter i am missing or if I should call any other FM after using this, or any other BAPI altogether which meets the fuctionality to add many deliveries to a shipment.
Thanks and Regards,
Avinash

1) SD_DELIVERY_ASSIGN_TO_SHIPMENT is not a BAPI. I would not recommend to call the SAP function modules directly.
2) BAPI_SHIPMENT_CHANGE has not been released to the customers, so there is no support for it. I have used it though to delete a delivery from the shipment (see the example below), so it does work. You'll need to experiment with the fields you fill in. Also search ABAP forum.
DATA: s_header TYPE bapishipmentheader,
        s_headeraction TYPE bapishipmentheaderaction,
        i_item TYPE bapishipmentitem OCCURS 0 WITH HEADER LINE,
        i_itemaction TYPE bapishipmentitemaction OCCURS 0 WITH HEADER LINE,
        i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
  s_header-shipment_num = i_deliveries-tknum.  " Shipment Nr
  i_item-delivery = p_delivery.  " Delivery Nr
  APPEND i_item.
  i_itemaction-delivery = 'D'.
  i_itemaction-itenerary = 'D'.
  APPEND i_itemaction.
  CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
    EXPORTING
      headerdata       = s_header
      headerdataaction = s_headeraction
    TABLES
      itemdata         = i_item
      itemdataaction   = i_itemaction
      return           = i_return.

Similar Messages

  • How can I combine multiple deliveries of the same address to one shipment.

    Hello Friends,
    My client is sending multiple deliveires with multiple shipments to the same customer. His cost is increasingm therefore I am lookign to help him to combine all the deliveries to one shipment and one delivery.
    How can I combine multiple deliveries of the same address to one shipment.
    Please help me.
    Regards

    Of course, you can combine several deliveries into one shipment. You can set your own selection variant to select deliveries with the same ship-to party.
    You cannot combine several deliveries into one delivery. The combination of deliveres is possible only when creating deliveries in VL10*.
    Edited by: Harry Wu on Jun 21, 2010 4:30 AM

  • VT04 - Create Shipment with multiple deliveries

    Dear All,
                    I need to create a shipment in VT04 such that it selects multiple outbound deliveries for the shipment where delivery has the group id.
                   The need to group the delivery is we need to have full load in the shipment.
    In standard is there any solution for below queries
                    1) How do we maintain group id in outbound delivery ? What is the table and customizing entry for the same ?
                    2) There is a Grouped delivery field in Selection Variant of Vt04 transaction.  This field is linked to the VBSS table. Can we make use of  the same to achieve the grouping ?
    Thanks,
    Shubh.

    Hi Shubh,
    You can use the Grouping Criteria for grouping multiple deliveries into a single shipment. You will need to select a  Selection variant and then maintain a grouping criteria. You can have a numerous grouping criterias such as Shipping Point/Receiving Point, Loading Point, Ship to Party Number,Route etc.
    The Grouped Delivery field  is a number that uniquely identifies a group of deliveries. The system assigns the number automatically when you create a group of deliveries or invoices, for example. You cannot change this number manually.
    Regards,

  • How do deliveries get added to a stage in shipment

    I am trying to configure automatic determination of stages for deliveries in the shipment legs
    But every time all deliveries at all stages remain in one stage and then I have to move them manually or sometimes even that is not possible
    I must be doing something wrong
    Any ideas / tips from Gurus out there

    hi,
    Check out what you are missing in the steps you had followed from the standard procedure and also check the pre-requisites of automatic determination.
    Prerequisites
    This algorithm is triggered automatically in the following circumstances:
    When a route is entered in the shipment header
    After you carry out leg determination with category ‘0’ to ‘4’ (leg determination category ‘0’ initiates the assignment determination process only).
    Procedure
    Assignment determination is carried out as follows:
    The system analyzes the point of departure and destination for each delivery, one after the other (see also step 2 in Automatic Leg Determination.
    If the point of departure of this delivery is found among the departure points of the existing legs and the destination is found among existing destinations, the system then looks for the legs that connect these two locations.
    If the legs are incomplete (that is, if there are gaps between them), the delivery is assigned to all legs that start at the beginning point and also to all those that end at the destination.
    If only the departure point exists in the system, the system assigns all adjoining legs to the delivery.
    If only the destination exists in the system, all adjoining legs are assigned to the delivery (in other words, similar to step 3, only backwards).
    If neither the departure point nor the destination exists in the system and if the delivery is a preliminary leg shipment or subsequent leg shipment, it is assigned to all legs. All other shipments with no departure point or destination in the system are only assigned to main legs. If this does not work either (because the leg indicator is not maintained, for instance), the deliveries are assigned to all legs that were created manually.
    Now the system assigns the deliveries to border crossing points and load transfer points. The system then also checks which legs start or end at border point G, for example. All deliveries that are found in these legs are assigned to this border crossing point, since all deliveries that are shipped to this border crossing point must most likely go through customs.
    Only deliveries that are to be loaded or unloaded at this point or those whose shipping type or service agent changes (meaning that they must be transferred) are assigned to a load transfer point.
    If there are no legs that begin or end at this point, the system assigns all deliveries to this point.
    regards,
    Siddharth.

  • Preventing billing split for multiple deliveries (over-riding billing date)

    Hi all,
    I have multiple deliveries which should be invoiced into ONE billing document. The only difference between the deliveries is the billing date, which is why it is splitting.
    I am therefore copying routine 001 and in VOFM and adding this code to the end of it:
      vbrk-fkdat = sy-datum.     "prevent split due to difference in billing date
    This is great and working fine because when I have 2 deliveries with diff. billing dates, it will take todays date. The only problem is when:
    1. Billing for a single document (dated 11/08/2011), it will over-write it and set the date to today (17/08/2011)
    2. Billing for 2 documents with the same date
    What is the best way around this?
    Thanks

    Dear Pistols123,
    1. Billing for a single document (dated 11/08/2011), it will over-write it and set the date to today (17/08/2011)
    Here can't you write the code to check whether there is only one billing document, if so omit your code for the date manipulation.
    So that system will not assign system date, but will take the orginal date (actual good issue date or billing date entered in vf01)
    2. Billing for 2 documents with the same date
    write the code to check whether all the billing documents have the same date , if so omit your code for the date manipulation.
    So that system will not assign system date, but will take the orginal date (actual good issue date or billing date entered in vf01)
    Thanks & Regards,
    Hegal K Charles

  • Bill of Lading and multiple deliveries

    Hi Guru's,
    I have a question regarding Bill of Lading and deliveries. We can have multiple deliveries which are related to one Bill of Lading. Normally when I process the per delivery the DESADV IDOC but is there another way to send multiple deliveries based on the same Bill of Lading?
    Best regards,
    Guido Koopmann

    If you mean that you'd like to have multiple deliveries i one IDoc then it's not feasible. Unless you create a custom IDoc, of course. To my knowledge, there is no IDoc for bill of lading. Shipment is pretty much the only document that may include multiple deliveries.
    But if you just want to select the deliveries by BOL # and create individual DESADV IDocs for them, then it should be feasible, at least by writing a small "wrapper" ABAP report.

  • Combined TO for multiple deliveries and multiple storage types possible?

    Folks,
    I would need to have 1 pick TO for a shipment which has multiple deliveries and materials that are stored over several storge type. With stanrd SAP this is not posible. Any ideas wether this can be achieved through a user exit?
    Regards,
    MdZ

    Hello MdZ,
    If you can suggest me regarding TO for Group...
    Using VL06O (outbound delivery monitor); If I create the TO for outbound delivery, it prints the pick-sheet for each storage type.
    But if I attach the delivery to u2018WM groupu2019 and then create the u2018TO for Groupu2019 using VL06O it does not create any pick-sheet.
    If you can suggest somethingu2026
    Regards,
    JPS

  • Simultaneous auto packing of multiple deliveries using trans. VL02N

    Standard SAP does not allow simultaneous auto packing of multiple deliveries contained in one shipment in transaction VL02N. so i need to create custom transaction to allow the user to auto pack one or more deliveries simultaneously.I tried using recording of transaction VL02N for group of deleviries and it shows error in status message. is there any possiblity i can do auto pack of group of deleviries.

    resolved

  • Packing multiple deliveries

    We have this scenario where during a replenishment run (IS-Retail by the way) multiple deliveries were created for the same store, with same delivery date (multiple reasons, like the second delivery was created after an adjusment to the STO, trust me ... it just happens in the real world).
    These two deliveries will be shipped to the same store, in a single container, but after picking (TOs confirmed) the load ends up having two semi-full pallets that need consolidation.
    I have to tell the logistics people they can't do it, because SAP WM doesn't allow packing of two deliveries in the same pallet. This is.... absurd from a business perspective. Is there any workaround for this?

    There is no "workaround" but standard SAP does in fact allow packing multiple different delivery cartons into a higher HU. With the use of shipments to combine the deliveries the mixed deliveries can be packed into a shipment level pallet.
    It is common practice to combine deliveries with same ship-to and same delivery date in a single shipment to allow higher level packing.
    JR

  • *Help Needed* Adding multiple emails/mailing list in the email subscription

    Help Needed
    Hi,
    Can someone help me in adding multiple email address/mailing list in the email subscription for interactive reports in Apex 4.
    pls mail me at [email protected]
    Regards,
    Sunny

    The doc does not mention a separator for the email addresses because we only support one email address per subscription. I have logged a task for our next release to look at expanding it and allowing multiple.
    -- Sharon

  • Split the delivery or create multiple  deliveries

    Hi team,
    Sale order stock is grater than Truck capacity.
    We need a solution to either split the delivery; or create multiple deliveries at the time of delivery creation.
    Manually we are doing calculations for pallets capacity and then doing loading still some quantity pending or some space pending
    Is there any program that can split delivery via Sales order and create Outbound delivery through pallatization..
    Any such scenarios you have please suggest.?
    Thanks in Advance
    SAP MM

    Hi,
    Normally we can split the deliveries based on the following criteria
    1. Different delivery dates for line items.
    2. Different ship to parties for line items.
    3. Different routes for line items.
    But in your above case the issue is regarding truck capacity for which the system doesn't have any information.  So you can manually create a new delivery by adjusting the existing one or if you feel the issue is going to repeat for different items in future also then you can go build a custom logic in the system to address the delivery split using a user exit.
    Thanks,

  • Single invoice for multiple deliveries

    hi friends,
    its a case of multiple deliveries in single inoice. split analysis shows split due to defferent header data , number of foreign trade data . As far as I know every delivery is bound to have a unique foreign trade data. How can I combine deliveries into one single invoice.My customer, material , order type , delivery type are all the same.
    Pl. help.
    regards,
    rahul

    Hi,
    In your case ,kindly check the copy control configuration  in VTFL for the field  " Determ.export data     B--Redetermine export data
    once it is maintained and system will combine multiple deliveries into one invoice in your case.
    copy control configuration                                                                               
    Target Bill. Type  FE                   From Delivery Type LF                  
                              Invoice                                    Delive                                                                               
    Copying requirements   003  Header/dlv.-related                                  
    Determ.export data        B     Redetermine the export data                                                      
    Allocation number      E                                                         
    Reference number       A                                                         
    Copy item number      Tick
    If you have any further clarifications let me know
    REgards
    Damu                                                                               
    REgards
    Damu

  • Single invoice for multiple deliveries STO PO

    Hi All,
    Need to create single invoice from multiple deliveries. These deliveries are created from STO PO  and not from sales order...
    VF04 will not work..
    Please let me know if there is any standard t. code for creation of single invoice out of multiple STO PO deliveries...
    Thanks
    Vishwas

    Hi
    The considerations are equal. The question is check in copy rules (for instance, in VTFL you must check the pair IV-NLCC, instead F2-LF). See note 1561427 - Billing document split and related notes.
    I hope this helps you
    Regards
    Eduardo

  • Single invoice for multiple deliveries in Export scenario

    Hi All
    I am trying to create a single invoice for multiple deliveries. In case of Local Sales i am able to do it.
    But when it comes to export sales the system is not allowing me to create Single invoice for 2 deliveries . This is a export scenario. Can you suggest... When  i am checking the split invoice log it says split due to header data "Number of foreign trade data i"
    Plz suggest.
    Thanks
    Rishi

    Thanks G. Lakshmipathi
    Resolved
    As per the split analysis, System was checking the number generated for Foreign Trade data at delivery level.
    As told  i have Tried maintaining the Indication at copy control level VTFL "Redetermination of Foreign Trade Data at Billing level".
    This has resolved my Issue.
    Thanks Again
    Rishi

  • Adding multiple same-name nodes from one xml into another

    Hi,
    Following on from my question the other day (Adding multiple different nodes from one xmltype into another), I now have a slightly more complex requirement that I cannot work out where to start, assuming that it's something that can reuse some/all of yesterday's work (thanks again, odie_63!). ETA: I'm on 11.2.0.3
    So, here's the (slightly amended) xml along with yesterday's solution:
    with sample_data as (select xmltype('<root>
                                           <xmlnode>
                                             <subnode1>val1</subnode1>
                                             <subnode2>val2</subnode2>
                                           </xmlnode>
                                           <xmlnode>
                                             <subnode1>val3</subnode1>
                                             <subnode2>val4</subnode2>
                                           </xmlnode>
                                         </root>') xml_to_update,
                                xmltype('<a>
                                           <b>valb</b>
                                           <c>valc</c>
                                           <d>
                                             <d1>vald1</d1>
                                             <d2>vald2</d2>
                                           </d>
                                           <e>vale</e>
                                           <f>valf</f>
                                           <g>
                                             <g1>valg1</g1>
                                             <g2>valg2</g2>
                                           </g>
                                           <h>
                                             <h1>valh1</h1>
                                             <h2>valh2</h2>
                                           </h>
                                           <multinode>
                                             <name>fred</name>
                                             <type>book</type>
                                             <head>1</head>
                                           </multinode>
                                           <multinode>
                                             <name>bob</name>
                                             <type>car</type>
                                             <head>0</head>
                                           </multinode>                                        
                                         </a>') xml_to_extract_from
                          from   dual)
    select xmlserialize(document
               xmlquery(
                 'copy $d := $old
                  modify (
                    insert node element extrainfo {
                      $new/a/b
                    , $new/a/d
                    , $new/a/f
                    , $new/a/h
                    } as first into $d/root
                  return $d'
                 passing sd.xml_to_update as "old"
                       , sd.xml_to_extract_from as "new"
                 returning content
             indent
    from sample_data sd;
    That gives me:
    <root>
      <extrainfo>
        <b>valb</b>
        <d>
          <d1>vald1</d1>
          <d2>vald2</d2>
        </d>
        <f>valf</f>
        <h>
          <h1>valh1</h1>
          <h2>valh2</h2>
        </h>
      </extrainfo>
      <xmlnode>
        <subnode1>val1</subnode1>
        <subnode2>val2</subnode2>
      </xmlnode>
      <xmlnode>
        <subnode1>val3</subnode1>
        <subnode2>val4</subnode2>
      </xmlnode>
    </root>
    However, I now need to add in a set of new nodes based on information from the <multinode> nodes, something like:
    <root>
      <extrainfo>
        <b>valb</b>
        <d>
          <d1>vald1</d1>
          <d2>vald2</d2>
        </d>
        <f>valf</f>
        <h>
          <h1>valh1</h1>
          <h2>valh2</h2>
        </h>
        <newnode>
          <name>fred</name>
          <type>book</type>
        </newnode>
        <newnode>
          <name>bob</name>
          <type>car</type>
        </newnode>
      </extrainfo>
      <xmlnode>
        <subnode1>val1</subnode1>
        <subnode2>val2</subnode2>
        <type>book</type>
      </xmlnode>
      <xmlnode>
        <subnode1>val3</subnode1>
        <subnode2>val4</subnode2>
        <type>car</type>
      </xmlnode>
    </root>
    If it's easier, I *think* we would be ok with something like:
    <newnode>
      <type name="fred">book</type>
      <type name="bob">car</type>
    </newnode>
    The closest I've come is:
    with sample_data as (select xmltype('<root>
                                           <xmlnode>
                                             <subnode1>val1</subnode1>
                                             <subnode2>val2</subnode2>
                                           </xmlnode>
                                           <xmlnode>
                                             <subnode1>val3</subnode1>
                                             <subnode2>val4</subnode2>
                                           </xmlnode>
                                         </root>') xml_to_update,
                                xmltype('<a>
                                           <b>valb</b>
                                           <c>valc</c>
                                           <d>
                                             <d1>vald1</d1>
                                             <d2>vald2</d2>
                                           </d>
                                           <e>vale</e>
                                           <f>valf</f>
                                           <g>
                                             <g1>valg1</g1>
                                             <g2>valg2</g2>
                                           </g>
                                           <h>
                                             <h1>valh1</h1>
                                             <h2>valh2</h2>
                                           </h>
                                           <multinode>
                                             <name>fred</name>
                                             <type>book</type>
                                             <head>1</head>
                                           </multinode>
                                           <multinode>
                                             <name>bob</name>
                                             <type>car</type>
                                             <head>0</head>
                                           </multinode>                                        
                                         </a>') xml_to_extract_from
                          from   dual)
    select xmlserialize(document
               xmlquery(
                 'copy $d := $old
                  modify (
                    insert node element extrainfo {
                      $new/a/b
                    , $new/a/d
                    , $new/a/f
                    , $new/a/h
                    , element newnode {
                                       $new/a/multinode/name
                                       ,$new/a/multinode/type
                    } as first into $d/root
                  return $d'
                 passing sd.xml_to_update as "old"
                       , sd.xml_to_extract_from as "new"
                 returning content
             indent
             ) fred
    from sample_data sd;
    Which produces:
    <newnode>
      <name>fred</name>
      <name>bob</name>
      <type>book</type>
      <type>car</type>
    </newnode>
    - obviously not right!
    Can anyone provide any hints? I've tried searching for similar examples, but I mustn't be putting in the right search terms or something!

    odie_63 wrote:
    or, similarly, to get the alternate output :
    copy $d := $old
    modify (
      insert node element extrainfo {
        $new/a/b
      , $new/a/d
      , $new/a/f
      , $new/a/h
      , element newnode {
          for $i in $new/a/multinode
          return element type {
            attribute name {data($i/name)}
          , data($i/type)
      } as first into $d/root
    return $d
    So we're going with the second method, but I've discovered that the "$i/name" node is not always present. When that happens, I would like to use a default value (for example, "george"). I promise I've searched and searched, but I'm completely failing to turn up anything that sounds remotely like what I'm after (seriously, I can't believe my google-fu sucks this badly!).
    Is there a simple way of doing it? The only thing that I've found that looks vaguely relevant is "declare default namespace...." but I'm not sure that that's the correct thing to use, or if it is, how I'm supposed to reference it when populating the attribute value.

Maybe you are looking for