[Home] [Help]
14: PROCEDURE update_document (
15: p_api_version IN NUMBER,
16: p_init_msg_list IN VARCHAR2,
17: x_return_status OUT NOCOPY VARCHAR2,
18: p_changes IN OUT NOCOPY PO_CHANGES_REC_TYPE,
19: p_run_submission_checks IN VARCHAR2,
20: p_launch_approvals_flag IN VARCHAR2,
21: p_buyer_id IN NUMBER,
22: p_update_source IN VARCHAR2,
61: G_UPDATE_SOURCE_OM CONSTANT VARCHAR2(10) := 'OM'; -- OM (Drop Ship Integration)
62:
63: -- Entity type constants:
64:
65: G_ENTITY_TYPE_CHANGES CONSTANT VARCHAR2(30) := 'PO_CHANGES_REC_TYPE';
66: G_ENTITY_TYPE_LINES CONSTANT VARCHAR2(30) := 'PO_LINES_REC_TYPE';
67: G_ENTITY_TYPE_SHIPMENTS CONSTANT VARCHAR2(30) := 'PO_SHIPMENTS_REC_TYPE';
68: G_ENTITY_TYPE_DISTRIBUTIONS CONSTANT VARCHAR2(30)
69: := 'PO_DISTRIBUTIONS_REC_TYPE';
92: -- for the same PO_LINE_ID.
93: --End of Comments
94: -------------------------------------------------------------------------------
95: PROCEDURE add_line_change_to_index (
96: p_chg IN PO_CHANGES_REC_TYPE,
97: i IN NUMBER
98: );
99:
100: -------------------------------------------------------------------------------
106: -- for the same LINE_LOCATION_ID.
107: --End of Comments
108: -------------------------------------------------------------------------------
109: PROCEDURE add_ship_change_to_index (
110: p_chg IN PO_CHANGES_REC_TYPE,
111: i IN NUMBER
112: );
113:
114: -------------------------------------------------------------------------------
120: -- change for the same PO_DISTRIBUTION_ID.
121: --End of Comments
122: -------------------------------------------------------------------------------
123: PROCEDURE add_dist_change_to_index (
124: p_chg IN PO_CHANGES_REC_TYPE,
125: i IN NUMBER
126: );
127:
128: -------------------------------------------------------------------------------
145: -- If none exists, adds a line change for p_po_line_id and returns its index.
146: --End of Comments
147: -------------------------------------------------------------------------------
148: FUNCTION find_line_change (
149: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
150: p_po_line_id IN PO_LINES.po_line_id%TYPE
151: ) RETURN NUMBER;
152:
153: -------------------------------------------------------------------------------
171: -- returns its index.
172: --End of Comments
173: -------------------------------------------------------------------------------
174: FUNCTION find_ship_change (
175: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
176: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE
177: ) RETURN NUMBER;
178:
179: -------------------------------------------------------------------------------
197: -- returns its index.
198: --End of Comments
199: -------------------------------------------------------------------------------
200: FUNCTION find_dist_change (
201: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
202: p_po_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE
203: ) RETURN NUMBER;
204:
205: -------------------------------------------------------------------------------
210: -- and p_split_shipment_num. If none exists, returns NULL.
211: --End of Comments
212: -------------------------------------------------------------------------------
213: FUNCTION get_split_ship_change (
214: p_chg IN PO_CHANGES_REC_TYPE,
215: p_po_line_id IN PO_LINES.po_line_id%TYPE,
216: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
217: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
218: ) RETURN NUMBER;
226: -- If none exists, returns NULL.
227: --End of Comments
228: -------------------------------------------------------------------------------
229: FUNCTION get_split_dist_change (
230: p_chg IN PO_CHANGES_REC_TYPE,
231: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
232: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
233: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
234: ) RETURN NUMBER;
243: -- and returns its index.
244: --End of Comments
245: -------------------------------------------------------------------------------
246: FUNCTION find_split_dist_change (
247: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
248: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
249: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
250: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
251: ) RETURN NUMBER;