Professional Documents
Culture Documents
Pick Pack and Ship Using Shipping Public API
Pick Pack and Ship Using Shipping Public API
Introduction:
The shipping Public APIs (Application Program Interface) are pl/sql packages
which when called using wrapper files will perform the same actions possible
from the Shipping applications UI.
The real time nature of the shipping APIs in Release 11i and R12 has
provided options for the customers to customize their shipping flows as per
the business needs.
In order to call these APIs we only need to pass the required parameters. It is
mandatory that all the required parameters need to be initialized before they
are passed to the called shipping API. The optional parameters are optional
and can be passed as additional information if needed.
The parameters can also be classified as standard parameters and specific
parameters.
Standard parameters are almost common to all the shipping APIs and the
Specific Parameters are specific to a particular shipping API and are discussed
seperately for each of the API called in the flow. These standard and specific
parameters can be one of the madatory or option parameter.
3. p_commit: Will commit the changes to the database. The Default Value is
FND_API.G_FALSE
4. x_return_status: Requests that the API return the status of the data after
it completes
its function.
Its necessary that the application context need to be set before making a call
to the shipping APIs from sql*plus.
This is done by calling FND_GLOBAL.APPS_INITIALIZE() procedure in the
beginning of the wrapper file.
The procedure APPS_INITIALIZE takes the following parameters
FND_GLOBAL.APPS_INITIALIZE(user_id IN number,
resp_id IN number,
resp_appl_id IN number,
security_group_id IN number);
You can obtain the valid values for each of these parameters from the
application forms session.
1. Arguments (input)
Each of the steps created in the flow are discussed in detail under the
following headings.
Book order:
Create an Order from order management Super User, Vision Operations (USA)
responsibility with the following details
Specific parameters:
The sample script attached here can be used to create a new delivery.
CREATE_DELIVERY.s
ql
The delivery detail can be assigned to the newly created delivery by using
the public API WSH_DELIVERY_DETAILS_PUB. Detail_to_Delivery.
Specific Parameters:
The sample script attached here can be used to assign the delivery detail to
the newly created delivery.
ASSIGN_DETAIL_TO
_DELIVERY.s ql
Pick Release:
Refer to the attached PICK_RELEASE.sql sample script which will pick releases
lines for a given delivery.
PICK_RELEASE.sql
Select move_order_line_id,organization_id,delivery_detail_id
From wsh_delivery_details
Where delivery_detail_id=p_delivery_detail_id
Manual Pack:
1. Creation of LPNs:
LPN creation is done using the public API WSH_CONTAINER_PUB.
Create_Container
Specific Parameters:
p_container_item_id => Key flexfield Id for the container
p_organization_id => Organization ID for the container.
p_quantity => Number of containers created
p_container_name => Container name if creating just one container
x_container_ids => Table of the newly created container IDs of
type
WSH_UTIL_CORE.ID_TAB_TYPE, which is a
table of
type number indexed by binary integers
CREATE_CONTAINE
R.s ql
LPN Created
2. Perform Manual Pack operation using the LPN created previously
In order to pack the delivery detail line item using the LPN created
previously, we can use the public API
WSH_CONTAINER_PUB.Container_Actions.
Specific Parameters:
p_container_name => Name of the container
p_action_code => Action code PACK
p_detail_tab => Delivery detail to be packed. Input table of delivery
detail ids of
type WSH_UTIL_CORE.ID_TAB_TYPE, which is a table
of
type Number indexed by binary integers.
Refer to the attached MANUAL_PACK.sql sample script, which will enable the
packing action on the created LPNs.
MANUAL_PACK.sql
Packing completed. LPN (CT-13) is displayed in the Parent LPN field of the
delivery detail
Unpack:
We can unpack the packed delivery line by making call to the container public
API WSH_CONTAINER_PUB.Container_Actions
Specific Parameters:
p_container_name=> Name of the container
p_action_code => Action code UNPACK
p_detail_tab => Delivery detail to be unpacked. Input table of delivery
detail ids of type
WSH_UTIL_CORE.ID_TAB_TYPE which is a table of type
Number
indexed by binary integers.
UNPACK.s ql
The delivery detail for the LPN line, which was unpacked, previously needs to
be unassigned from the delivery.
Using WSH_DELIVERY_DETAILS_PUB.Detail_to_Delivery shipping API, the
delivery detail is unassigned from the delivery.
Specific parameters:
p_TabOfDelDets => Table of Delivery Detail ids
p_action => Action UNASSIGN
p_delivery_id or delivery_name => Delivery id or delivery name to which
the detail lines will be assigned
UNASSIGN_FROM_D
ELIVERY.sql
The Auto-Pack Master behaves very much similar to Auto-Pack except that it
goes one step further and packs the created detail containers into one or
more parent (master) container(s).
Specific Parameters:
P_entity_tab => Table of ids of either lines or containers or deliveries
that need to
be autopacked of type WSH_UTIL_CORE.ID_TAB_TYPE
which is a table of type Number indexed by binary
integers.
P_entity_type => Type of entity id contained in the entity_tab that needs
to be
autopacked ('L' - lines, 'C' -containers or 'D' -
deliveries).
AUTOPACK_MASTER
.s ql
Autopack completed. The item being shipped is packed in LPN 251 and the
LPN 251 is further packed on to Master LPN 252 (shown under Parent LPN
field)
Specific Parameters:
p_changed_attributes=>Attributes of ChangedAttributesTabType that are
to be updated.
p_source_code => Code for source system which updates
wsh_delivery_details table(always set to OE)
In order to specify in your logic about backorder or staged quantities you can
use the
following logic
UPDATE_SHIPPING_
ATTRIBUTES.s ql
Shipped Quantity (2) is updated in the delivery detail
Ship Confirm:
Ship Confirm can only be performed on Deliveries with Delivery Lines that
have been Pick Confirmed.
Ship confirming a delivery records the results of the picking process. These
results could be shipped, backordered, staged or cycle count or a
combination of all 4.
The workflow activity will be completed when the quantity picked is
recorded as Shipped.
If the ordered item is set up with the item attribute Shippable checked,
Ship Confirming is a prerequisite for Invoicing.
Shipped Quantities:
************************
Once the delivery is closed the Order Line is updated with the shipped
quantities and the status of the line is changed to Shipped. This enables
the order line to proceed to its next workflow activity.
The Ship Confirm transaction initiates the Inventory Interface to generate
the Issue of Stores transactions which will decrement inventory and remove
the material reservation. Then the OM interfaces is initiated to update the
Sales Order Line with Shipped quantities, freight charges, etc.
The Cost of goods sold account number that is passed to inventory is
workflow generated. In Inventory it creates a Material Distribution record that
is ultimately passed to the General Ledger.
If Ship confirm is partial the remaining quantity can be either staged or
backordered.
Backordered Quantities:
****************************
Backordered quantities are left in the Staging Subinventory. They are not
automatically returned to their source location.
A new pick release will be required before they can be ship confirmed.
The backordered quantity is removed from the delivery being Ship
Confirmed.and the reservation is removed making the quantity available to
ATP.
The Sales Order line splits into shipment schedules. One schedule will have
the quantity that was shipped and a status of Shipped. The other schedule
will have the quantity that was backordered and a status of Awaiting
Shipment.
Staged Quantities:
**********************
Staged quantities are left in the Staging subinventory and can be Ship
Confirmed at a later time. The staged quantity is removed from the delivery
being confirmed and optionally linked to a new delivery number.
The Sales Order line splits into shipment schedules. One schedule will have
the quantity that was shipped and a status of Shipped. The other schedule
will have the quantity that remained Staged with a status of Picked.
- Staged (Code Y)
The delivery line is pick confirmed; inventory is transferred from storage
subinventory to staging subinventory. It remains staged until ship confirm.
- Backordered (Code B)
Any of the following circumstances occurs: Pick release has processed the
delivery line and cannot find the entire quantity. This typically occurs when
the Oracle Inventory inventory balance indicates that there is not enough
material (either because there is not enough material or because the
inventory balance is incorrect).
At ship confirm, you: Enter Shipped Quantity that is less than Original
Requested Quantity Backorder the entire delivery quantity Transfer a
reservation to cycle count. This typically occurs when the material that you
want to ship: Has become unavailable, for example, damaged, between
picking and shipping. Is available and you backorder material for specific
business reasons. For example, all available material has been allocated to a
specific customer when you find out additional supply for other orders will be
delayed. For information on the backorder processing in pick release and ship
confirm,
- Shipped (Code C)
The delivery lines delivery is ship confirmed and posted as intransit, OM
Interface and Inventory Interface have processed, and the trip is closed.
- Cancelled (Code D)
The order line that the delivery line supports is cancelled.
=================================
:WSH_DELIVERIES_PUB.Delivery_Action:
=================================
We can call WSH_DELIVERIES_PUB.Delivery_Action API in order to ship
confirm the delivery Programatically.
Specific Parameters:
p_action_code(Required) => action to be performed on Delivery
p_delivery_id (Required) => delivery id on which the action is performed
p_trip_name => Trip identifier for assignment of trip to delivery
p_asg_pickup_loc_code => Stop location code for pickup assignment
p_asg_pickup_dep_date => Stop location departure date for pickup
assignment
p_asg_dropoff_loc_code=> Stop location code for dropoff assignment
p_asg_dropoff_dep_date=> Stop location departure date for dropoff
assignment
p_sc_action_flag => Ship Confirm option - S, B, T, A, C. Used
p_sc_intransit_flag => Ship Confirm set in-transit flag.
p_sc_close_trip_flag => Ship Confirm close trip flag.
p_sc_create_bol_flag => Ship Confirm create Bill of Lading flag
p_sc_stage_del_flag => Ship Confirm create delivery for stage quantity
flag
p_sc_trip_ship_method => Ship Confirm trip ship method.
p_wv_override_flag => Override flag for weight volume calculations.
x_trip_name => Name of autocreated trip.
SHIP_CONFIRM.s ql
Delivery Confirmed and in Closed status
Debugging Shipping API:
In some cases , calls to these APIs may not be successful. In such cases
calling the shipping debugger package(WHS_DEBUG_SV) in the wrapper file
will result in the creation of a detailed debug log file based on the various
debug profiles setup for shipping module .
The steps given below will show the step by step approach to generate debug
log file during the call to Shipping Public APIs.
1. Add the following lines into the Wrapper file before making a call to the
shipping
We are trying to create a delivery and have ensured that the organization
passed is not valid. The wrapper file has been embedded with lines calling
the Shipping Debugger. The Debug file generated in this case has the
relevant debug messages.
Refer to the sample wrapper file with enabled debugging and the debug log
file
generated as a result of passing invalid organization id.
CREATE_DELIVERY_ R3_10370163.dbg
WITH_DEBUGGER_ON.s ql
Metalink References:
Note 124593.1 Containerization in Shipping Execution.
Note 290432.1 How to Create a Debug File in Shipping Execution
Entered
oe_order_headers_all 1 record created in header table
oe_order_lines_all Lines for particular records
oe_price_adjustments When discount gets applied
oe_order_price_attribs If line has price attributes then populated
oe_order_holds_all If any hold applied for order like credit check etc.
Booked
oe_order_headers_all Booked_flag=Y Order booked.
wsh_delivery_details Released_status Ready to release
Pick Released
wsh_delivery_details Released_status=Y Released to Warehouse (Line has
been released to Inventory for processing)
wsh_picking_batches After batch is created for pick release.
mtl_reservations This is only soft reservations. No physical movement of
stock
Full Transaction
mtl_material_transactions No records in mtl_material_transactions
mtl_txn_request_headers
mtl_txn_request_lines
wsh_delivery_details Released to warehouse.
wsh_new_deliveries if Auto-Create is Yes then data populated.
wsh_delivery_assignments deliveries get assigned
Pick Confirmed
wsh_delivery_details Released_status=Y Hard Reservations. Picked the stock.
Physical movement of stock
Ship Confirmed
Autoinvoice