1 PACKAGE WIP_LOCATOR AS
2 /* $Header: wiplocvs.pls 120.0 2005/05/25 08:08:54 appldev noship $ */
3
4 /*
5 VALIDATE
6
7 This procedure does validation on a given locator based on an assortment
8 of input parameters. It can validate eiter a locator_id or
9 concatenated segments (P_Locator_Segments). If both an id and segments
10 are passed, the routine ignores the Segments and uses the Id for
11 validation.
12
13 First it uses the input parameters for Org, Sub, and Item level
14 locator control to determine the correct locator control settings.
15
16 If we have No Locator Control, the routine will null out nocopy P_Locator_Id
17 and P_Locator_Segments and return P_Success_Flag = TRUE.
18
19 If we have Prespecified Locator Control, the routine will check if
20 the Locator is valid based on the P_Item_Id, the P_Subinventory_Code
21 and P_Restrict_Flag (MTL_SYSTEM_ITEMS.RESTRICT_LOCATORS_CODE).
22 P_Success_Flag will be set to TRUE or FALSE depending on whether
23 the Locator is valid.
24
25 If we have Dynamic Locator control, the routine will check if the
26 Locator is valid if that locator already exists. If the locator does
27 not exist, it will create a new one, and assign it to the proper
28 subinventory.
29 P_Success_Flag will be set to TRUE or FALSE depending on whether
30 the Locator is valid.
31
32 P_Success_Flag will be set to FALSE if you are under locator control
33 and both the Locator_Id and Locator_Segments are NULL
34 */
35
36 PROCEDURE Validate(P_Organization_Id IN NUMBER DEFAULT NULL,
37 P_Item_Id IN NUMBER DEFAULT NULL,
38 P_Subinventory_Code IN VARCHAR2 DEFAULT NULL,
39 P_Org_Loc_Control IN NUMBER DEFAULT NULL,
40 P_Sub_Loc_Control IN NUMBER DEFAULT NULL,
41 P_Item_Loc_Control IN NUMBER DEFAULT NULL,
42 P_Restrict_Flag IN NUMBER DEFAULT NULL,
43 P_Neg_Flag IN NUMBER DEFAULT NULL,
44 P_Action IN NUMBER DEFAULT NULL,
45 P_Project_Id IN NUMBER DEFAULT NULL,
46 P_Task_Id IN NUMBER DEFAULT NULL,
47 P_Locator_Id IN OUT NOCOPY NUMBER,
48 P_Locator_Segments IN OUT NOCOPY VARCHAR2,
49 P_Success_Flag OUT NOCOPY BOOLEAN);
50
51 END WIP_LOCATOR;