1 PACKAGE INV_ITEM_ORG_ASSIGN_CP AUTHID CURRENT_USER AS
2 /* $Header: INVCOSGS.pls 115.13 2004/07/07 10:21:56 nesoni ship $ */
3 --+=======================================================================+
4 --| Copyright (c) 2000 Oracle Corporation |
5 --| Redwood Shores, CA, USA |
6 --| All rights reserved. |
7 --+=======================================================================+
8 --| FILENAME |
9 --| INVCOSGS.pls |
10 --| |
11 --| DESCRIPTION |
12 --| Spec of INV_ITEM_ORG_ASSIGN_CP |
13 --| |
14 --| HISTORY |
15 --| 09/01/00 vjavli Created |
16 --| 09/12/00 vjavli Updated with category_id |
17 --| 09/28/00 vjavli Updated with parameters category set, |
18 --| category structure |
19 --| 12/11/00 vjavli signature updated to p_org_hier_level_id |
20 --| 05/28/01 pjuvara Added p_request_count parameter |
21 --| 11/20/01 vjavli modified according to new api's to |
22 --| improve the performance |
23 --| 01/20/04 nkilleda > modified the Item_Org_Assignment procedure |
24 --| to accept a new input parameter source org |
25 --| id of type number for bug# 3306087 |
26 --| > x_errbuff, x_retcode should be in order |
27 --| according to AOL standards |
28 --| 06/22/2004 nesoni Bug 2642331. Interface of procedure |
29 --| Item_Org_Assignment is modified to accept |
30 --| parameter p_category_set_name as NUMERIC. |
31 --| Earlier it was VARCHAR2. Parameter text |
32 --| is replaced from p_category_set_name to |
33 --| p_category_set_id. |
34 --+======================================================================*/
35
36 --===============================================
37 -- CONSTANTS for concurrent program return values
38 --===============================================
39 -- Return values for RETCODE parameter (standard for concurrent programs):
40 RETCODE_SUCCESS VARCHAR2(10) := '0';
41 RETCODE_WARNING VARCHAR2(10) := '1';
42 RETCODE_ERROR VARCHAR2(10) := '2';
43
44 -- =======================================================================
45 -- Global PL/SQL table to store GL Account Info,starting revision and
46 -- GL valid flag of organizations in the Organization List
47 -- =======================================================================
48 TYPE g_org_gl_rev_rec_type IS RECORD
49 ( organization_id NUMBER
50 , cost_of_sales_account NUMBER
51 , encumbrance_account NUMBER
52 , sales_account NUMBER
53 , expense_account NUMBER
54 , starting_revision VARCHAR2(3)
55 , valid_flag VARCHAR2(1)
56 );
57
58 TYPE g_org_gl_rev_table_type IS TABLE OF g_org_gl_rev_rec_type
59 INDEX BY BINARY_INTEGER;
60
61 G_ORG_GL_REV_TBL g_org_gl_rev_table_type;
62
63 --========================================================================
64 -- FUNCTION : Get_cost_of_sales_account PUBLIC
65 -- COMMENT : This function is to get the Cost of Sales Account from
66 -- : global pl/sql table: g_org_gl_rev_tbl for the corresponding
67 -- : organization id
68 --
69 -- PRE-COND : none
70 -- EXCEPTIONS: none
71 --========================================================================
72 FUNCTION Get_cost_of_sales_account(p_organization_id IN NUMBER)
73 RETURN NUMBER;
74
75
76 --========================================================================
77 -- FUNCTION : Get_encumbrance_account PUBLIC
78 -- COMMENT : This function is to get the Encumbrance Account from
79 -- : global pl/sql table: g_org_gl_rev_tbl for the corresponding
80 -- : organization_id
81 --
82 -- PRE-COND : none
83 -- EXCEPTIONS: none
84 --========================================================================
85 FUNCTION Get_encumbrance_account(p_organization_id IN NUMBER)
86 RETURN NUMBER;
87
88
89 --========================================================================
90 -- FUNCTION : Get_sales_account PUBLIC
91 -- COMMENT : This function is to get the Sales Account from
92 -- : global pl/sql table: g_org_gl_rev_tbl for the corresponding
93 -- : organization id
94 --
95 -- PRE-COND : none
96 -- EXCEPTIONS: none
97 --========================================================================
98 FUNCTION Get_sales_account(p_organization_id IN NUMBER)
99 RETURN NUMBER;
100
101
102 --========================================================================
103 -- FUNCTION : Get_expense_account PUBLIC
104 -- COMMENT : This function is to get the Expense Account from
105 -- : global pl/sql table: g_org_gl_rev_tbl for the corresponding
106 -- : organization id
107 --
108 -- PRE-COND : none
109 -- EXCEPTIONS: none
110 --========================================================================
111 FUNCTION Get_expense_account(p_organization_id IN NUMBER)
112 RETURN NUMBER;
113
114
115 --========================================================================
116 -- FUNCTION : Get_start_revision PUBLIC
117 -- COMMENT : This function is to get the starting revision from
118 -- : global pl/sql table: g_org_gl_rev_tbl for the corresponding
119 -- : organization id
120 --
121 -- PRE-COND : none
122 -- EXCEPTIONS: none
123 --========================================================================
124 FUNCTION Get_start_revision(p_organization_id IN NUMBER )
125 RETURN VARCHAR2;
126
127 --========================================================================
128 -- PROCEDURE : Set_Unit_Test_Mode PUBLIC
129 -- COMMENT : This procedure sets the unit test mode that prevents the
130 -- program from attempting to submit concurrent requests and
131 -- enables it to run it from SQL*Plus. The Item Interface will
132 -- not be run.
133 --=========================================================================
134 PROCEDURE Set_Unit_Test;
135
136
137 --========================================================================
138 -- PROCEDURE : Item_Org_Assignment PUBLIC
139 -- PARAMETERS: x_errbuff return error message
140 -- x_retcode return status
141 -- p_source_org_id IN Source Org. : # Bug 3306087
142 -- p_org_hier_origin_id IN Organization Hierarchy
143 -- Origin Id
144 -- p_org_hierarchy_id IN Organization Hierarchy Id
145 -- where all the organizations for the selected hierarchy origin in
146 -- each hierarchy share the same item master.
147 -- p_category_set_name IN Category set name
148 -- p_category_struct IN Category Structure used by category pair
149 -- p_category_from IN Item Category name from
150 -- p_category_to IN Item Category name to
151 -- p_item_from IN From Item Number
152 -- p_item_to IN To Item Number
153 -- p_request_count IN Maximum number of workers
154 --
155 -- COMMENT : This is a procedure which creates new items for all the
156 -- organizations in an hierarchy origin. This also include the
157 -- hierarchy level itself.
158 --=========================================================================
159 /* Bug 2642331. Interface of procedure Item_Org_Assignment is modified to accept
160 * parameter p_category_set_name as NUMERIC.Earlier it was VARCHAR2. Parameter text
161 * is replaced from p_category_set_name to p_category_set_id
162 */
163 PROCEDURE Item_Org_Assignment
164 ( x_errbuff OUT NOCOPY VARCHAR2
165 , x_retcode OUT NOCOPY VARCHAR2
166 , p_source_org_id IN NUMBER -- new parameter added for #3306087
167 , p_org_hier_origin_id IN NUMBER
168 , p_org_hierarchy_id IN NUMBER
169 --, p_category_set_name IN VARCHAR2 made it numeric from varchar.
170 --Parameter text is replaced from p_category_set_name to p_category_set_id Bug:2642331
171 , p_category_set_id IN NUMBER
172 , p_category_struct IN NUMBER
173 , p_category_from IN VARCHAR2
174 , p_category_to IN VARCHAR2
175 , p_item_from IN VARCHAR2
176 , p_item_to IN VARCHAR2
177 , p_request_count IN NUMBER DEFAULT 1
178 );
179
180 END INV_ITEM_ORG_ASSIGN_CP;