DBA Data[Home] [Help]

PACKAGE: APPS.CHV_ITEM_ORDERS_S1

Source


1 PACKAGE CHV_ITEM_ORDERS_S1 AUTHID CURRENT_USER as
2 /* $Header: CHVPRIOS.pls 115.1 2002/11/26 23:55:49 sbull ship $ */
3 
4 /*===========================================================================
5   PACKAGE NAME:  CHV_ITEM_ORDERS_S1
6   DESCRIPTION:   This package contains the server side of Supplier Scheduling
7 		 APIs to select past due quantities and get authorization
8                  quantity.
9 
10   CLIENT/SERVER: Server
11 
12   OWNER:         Shawna Liu
13 
14   FUNCTION/
15 		 get_past_due_qty()
16                  get_auth_qty()
17 
18 ============================================================================*/
19 
20 /*===========================================================================
21   PROCEDURE NAME      :  get_past_due_qty
22 
23   DESCRIPTION         :  GET_PAST_DUE_QTY is a procedure to select all the past
24                          due quantities from CHV_ITEM_ORDERS table based on the
25                          start date.
26 
27   PARAMETERS          :  x_schedule_id                 in      NUMBER,
28 			 x_schedule_item_id            in      NUMBER,
29 			 x_horizon_start_date          in      DATE,
30                          x_past_due_qty_primary        in out  NUMBER,
31                          x_past_due_qty_purch          in out  NUMBER
32 
33   DESIGN REFERENCES   :
34 
35   ALGORITHM           :  Select sum(order_quantity), sum(order_quantity_primary)
36                          based on the schedule_id, schedule_item_id from
37                          CHV_ITEM_ORDERS where supply_document_type is 'RELEASE'
38                          and the due_date is less than x_horizon_start_date
39                          and return both the quantities to the calling procedure.
40 
41   NOTES               :  1. The reason that x_past_due_qty_primary and
42                             x_past_due_qty_purch are in out rather than out
43                             parameters is that the select into statement
44                             requires this setup based on PO coding standards.
45 
46   OPEN ISSUES         :  1. The exception handler seems to be redundant, since
47                             it is a select sum statement. Should it be kept?
48                          2. Order_quantity column of chv_item_orders table
49                             seems to be in purchasing UOM. Need to change the
50                             lable to order_quantity_purch if it is true.
51                             Ask Sri.
52                          3. Is column document_approval_status needed here?
53                             Ask Sri.
54 
55   CLOSED ISSUES       :
56 
57   CHANGE HISTORY      :  Created            26-MAR-1995     SXLIU
58 ==========================================================================*/
59 PROCEDURE get_past_due_qty(x_schedule_id                 IN      NUMBER,
60                            x_schedule_item_id            IN      NUMBER,
61                            x_horizon_start_date          IN      DATE,
62                            x_past_due_qty_primary        IN OUT NOCOPY  NUMBER,
63                            x_past_due_qty_purch          IN OUT NOCOPY  NUMBER);
64 
65 /*===========================================================================
66   PROCEDURE NAME      :  get_auth_qty
67 
68   DESCRIPTION         :  GET_AUTH_QTY is a procedure to retrieve authorization
69                          quantities from CHV_ITEM_ORDERS table based on both
70                          purchasing and primary UOM's.
71 
72   PARAMETERS          : x_schedule_id                 IN      NUMBER,
73                         x_schedule_item_id            IN      NUMBER,
74                         x_authorization_end_date      IN      DATE,
75                         x_authorization_qty           IN OUT  NUMBER,
76                         x_authorization_qty_primary   IN OUT  NUMBER
77 
78   DESIGN REFERENCES   :
79 
80   ALGORITHM           :   Select sum(order_quantity), sum(order_quantity_primary)
81                           from CHV_ITEM_ORDERS based on the x_schedule_id and
82                           x_schedule_item_id and document due_date must be less
83                           than the authorization end date.
84 
85   NOTES               :  1. The reason that x_authorization_qty_primary and
86                             x_authorization_qty are in out rather than out
87                             parameters is that the select into statement
88                             requires this setup based on PO coding standards.
89 
90   OPEN ISSUES         :  1. (Refer to OPEN ISSUES 1 and 2 for procedure
91                             get_past_due_qty above).
92                          2. Ask Sri about the second business rule in the
93                             scheduling processing design doc - "Return 0 if
94                             no records are found'.
95 
96   CLOSED ISSUES       :
97 
98   CHANGE HISTORY      :  Created            1-APR-1995     SXLIU
99 ==========================================================================*/
100 PROCEDURE get_auth_qty (x_schedule_id                 IN      NUMBER,
101                         x_schedule_item_id            IN      NUMBER,
102                         x_authorization_end_date      IN      DATE,
103                         x_authorization_qty           IN OUT NOCOPY  NUMBER,
104                         x_authorization_qty_primary   IN OUT NOCOPY  NUMBER);
105 
106 END CHV_ITEM_ORDERS_S1;