Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Quantity change not taking place with BAPI_OUTB_DELIVERY_CHANGE

Former Member
0 Kudos

Hi All,

We are trying to change the delivery quantity for an outbound delivery with the bapi BAPI_OUTB_DELIVERY_CHANGE. I have set the following parameters :

delivery number

<b>item data</b> :

deliv_numb

deliv_item

material

dlv_qty (with the required new quantity )

fact_unit_nom (value 1 )

fact_unit_denom( value 1)

<b>item control</b> :

deliv_numb

deliv_item

chg_delqty ( value X )

I have written a program to call this BAPI after which i am calling BAPI_TRANSACTION_COMMIT

However the Bapi does not update the quantity in the delivery. It also does not return anything in the return table .

Am i missing any parameters or any procedure ? Is there a workaround to updating the quantity field in the outbound delivery ?

will be extremely thankful for any help forthcoming.

Amit

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Refer this as the check list of parameters that are to be passed:

Example

If you want to change the quantity for a distributed quantity, then following entries are required for the transfer to the connected system:

In the header data of outbound delivery parameter (HEADER_DATA)

The delivery number (DELIV_NUMB)

In parameter item data of outbound delivery (ITEM_DATA)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The delivery quantity in sales unit (DLV_QTY)

The actual delivery quantity in base UoM (DLV_QTY_IMUNIT)

The sales unit (SALES_UNIT)

The ISO code for the sales unit (SALES_UNIT_ISO)

The base unit of measure (BASE_UOM)

The ISO code for the base unit of measure (BASE_UOM_ISO)

In the control of the outbound delivery at item level parameter (ITEM_CONTROL)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The Change Delivery Quantity indicator(CHG_DELQTY)

If you do not make any further entries, the system copies the material number, plant, quantities as floating point numbers, volumes, weights, and their units from the original outbound delivery document.

Regards,

Ravi

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

Refer this as the check list of parameters that are to be passed:

Example

If you want to change the quantity for a distributed quantity, then following entries are required for the transfer to the connected system:

In the header data of outbound delivery parameter (HEADER_DATA)

The delivery number (DELIV_NUMB)

In parameter item data of outbound delivery (ITEM_DATA)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The delivery quantity in sales unit (DLV_QTY)

The actual delivery quantity in base UoM (DLV_QTY_IMUNIT)

The sales unit (SALES_UNIT)

The ISO code for the sales unit (SALES_UNIT_ISO)

The base unit of measure (BASE_UOM)

The ISO code for the base unit of measure (BASE_UOM_ISO)

In the control of the outbound delivery at item level parameter (ITEM_CONTROL)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The Change Delivery Quantity indicator(CHG_DELQTY)

If you do not make any further entries, the system copies the material number, plant, quantities as floating point numbers, volumes, weights, and their units from the original outbound delivery document.

Regards,

Ravi

Former Member
0 Kudos

Hi

<b>I hope you must have read the documenttaion of this BAPI before making any code changes.

Here is the documentation.</b>

FUNCTION Module -  BAPI_OUTB_DELIVERY_CHANGE


Functionality

You can use this method to change outbound deliveries in both the Enterprise Resource Planning system (ERP system) and the decentralized Warehouse Management System (WMS), according to their respective distribution to the decentralized WMS. You can make these changes in the central ERP system and in the decentralized WMS. The interface ensures that outbound delivery data planned for a comparison is identical in both systems, even after subsequent changes.

Changing Header Data:
Weight (gross weight and net weight)
Volume
Door
Delivery date
Delivery priority
Route
Incoterms
Unloading point
Delete delivery
You can only delete deliveries in the decentralized system and copy this deletion to the central SAP ERP system, if the decentralized WMS is an external system. For this, set the DLV_DEL indicator in the HeaderControl parameter.
Changing Item Data:
Quantity
Weight (gross weight and net weight)
Volume
Expiration date
Delete item
Changing Partner Data:
Change or delete partner for a partner function
Change a partner's address
If you want to change partner data, the system checks the Customizing settings of the other system, to see whether this type of change is permitted.
Change Process Flow
1. You subsequently change an outbound delivery in the central ERP system or the decentralized WMS, after the delivery was distributed to the decentralized WMS.
2. If the decentralized WMS is an SAP system, the system blocks the relevant outbound delivery in the partner system as soon as you call the change transaction.
3. When you save the changes to the outbound delivery, the system sends a synchronous change request to the connected partner system.
4. The partner system uses the synchronous change request to simulate the change, then either accepts or rejects the change request.
5. If the partner system rejects the change request, you cannot make the change. The system cancels processing and displays a relevant error message.
6. If the partner system accepts the change request, the system saves the changes to the outbound delivery in the system in which you have made the changes. It then sends an asynchronous change request to the partner system.
7. This asynchrounous change request causes the partner system to update the outbound delivery data.
8. The system removes the cross-system lock for the changed outbound delivery.
Example
If you want to change the quantity for a distributed quantity, then following entries are required for the transfer to the connected system:

