DBA Data[Home] [Help]

PACKAGE: APPS.PO_DOCUMENT_CONTROL_PUB

Source


1 PACKAGE PO_Document_Control_PUB AS
2 /* $Header: POXPDCOS.pls 120.1 2006/08/23 08:39:07 arudas noship $ */
3 /*#
4  * Provides the ability to cancel Purchasing documents directly through
5  * an API.
6  *
7  * The API performs all of the same processing that would be done if a
8  * cancellation was
9  * requested through the PO Summary Form Control window.
10  *
11  * @rep:scope public
12  * @rep:product PO
13  * @rep:displayname Purchase Order Document Control APIs
14  *
15  * @rep:category BUSINESS_ENTITY PO_BLANKET_PURCHASE_AGREEMENT
16  * @rep:category BUSINESS_ENTITY PO_CONTRACT_PURCHASE_AGREEMENT
17  * @rep:category BUSINESS_ENTITY PO_GLOBAL_BLANKET_AGREEMENT
18  * @rep:category BUSINESS_ENTITY PO_GLOBAL_CONTRACT_AGREEMENT
19  * @rep:category BUSINESS_ENTITY PO_STANDARD_PURCHASE_ORDER
20  * @rep:category BUSINESS_ENTITY PO_BLANKET_RELEASE
21  * @rep:category BUSINESS_ENTITY PO_PLANNED_PURCHASE_ORDER
22  * @rep:category BUSINESS_ENTITY PO_PLANNED_RELEASE
23  */
24 
25 g_pkg_name CONSTANT VARCHAR2(30) := 'PO_Document_Control_PUB';
26 
27 /*#
28  * Provides the ability to cancel Purchasing documents directly through
29  * an API.
30  *
31  * The API performs all of the same processing that would be done if a
32  * cancellation was requested through the PO Summary Form Control
33  * window.
34  *
35  * @param p_api_version Null not allowed. Value should match the
36  * current version of the API (currently 1.0). Used by the API to
37  * determine compatibility of API and calling program.
38  * @rep:paraminfo  {@rep:required}
39  *
40  * @param p_init_msg_list Must be FND_API.G_TRUE. Used by API callers
41  * to ask the API to initialize the message list (for returning
42  * messages).
43  * @rep:paraminfo  {@rep:required}
44  *
45  * @param p_commit Must be FND_API.G_TRUE. Used by API callers to ask
46  * the API to commit on their behalf after performing its function.
47  * For action action this must be used to prevent data inconsistencies.
48  * @rep:paraminfo  {@rep:required}
49  *
50  * @param x_return_status Possible Values are:
51  * 'S' = SUCCESS - Cancellation completed without errors.
52  * 'E' = ERROR - Cancellation resulted in an error.
53  * 'U' = UNEXPECTED ERROR - Unexpected error.
54  * @rep:paraminfo  {@rep:required}
55  *
56  * @param p_doc_type Null not allowed. Possible Values are: 'PO', 'PA',
57  * or 'RELEASE
58  * @rep:paraminfo {@rep:required}
59  *
60  * @param p_doc_subtype Null not allowed. Possible Values are STANDARD,
61  * PLANNED, BLANKET, CONTRACT, or SCHEDULED.
62  * @rep:paraminfo {@rep:required}
63  *
64  * @param p_doc_id IN NUMBER Internal ID for Purchase Order.
65  * Either p_doc_id or p_doc_num required. (i.e.
66  * PO_HEADERS_ALL.po_header_id)
67  * @rep:paraminfo  {@rep:required}
68  *
69  * @param p_doc_num IN NUMBER Document Num for Purchase Order.
70  * Either p_doc_id or p_doc_num required.(i.e. PO_HEADERS_ALL.segment1)
71  * @rep:paraminfo  {@rep:required}
72  *
73  * @param p_release_id Internal ID for Release. If Doc Type is Release
74  * either p_release_id or p_release_num required (i.e.
75  * PO_RELEASES_ALL.po_release_id)
76  * @rep:paraminfo  {@rep:required}
77  *
78  * @param p_release_num Release Number. If Doc Type is Release either
79  * p_release_id or p_release_num required (i.e.
80  * PO_RELEASES_ALL.release_num)
81  * @rep:paraminfo  {@rep:required}
82  *
83  * @param P_doc_line_id May be used to cancel a single line (and all
84  * its shipments). If cancelling a line or shipment, either
85  * p_doc_line_id or p_doc_line_num is required. (i.e.
86  * PO_LINES_ALL.po_line_id)
87  * @rep:paraminfo  {@rep:required}
88  *
89  * @param p_doc_line_num Used to Cancel a single line (and all its
90  * shipments).If cancelling a line or shipment, either p_doc_line_id or
91  * p_doc_line_num is required (i.e. PO_LINES_ALL.line_num)
92  * @rep:paraminfo  {@rep:required}
93  *
94  * @param p_doc_line_loc_id Used to Cancel a single shipment. If
95  * cancelling shipment either p_doc_line_loc_id or p_doc_shipment_id is
96  * required (i.e. PO_LINE_LOCATIONS_ALL.line_location_id)
97  * @rep:paraminfo  {@rep:required}
98  *
99  * @param p_doc_shipment_num Used to Cancel a single shipment. If
100  * cancelling shipment either p_doc_line_loc_id or p_doc_shipment_id is
101  * required (i.e. PO_LINE_LOCATIONS_ALL.shipment_num)
102  * @rep:paraminfo  {@rep:required}
103  *
104  * @param p_action Null not allowed. Value should be 'CANCEL'
105  * @rep:paraminfo  {@rep:required}
106  *
107  * @param p_action_date Defaults to Sysdate. Date to be used for Cancel
108  * Date. Also use for encumbrance reversal if encumbrance accounting is
109  * used.
110  * @rep:paraminfo  {@rep:required}
111  *
112  * @param p_cancel_reason Reason to be recorded in cancel reason.
113  * @rep:paraminfo {@rep:innertype PO_LINES.cancel_reason}
114  * {@rep:required}
115  *
116  * @param p_cancel_reqs_flag Value should be 'Y' or 'N'. Used to
117  * perform cancellation of backing requisition, if one exists.
118  * @rep:paraminfo  {@rep:required}
119  *
120  * @param p_print_flag Default 'N'. Used to print purchase order after
121  * cancellation.
122  * @rep:paraminfo  {@rep:required}
123  *
124  * @param p_note_to_vendor Used to create a note to supplier to store
125  * on the document and print.
126  * @rep:paraminfo {@rep:innertype PO_HEADERS.note_to_vendor}
127  *
128  * @param p_use_gldate Value should be 'Y' or 'N'.Defaults to 'N'.
129  * Determines to which period the unreserved funds should be allocated.
130  * @rep:paraminfo  {@rep:required}
131  *
132  * @param p_org_id  Internal ID for Operating Unit to which document
133  * belongs. Not required if the document belongs to Current operating Unit
134  * or to the the Default Operating.
135  * @rep:paraminfo {@rep:innertype PO_HEADERS_ALL.org_id}
136  *
137  * @rep:displayname API that performs the control action p_action on
138  * the specified document.
139  *
140  */
141 PROCEDURE control_document
142    (p_api_version      IN   NUMBER,
143     p_init_msg_list    IN   VARCHAR2,
144     p_commit           IN   VARCHAR2,
145     x_return_status    OUT  NOCOPY VARCHAR2,
146     p_doc_type         IN   PO_DOCUMENT_TYPES.document_type_code%TYPE,
147     p_doc_subtype      IN   PO_DOCUMENT_TYPES.document_subtype%TYPE,
148     p_doc_id           IN   NUMBER,
149     p_doc_num          IN   PO_HEADERS.segment1%TYPE,
150     p_release_id       IN   NUMBER,
151     p_release_num      IN   NUMBER,
152     p_doc_line_id      IN   NUMBER,
153     p_doc_line_num     IN   NUMBER,
154     p_doc_line_loc_id  IN   NUMBER,
155     p_doc_shipment_num IN   NUMBER,
156     p_action           IN   VARCHAR2,
157     p_action_date      IN   DATE,
158     p_cancel_reason    IN   PO_LINES.cancel_reason%TYPE,
159     p_cancel_reqs_flag IN   VARCHAR2,
160     p_print_flag       IN   VARCHAR2,
161     p_note_to_vendor   IN   PO_HEADERS.note_to_vendor%TYPE,
162     p_use_gldate       IN   VARCHAR2 DEFAULT NULL,  -- <ENCUMBRANCE FPJ>
163     p_org_id           IN   NUMBER DEFAULT NULL --<Bug#4581621>
164    );
165 
166 
167 END PO_Document_Control_PUB;