DBA Data[Home] [Help]

PACKAGE: APPS.OE_SHIP_CONFIRMATION_PUB

Source


1 PACKAGE OE_Ship_Confirmation_Pub AUTHID CURRENT_USER AS
2 /* $Header: OEXPSHCS.pls 120.4.12020000.1 2012/06/26 09:15:30 appldev ship $ */
3 /*#
4 * This public package contains methods related to ship confirmation
5 * Of order lines in Order Management
6 * @rep:scope public
7 * @rep:product ONT
8 * @rep:lifecycle active
9 * @rep:displayname Ship Conformation
10 * @rep:category BUSINESS_ENTITY ONT_SALES_ORDER
11 */
12 
13 TYPE Req_Quantity_Rec_Type	IS RECORD
14 (
15 	line_id			NUMBER := FND_API.G_MISS_NUM
16 ,	requested_quantity	NUMBER := FND_API.G_MISS_NUM
17 ,	requested_quantity2	NUMBER := FND_API.G_MISS_NUM
18 ,	shipping_quantity	NUMBER := FND_API.G_MISS_NUM
19 ,	shipping_quantity_uom	VARCHAR2(3) := FND_API.G_MISS_CHAR
20 ,	shipping_quantity2	NUMBER := FND_API.G_MISS_NUM
21 ,	shipping_quantity_uom2	VARCHAR2(3) := FND_API.G_MISS_CHAR
22 ,	pending_quantity	NUMBER := FND_API.G_MISS_NUM
23 ,	pending_quantity2	NUMBER := FND_API.G_MISS_NUM
24 ,	pending_requested_flag	VARCHAR2(1) := FND_API.G_MISS_CHAR
25 );
26 
27 TYPE Req_Quantity_Tbl_Type IS TABLE OF Req_Quantity_Rec_Type
28 	INDEX BY BINARY_INTEGER;
29 
30 
31 PROCEDURE Ship_Confirm
32 (
33     p_api_version_number         IN   NUMBER
34 ,   p_line_tbl                   IN   OE_Order_PUB.Line_Tbl_Type
35 ,   p_line_adj_tbl               IN   OE_ORDER_PUB.Line_adj_Tbl_Type
36 ,   p_req_qty_tbl                IN   Req_Quantity_Tbl_Type
37 ,   x_return_status              OUT NOCOPY /* file.sql.39 change */  VARCHAR2
38 ,   x_msg_count                  OUT NOCOPY /* file.sql.39 change */  NUMBER
39 ,   x_msg_data                   OUT NOCOPY /* file.sql.39 change */  VARCHAR2
40 );
41 
42 
43 /*-----------------------------------------------------------------
44 pack J : OM interface (bulk) API and Record Types
45 ------------------------------------------------------------------*/
46 TYPE Ship_Line_Rec_Type IS RECORD
47 ( error_flag            OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
48  ,fulfilled_flag        OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
49  ,actual_shipment_date  OE_WSH_BULK_GRP.T_DATE := OE_WSH_BULK_GRP.T_DATE()
50  ,shipping_quantity2    OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
51  ,shipping_quantity     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
52  ,shipping_quantity_uom2 OE_WSH_BULK_GRP.T_V3   := OE_WSH_BULK_GRP.T_V3()
53  ,shipping_quantity_uom OE_WSH_BULK_GRP.T_V3   := OE_WSH_BULK_GRP.T_V3()
54  ,line_id               OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
55  ,header_id             OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
56  ,top_model_line_id     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
57  ,ato_line_id           OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
58  ,ship_set_id           OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
59  ,arrival_set_id        OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
60  ,inventory_item_id     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
61  ,ship_from_org_id      OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
62  ,line_set_id           OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
63  ,smc_flag              OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
64  ,over_ship_reason_code OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
65  ,requested_quantity    OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
66  ,requested_quantity2   OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
67  ,pending_quantity      OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
68  ,pending_quantity2     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
69  ,pending_requested_flag OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
70  ,order_quantity_uom    OE_WSH_BULK_GRP.T_V3   := OE_WSH_BULK_GRP.T_V3()
71  ,order_quantity_uom2   OE_WSH_BULK_GRP.T_V3   := OE_WSH_BULK_GRP.T_V3()
72  ,shipped_quantity      OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
73  ,shipped_quantity2     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
74  ,model_remnant_flag    OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
75  ,ordered_quantity      OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
76  ,ordered_quantity2     OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
77  ,item_type_code        OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
78  ,calculate_price_flag  OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
79  ,flow_status_code      OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
80  ,type                  OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
81  ,org_id                OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
82  ,ship_tolerance_below  OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
83  ,ship_tolerance_above  OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
84  ,shippable_flag        OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
85  ,source_type_code      OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()); -- Added for bug 6877315
86 
87 /*-----------------------------------------------------------------
88 Record used for ITS
89 ------------------------------------------------------------------*/
90 TYPE Ship_Adj_Rec_Type IS RECORD
91 ( cost_id               OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
92  ,automatic_flag        OE_WSH_BULK_GRP.T_V1   := OE_WSH_BULK_GRP.T_V1()
93  ,list_line_type_code   OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
94  ,charge_type_code      OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
95  ,header_id             OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
96  ,line_id               OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
97  ,adjusted_amount       OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM()
98  ,arithmetic_operator   OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
99  ,operation             OE_WSH_BULK_GRP.T_V30  := OE_WSH_BULK_GRP.T_V30()
100  ,price_adjustment_id   OE_WSH_BULK_GRP.T_NUM  := OE_WSH_BULK_GRP.T_NUM());
101 
102 /*-----------------------------------------------------------------
103 PROCEDURE Ship_Confirm_New
104 
105 This procedure is called by WSH at the time of ITS for HV.
106 ------------------------------------------------------------------*/
107 PROCEDURE Ship_Confirm_New
108 ( p_ship_line_rec      IN OUT NOCOPY Ship_Line_Rec_Type
109  ,p_requested_line_rec IN OUT NOCOPY Ship_Line_Rec_Type
110  ,p_line_adj_rec       IN OUT NOCOPY Ship_Adj_Rec_Type
111  ,p_bulk_mode          IN            VARCHAR2
112  ,p_start_index        IN            NUMBER
113  ,p_end_index          IN            NUMBER
114  ,x_msg_count          OUT NOCOPY /* file.sql.39 change */           NUMBER
115  ,x_msg_data           OUT NOCOPY    VARCHAR2
116  ,x_return_status      OUT NOCOPY    VARCHAR2);
117 
118 PROCEDURE Call_Notification_Framework
119 ( p_ship_line_rec  IN  Ship_Line_Rec_Type
120  ,p_index          IN  NUMBER := NULL
121  ,p_start_index    IN  NUMBER := NULL
122  ,p_end_index      IN  NUMBER := NULL
123  ,p_caller         IN  VARCHAR2);
124 
125 /*#
126 * This API ship confirms a line with zero shipped quantity and completes the
127 * SHIP_LINE (Ship) workflow activity, provided that tolerances across the line
128 * set for the input line are met. Parameter x_return_status reports API success
129 * or failure, and x_result_out narrows down the cause of failure.
130 * @param p_line_id      Input value of line id to be shipped with zero quantity
131 * @param x_result_out   Returns reason for failure (W = Workflow not at Ship:Notified,T = Tolerances not met, D = Delivery details already shipped)
132 * @param x_return_status   Return status (S = Success, E = Error, U = Unexpected Error)
133 * @param x_msg_count  Returns number of mesages generated while executing the API
134 * @param x_msg_data  Returns text of messages generated
135 * @rep:scope               public
136 * @rep:lifecycle           active
137 * @rep:displayname         Ship Confirm with Zero Quantity
138 */
139  PROCEDURE Ship_Zero
140 ( p_line_id  	   IN		NUMBER,
141   x_result_out	   OUT		NOCOPY VARCHAR2,
142   x_return_status  IN OUT	NOCOPY VARCHAR2,
143   x_msg_count      OUT          NOCOPY NUMBER,
144   x_msg_data       OUT          NOCOPY VARCHAR2);
145 
146 END OE_Ship_Confirmation_Pub;