In the header data of outbound delivery parameter (HEADER_DATA)
The delivery number (DELIV_NUMB)
In parameter item data of outbound delivery (ITEM_DATA)
The delivery number (DELIV_NUMB)
The delivery item (DELIV_ITEM)
The delivery quantity in sales unit (DLV_QTY)
The actual delivery quantity in base UoM (DLV_QTY_IMUNIT)
The sales unit (SALES_UNIT)
The ISO code for the sales unit (SALES_UNIT_ISO)
The base unit of measure (BASE_UOM)
The ISO code for the base unit of measure (BASE_UOM_ISO)
In the control of the outbound delivery at item level parameter (ITEM_CONTROL)
The delivery number (DELIV_NUMB)
The delivery item (DELIV_ITEM)
The Change Delivery Quantity indicator(CHG_DELQTY)
If you do not make any further entries, the system copies the material number, plant, quantities as floating point numbers, volumes, weights, and their units from the original outbound delivery document.


Notes
Changes to the packing data are not synchronized in the central ERP system.

For subsequent changes to a distributed inbound delivery, the following prerequisites must be fulfilled:

All items in the distribution-relevant inbound delivery have the same decentrally-managed warehouse number.
You have generated a distribution model for inbound deliveries. For more information, see the implementation guide (IMG) under Logistics Execution -> Decentralized WMS Integration -> Central Processing -> Distribution -> Generate Distribution Model.
In Customizing for Shipping under Deliveries  -> Define Delivery Types -> Distribution Mode, you have specified whether the system should distribute the delivery automatically after document creation, or whether distribution should be suppressed so that you can trigger distribution yourself using the delivery monitor.
If you use an external system as the decentralized WMS, you must ensure that there is a blocking system for the decentralized system, which prevents a delivery from being processed in both systems at the same time. For more information on the cross-system lock, see the SAP Library under Basis -> Client-Server Technology -> Cross-System Lock (CSL).
If you use the asynchronous interface for the actual transfer of the outbound delivery changes (IDoc category SHP_OBDLV_CHANGE), you must make sure that the structure definition of the IDoc is correct as you construct the IDoc. You should take particular care not to switch the segment sequence.

Batch Split in the Decentralized WMS
If you change a batch subitem from a distributed outbound delivery in the decentralized WMS, then this batch subitem already exists in the central ERP system.
The fields HIERARITEM and USEHIERITM are empty. The system copies the batch subitem in the DELIV_ITEM field.
If you change the quantity of a batch main item from a distributed outbound delivery in the decentralized WMS, then this batch main item already exists in the central ERP system.
The fields HIERARITEM and USEHIERITM are empty. The system copies the batch subitem into the DELIV_ITEM field.
If you perform a batch split for a distributed outbound delivery in the decentralized WMS, only the batch main item exists at that time in the central ERP system.
If, for example, you create two batch subitems, three item segments ItemData are generated for transmission to the central ERP system:
The item segment for the batch main item HIERARITEM is empty.
The delivery quantity and base quantity are empty.
For each subitem, the system generates an item segment with the following fields:
DELIV_ITEM contains the number of the batch subitem.
HIERARITEM contains the number of the batch main item.
USEHIERITM with value 1 shows that the subitem is used as a batch subitem.
The quantity fields match the quantities in the batch subitems.
The central ERP system performs the batch split subsequently for the distributed outbound delivery.

Parameters
HEADER_DATA
HEADER_CONTROL
DELIVERY
TECHN_CONTROL
HEADER_PARTNER
HEADER_PARTNER_ADDR
HEADER_DEADLINES
ITEM_DATA
ITEM_CONTROL
ITEM_SERIAL_NO
SUPPLIER_CONS_DATA
EXTENSION1
EXTENSION2
RETURN
TOKENREFERENCE

Exceptions
Function Group
V50I

Hope this will help.

Please reward suitable points.

Regards

- Atul

SatheeshKumara1
Participant
0 Kudos

hi amit,

you have to use call function 'BAPI_TRANSACTION_COMMIT'

after ur BAPI