1 PACKAGE PJM_PROJECT_LOCATOR AS
2 /* $Header: PJMPLOCS.pls 120.1 2005/06/16 10:38:30 appldev $ */
3 --
4 -- Name : Check_Project_References
5 -- Pre-reqs : None.
6 -- Function : This function checks whether a given locator has
7 -- appropriate project and task references based on the
8 -- current organization. Also if the validation mode is
9 -- specific, the function checks whether the parameters
10 -- project_id and task_id have appropriate values.
11 --
12 --
13 -- Parameters :
14 -- IN : p_organization_id IN NUMBER
15 -- : p_locator_id IN NUMBER
16 -- : p_validation_mode IN VARCHAR2
17 -- : p_required_flag IN VARCHAR2
18 -- : p_project_id IN NUMBER
19 -- : p_task_id IN NUMBER
20 --
21 -- Returns : TRUE if locator passes the validation for the
22 -- specific mode
23 -- FALSE if locator fails the validation for the
24 -- specific mode
25 --
26 FUNCTION Check_Project_References(
27 p_organization_id IN NUMBER,
28 p_locator_id IN NUMBER,
29 p_validation_mode IN VARCHAR2,
30 p_required_flag IN VARCHAR2,
31 p_project_id IN NUMBER DEFAULT NULL,
32 p_task_id IN NUMBER DEFAULT NULL
33 ) RETURN BOOLEAN;
34 FUNCTION Check_Project_References(
35 p_organization_id IN NUMBER,
36 p_locator_id IN NUMBER,
37 p_validation_mode IN VARCHAR2,
38 p_required_flag IN VARCHAR2,
39 p_project_id IN NUMBER DEFAULT NULL,
40 p_task_id IN NUMBER DEFAULT NULL,
41 p_item_id IN NUMBER
42 ) RETURN BOOLEAN;
43
44
45 -- Name : Check_ItemLocatorControl
46 -- Pre-reqs : None.
47 -- Function : This function checks the locator control
48 -- at three different levels: Org, Sub, Item.
49 -- If parameter p_hardpeg_only is 1, it also
50 -- checks if it is a hard-peg item.
51 -- If the item has a restricted list of subinventory
52 -- or locators, this function also checks if
53 -- the parameter p_sub, p_loc are within its list.
54 --
55 -- Parameters :
56 -- IN : p_organization_id IN NUMBER
57 -- : p_sub IN VARCHAR2
58 -- : p_loc IN NUMBER
59 -- : p_item_id IN NUMBER
60 -- : p_hardpeg_only IN NUMBER
61 --
62 -- Returns : True if all test are passed, else return False
63 --
64 -- Version : 1.0 10/02/97 W. Pacifia Chiang
65 -- Notes :
66 --
67 FUNCTION Check_ItemLocatorControl (
68 p_organization_id IN NUMBER,
69 p_sub IN VARCHAR2,
70 p_loc IN NUMBER,
71 p_item_id IN NUMBER,
72 p_hardpeg_only IN NUMBER
73 ) RETURN BOOLEAN;
74
75
76 -- Name : Get_DefaultProjectLocator
77 -- Pre-reqs : None.
78 -- Function : This procedure matches a project locator based on
79 -- the parameters organization_id, locator_id, project_id
80 -- and task_id. If no locator is found, a new locator is
81 -- created with project reference in segment19 and
82 -- task reference in segment20 into mtl_item_locations
83 -- using same physical attributes (from segment1 upto
84 -- segment18 depending locator flexfield setup).
85 --
86 --
87 -- Parameters :
88 -- IN : p_organization_id IN NUMBER
89 -- : p_locator_id IN NUMBER
90 -- : p_project_id IN NUMBER
91 -- : p_task_id IN NUMBER
92 -- : p_project_locator_id IN OUT NUMBER
93 --
94 -- RETURNS : N/A
95 --
96 PROCEDURE Get_DefaultProjectLocator(
97 p_organization_id IN NUMBER,
98 p_locator_id IN NUMBER,
99 p_project_id IN NUMBER,
100 p_task_id IN NUMBER,
101 p_project_locator_id IN OUT NOCOPY NUMBER
102 );
103
104
105 -- Name : Get_Job_ProjectSupply
106 -- Pre-reqs : None.
107 -- Function : This procedure gets supply locators
108 -- for materials that are backflushed
109 -- for project jobs.
110 --
111 -- The assumption for this procedure is that
112 -- the supply subinventory/locator value of those
113 -- wip_requirement_operations should be common locators.
114 --
115 -- Parameters :
116 -- IN : p_organization_id IN NUMBER
117 -- : p_wip_entity_id IN NUMBER
118 -- : p_project_id IN NUMBER
119 -- : p_task_id IN NUMBER
120 -- : p_success OUT NUMBER
121 --
122 -- RETURNS : N/A
123 --
124 PROCEDURE Get_Job_ProjectSupply (
125 p_organization_id IN NUMBER,
126 p_wip_entity_id IN NUMBER,
127 p_project_id IN NUMBER,
128 p_task_id IN NUMBER,
129 p_success OUT NOCOPY NUMBER
130 );
131
132
133 -- Function name : Get_Flow_ProjectSupply
134 -- Pre-reqs : None.
135 -- Function : This procedure gets supply locators
136 -- for materials that are backflushed
137 -- for project related flow schedules.
138 --
139 -- The assumption for this procedure is that
140 -- the supply subinventory/locator value of those
141 -- in mtl_transactions_interface should be common
142 -- locators.
143 --
144 -- Parameters :
145 -- IN : p_organization_id IN NUMBER
146 -- : p_wip_entity_id IN NUMBER
147 -- : p_project_id IN NUMBER
148 -- : p_task_id IN NUMBER
149 -- : p_success OUT NUMBER
150 --
151 -- Returns : N/A
152 --
153 PROCEDURE Get_Flow_ProjectSupply (
154 p_organization_id IN NUMBER,
155 p_wip_entity_id IN NUMBER,
156 p_project_id IN NUMBER,
157 p_task_id IN NUMBER,
158 p_parent_id IN NUMBER,
159 p_success OUT NOCOPY NUMBER
160 );
161
162
163 -- Name : Get_Component_ProjectSupply
164 -- Pre-reqs : None.
165 -- Function :
166 --
167 --
168 -- Parameters :
169 -- IN : p_organization_id IN NUMBER
170 -- : p_project_id IN NUMBER
171 -- : p_task_id IN NUMBER
172 -- : p_wip_entity_id IN NUMBER
173 -- : p_supply_sub IN NUMBER
174 -- : p_supply_loc_id IN OUT NUMBER
175 -- : p_item_id IN NUMBER
176 -- : p_org_loc_control IN NUMBER
177 --
178 -- Returns : BOOLEAN
179 -- The output of p_supply_loc_id will be the
180 -- proper locator with project and task
181 -- references based on the pegging attribute
182 -- of the component.
183 --
184 -- Version : 1.0 8/22/97 D Soosai
185 -- Notes :
186 --
187 FUNCTION Get_Component_ProjectSupply (
188 p_organization_id IN NUMBER,
189 p_project_id IN NUMBER,
190 p_task_id IN NUMBER,
191 p_wip_entity_id IN NUMBER,
192 p_supply_sub IN VARCHAR2,
193 p_supply_loc_id IN OUT NOCOPY NUMBER,
194 p_item_id IN NUMBER,
195 p_org_loc_control IN NUMBER
196 ) RETURN BOOLEAN;
197
198
199 -- Name : Get_Physical_Location
200 -- Pre-reqs : None.
201 -- Function : This function resolves the physical locator
202 -- for any given locator
203 --
204 --
205 -- Parameters :
206 -- IN : X_organization_id IN NUMBER
207 -- : X_locator_id IN NUMBER
208 --
209 -- Returns : TRUE is successful, FALSE otherwise
210 --
211 -- Version : 1.0 12/22/97 A Law
212 -- Notes :
213 --
214 FUNCTION get_physical_location ( X_organization_id IN NUMBER
215 , X_locator_id IN NUMBER )
216 RETURN BOOLEAN;
217
218
219 PROCEDURE Set_Segment_Default (
220 p_project_id IN NUMBER,
221 p_task_id IN NUMBER
222 );
223
224 PROCEDURE Put_OrgProfile(name in varchar2, val in varchar2);
225 PROCEDURE Get_OrgProfile(name in varchar2, val out nocopy varchar2);
226
227 FUNCTION Proj_Seg_Default return VARCHAR2;
228 FUNCTION Task_Seg_Default return VARCHAR2;
229 PRAGMA RESTRICT_REFERENCES (Proj_Seg_Default, WNDS, WNPS);
230 PRAGMA RESTRICT_REFERENCES (Task_Seg_Default, WNDS, WNPS);
231 END;