DBA Data[Home] [Help]

PACKAGE: APPS.OE_DEMAND_STREAM_PROCESSOR

Source


1 PACKAGE OE_DEMAND_STREAM_PROCESSOR AUTHID CURRENT_USER AS
2 /* $Header: OEXDSPXS.pls 115.0 99/07/16 08:12:23 porting ship $ */
3 
4 
5 
6 Original_Sys_Ref_Exists EXCEPTION;
7 
8 
9 --
10 --  NAME:    Order_Info.
11 --
12 --  DESCRIPTION:
13 --
14 --  This routine takes an order number and order type name
15 --  and returns the header_id, order_type_id, customer_id and open_flag
16 --  for that order.
17 --
18 --  Also, the entry status is returned which has the following values:
19 --
20 --  'BOOKED', 'ENTERED', 'PARTIAL' or the value of the s1 column if users
21 --  define something other than the above.
22 --
23 --  RETURN VALUES:
24 --
25 --  x_result:  'Y' if success, 'N' if failure.
26 
27 --  x_sqlcode: The SQLCODE for the statement that failed.  Typically, this
28 --             will be NO_DATA_FOUND if the order_number, order_type
29 --             combination does not exist in the database.
30 --
31 --   NOTE: x_sqlcode is not applicable when x_result is 'Y'
32 --
33 
34 PROCEDURE order_info
35   (
36    x_order_number      IN    NUMBER,
37    x_order_type_name   IN    VARCHAR2,
38    x_header_id         OUT   NUMBER,
39    x_order_type_id     OUT   NUMBER,
40    x_customer_id       OUT   NUMBER,
41    x_open_flag         OUT   VARCHAR2,
42    x_entry_status      OUT   VARCHAR2,
43    x_po_number         OUT   VARCHAR2,
44    x_result            OUT   VARCHAR2,
45    x_sqlcode           OUT   NUMBER
46    );
47 
48 
49 --
50 --  NAME:    Order_Info.
51 --
52 --  DESCRIPTION:
53 --
54 --  This routine takes a header_id and returns the order number, order type
55 --  and open_flag for that order.
56 --
57 --  Also, the entry status is returned which has the following values:
58 --
59 --  'BOOKED', 'ENTERED', 'PARTIAL' or the value of the s1 column if users
60 --  define something other than the above.
61 --
62 --  RETURN VALUES:
63 --
64 --  x_result:  'Y' if success, 'N' if failure.
65 
66 --  x_sqlcode: The SQLCODE for the statement that failed.  Typically, this
67 --             will be NO_DATA_FOUND if the order_number, order_type
68 --             combination does not exist in the database.
69 --
70 --   NOTE: x_sqlcode is not applicable when x_result is 'Y'
71 --
72 
73 PROCEDURE order_info
74   (
75    x_header_id         IN     NUMBER,
76    x_order_number      OUT    NUMBER,
77    x_order_type_name   OUT    VARCHAR2,
78    x_open_flag         OUT   VARCHAR2,
79    x_entry_status      OUT   VARCHAR2,
80    x_po_number         OUT   VARCHAR2,
81    x_result            OUT   VARCHAR2,
82    x_sqlcode           OUT   NUMBER
83    );
84 
85 
86 PROCEDURE delete_interface_records
87    (
88 	x_order_source_id		IN	NUMBER,
89 	x_original_system_reference	IN	VARCHAR2,
90 	x_request_id			IN	NUMBER		Default	NULL
91    );
92 
93 --
94 --   NAME:  Lock_Demand_Stream
95 --
96 --   DESCRIPTION:  This routine will obtain all the locks necessary for a particular
97 --   Releaese Accounting Demand Stream.   The following data gets locked for the
98 --   demand_stream_id passed in as the argument.
99 --
100 --   * Open ATO Lines that have not yet been manufacturing released.
101 --   * Other open  Lines that have not yet been fully pick released.
102 --   * Unreleased Line Details for these lines.
103 --   * Backordered picking lines for this demand_stream_id that have not been
104 --     fully backorder released.
105 --   * Unreleased backordered picking line details for these backordered
106 --     picking lines.
107 --
108 --   RETURN VALUES:
109 --
110 --   Returns the sqlcode of the locking statement.  This should be checked to
111 --   see what was the reason for lock failure, or whether the lock request succeeded.
112 --
113 
114 
115 FUNCTION lock_demand_stream
116    (
117     x_demand_stream_id IN    NUMBER
118     ) RETURN NUMBER;
119 
120 --
121 --   NAME: next_line_number
122 --
123 --    DESCRIPTION: This routine takes a header_id for an order and returns the
124 --                 next line number for the lines of that order.  This will be
125 --                 used by release accounting to get new line number when they
126 --                 are inserting lines in interface tables.
127 --
128 --   NOTE:        This routine assumes that the header_id exists in the
129 --                database.
130 --
131 --   RETURN VALUES:
132 --     x_result:  'Y' if success, 'N' if failure.
133 --     x_sqlcode: The SQLCODE for the statement that failed.
134 --
135 --   NOTE: x_sqlcode is not applicable when x_result is 'Y'
136 --
137 
138 PROCEDURE next_line_number
139    (
140     x_header_id        IN    NUMBER,
141     x_line_number      OUT   NUMBER,
142     x_result           OUT   VARCHAR2,
143     x_sqlcode          OUT   NUMBER
144     );
145 
146 --
147 --  NAME: set_original_system_reference
148 --
149 --  DESCRIPTION: This routine takes a header_id and updates the
150 --  original_system_source_code and original_system_reference information
151 --  as specified by the x_order_source_id and x_original_system_reference.
152 --
153 --  If no original_system_reference is passed, the system generates an
154 --  automatic original_system_reference by concatening Order Number, Order
155 --  Type.
156 --
157 --   Raises an exception OE_DEMAND_STREAM_PROCESSOR.Original_Sys_Ref_Exists
158 --   if the eventual combination of original_system_source_code and
159 --   original_system_reference already exist in the database.
160 --   The calling program must handle this exception.
161 --
162 --   RETURN_VALUES:
163 --     x_result:  'Y' if success, 'N' if failure.
164 --     x_sqlcode: The SQLCODE for the statement that failed.
165 --
166 
167 FUNCTION set_original_system_reference
168    (
169     x_header_id                     IN      NUMBER,
170     x_order_source_id 		    IN      NUMBER,
171     x_original_system_reference     IN      VARCHAR2 DEFAULT NULL,
172     x_result                        OUT     VARCHAR2,
173     x_sqlcode                       OUT     NUMBER
174     ) RETURN VARCHAR2;
175 
176 --
177 --  NAME: line_scheduling_exists
178 --
179 --  DESCRIPTION: This routine takes a line_id and determines whether
180 --  any scheduling exists for this line or any of its components.
181 --
182 --  Release Accounting uses this information to determine whether or
183 --  not they can change order quantities on order lines through order
184 --  import.
185 --
186 --   RETURNS:
187 --
188 --  'Y'  if scheduling exists i.e. any line detail of this line or a
189 --  component is demanded, reserved or supply reserved.
190 --  Changes to quantities are not allowed
191 --
192 --  'N' if scheduling does not exist for this line or any of its
193 --  components.  Changes to quantities will be accepted.
194 --
195 
196 FUNCTION line_scheduling_exists
197   (
198    x_line_id				IN	NUMBER
199   ) RETURN VARCHAR2;
200 
201 pragma restrict_references( line_scheduling_exists, WNDS,WNPS);
202 
203 END OE_DEMAND_STREAM_PROCESSOR;