DBA Data[Home] [Help]

PACKAGE: APPS.OE_SALES_CAN_UTIL

Source


1 PACKAGE OE_SALES_CAN_UTIL AUTHID CURRENT_USER AS
2 /* $Header: OEXUCANS.pls 120.1.12020000.2 2012/07/03 10:06:45 amallik ship $ */
3 
4 --  Start of Comments
5 --  API name    OE_SALES_CAN_UTIL
6 --  Type        Private
7 --  Function
8 --
9 --  Pre-reqs
10 --
11 --  Parameters
12 --
13 --  Version     Current version = 1.0
14 --              Initial version = 1.0
15 --
16 --  Notes
17 --
18 --  End of Comments
19 
20 G_PKG_NAME         VARCHAR2(30) := 'OE_SALES_CAN_UTIL';
21 G_LINE_REC         OE_ORDER_PUB.Line_Rec_Type;
22 G_REQUIRE_REASON  BOOLEAN := FALSE;
23 G_ORDER_CANCEL    BOOLEAN := FALSE;
24 G_CANCELLATION_ACTION VARCHAR2(2) := 'N';  -- 12695580
25 
26 /* 7576948: IR ISO Change Management project Start */
27 
28 -- This global is added to check the header level cancellation
29 -- in IR ISO change management project. If this global is TRUE
30 -- then no line level IR ISO OE_GLOBALS.G_UPDATE_REQUISITION
31 -- delayed request will be logged for Schedule Ship Date change.
32 -- However, for ordered quantity change, if this global is TRUE,
33 -- delayed request will be logged but just to track the count of
34 -- lines cancelled under that header, which will be useful to
35 -- determine the total count of lines cancellaed for partial
36 -- order cancellation case.
37 G_IR_ISO_HDR_CANCEL BOOLEAN := FALSE;
38 
39 -- Since with IR ISO change management project, it is feasible
40 -- that if requisition header is cancelled, which is partially
41 -- shipped/received, corresponding internal sales order will
42 -- also be triggered for partial cancellation. If that is true
43 -- then for existing shipped but unfulfilled lines, which are
44 -- part of fulfillment set and waiting for fulfillment, may get
45 -- stuck, being existsing open line get cancelled from this
46 -- partial order cancellation flow. Thus, so as to push those
47 -- lines for fulfillment, we need to trigger their Fulfill-Line
48 -- workflow activity, which happens via below procdure. Earlier
49 -- this procedure was limited with usage in the current package
50 -- only, but with IR ISO CMS project, it is needed to be called
51 -- from  OE_Internal_Requisition_Pvt.Process_Line_Entity. So
52 -- now exposing it publically.
53 PROCEDURE Call_Process_Fulfillment(p_header_id IN NUMBER);
54 
55 -- For details on IR ISO CMS project, please refer to FOL >
56 -- OM Development > OM-GM > 12.1.1 > TDD > IR_ISO_CMS_TDD.doc
57 
58 /* IR ISO Change Management project End */
59 
60 PROCEDURE check_constraints
61 (   p_x_line_rec                  IN OUT NOCOPY OE_Order_PUB.Line_Rec_Type
62 ,   p_old_line_rec                  IN  OE_Order_PUB.Line_Rec_Type :=
63                                         OE_Order_PUB.G_MISS_LINE_REC
64 , x_return_status OUT NOCOPY VARCHAR2
65 
66 );
67 
68 PROCEDURE check_constraints
69 (   p_header_rec                      IN  OE_Order_PUB.Header_Rec_Type
70 ,   p_old_header_rec                  IN  OE_Order_PUB.header_Rec_Type:=
71                                         OE_Order_PUB.G_MISS_header_REC
72 , x_return_status OUT NOCOPY VARCHAR2
73 
74 );
75 
76 PROCEDURE update_service
77 (   p_line_rec                      IN  OE_Order_PUB.Line_Rec_Type
78 ,   p_old_line_rec                  IN  OE_Order_PUB.Line_Rec_Type :=
79                                         OE_Order_PUB.G_MISS_LINE_REC
80 , x_return_status OUT NOCOPY VARCHAR2
81 
82 );
83 
84 
85 FUNCTION Cal_Cancelled_Qty (
86    p_line_rec                      IN  OE_Order_PUB.Line_Rec_Type
87 ,   p_old_line_rec                  IN  OE_Order_PUB.Line_Rec_Type :=
88                                         OE_Order_PUB.G_MISS_LINE_REC
89 )Return Number;
90 
91 FUNCTION Cal_Cancelled_Qty2 (     -- INVCONV
92    p_line_rec                      IN  OE_Order_PUB.Line_Rec_Type
93 ,   p_old_line_rec                  IN  OE_Order_PUB.Line_Rec_Type :=
94                                         OE_Order_PUB.G_MISS_LINE_REC
95 )Return Number;
96 
97 
98 PROCEDURE perform_line_change
99 (   p_line_rec                      IN  OE_Order_PUB.Line_Rec_Type
100 ,   p_old_line_rec                  IN  OE_Order_PUB.Line_Rec_Type :=
101                                         OE_Order_PUB.G_MISS_LINE_REC
102 , x_return_status OUT NOCOPY varchar2
103 
104 );
105 
106 PROCEDURE perform_cancel_order
107 (   p_header_rec                      IN  OE_Order_PUB.header_Rec_Type
108 ,   p_old_header_rec                  IN  OE_Order_PUB.header_Rec_Type :=
109                                         OE_Order_PUB.G_MISS_header_REC
110 , x_return_status OUT NOCOPY varchar2
111 
112 );
113 
114 PROCEDURE Cancel_Remaining_Order
115 (   p_Header_Rec                   IN  OE_Order_PUB.Header_Rec_Type
116 				:= OE_Order_PUB.G_MISS_header_REC,
117     p_header_id                 IN NUMBER := FND_API.G_MISS_NUM
118 , x_return_status OUT NOCOPY varchar2
119 
120 );
121 
122 
123 FUNCTION Query_Rows
124 (   p_line_id                       IN  NUMBER :=
125                                         FND_API.G_MISS_NUM
126 ,   p_header_id                     IN  NUMBER :=
127                                         FND_API.G_MISS_NUM
128 ) RETURN OE_Order_PUB.Line_Tbl_Type;
129 
130 PROCEDURE Cancel_Wf
131 (
132 x_return_status OUT NOCOPY varchar2
133 , x_request_rec      IN OUT NOCOPY OE_Order_PUB.Request_Rec_Type
134 );
135 
136 END OE_SALES_CAN_UTIL;