DBA Data[Home] [Help]

PACKAGE BODY: APPS.INV_INVARORE_XMLP_PKG

Source


1 PACKAGE BODY INV_INVARORE_XMLP_PKG AS
2 /* $Header: INVAROREB.pls 120.2.12020000.2 2012/07/03 10:05:44 pdong ship $ */
3   FUNCTION C_FORMATTEDCURRENCYCODEFORMULA(CURRENCY_CODE IN VARCHAR2) RETURN VARCHAR2 IS
4   BEGIN
5     DECLARE
6       TEMP_C VARCHAR2(20);
7     BEGIN
8       TEMP_C := '(' || CURRENCY_CODE || ')';
9       RETURN (TEMP_C);
10     END;
11     RETURN NULL;
12   END C_FORMATTEDCURRENCYCODEFORMULA;
13 
14   FUNCTION BEFOREREPORT RETURN BOOLEAN IS
15   BEGIN
16     BEGIN
17       P_CONC_REQUEST_ID := FND_GLOBAL.CONC_REQUEST_ID;
18       /*SRW.USER_EXIT('FND SRWINIT')*/NULL;
19     EXCEPTION
20       WHEN /*SRW.USER_EXIT_FAILURE*/OTHERS THEN
21         /*SRW.MESSAGE(1
22                    ,'Before Report: Init')*/NULL;
23     END;
24     DECLARE
25       P_ORG_ID_CHAR VARCHAR2(100) := TO_CHAR(P_ORG_ID);
26     BEGIN
27       /*SRW.USER_EXIT('FND PUTPROFILE NAME="' || 'MFG_ORGANIZATION_ID' || '" FIELD="' || P_ORG_ID_CHAR || '"')*/NULL;
28     EXCEPTION
29       WHEN /*SRW.USER_EXIT_FAILURE*/OTHERS THEN
30         /*SRW.MESSAGE(020
31                    ,'Failed in before report trigger, setting org profile ')*/NULL;
32         RAISE;
33     END;
34     BEGIN
35       NULL;
36     EXCEPTION
37       WHEN /*SRW.USER_EXIT_FAILURE*/OTHERS THEN
38         /*SRW.MESSAGE(1
39                    ,'Before Report: LocatorFlex')*/NULL;
40     END;
41     DECLARE
42       M_RETURN_STATUS VARCHAR2(1);
43       M_MSG_COUNT NUMBER;
44       M_MSG_DATA VARCHAR2(2000);
45     BEGIN
46       IF (WMS_INSTALL.CHECK_INSTALL(X_RETURN_STATUS => M_RETURN_STATUS
47                                ,X_MSG_COUNT => M_MSG_COUNT
48                                ,X_MSG_DATA => M_MSG_DATA
49                                ,P_ORGANIZATION_ID => P_ORG_ID)) THEN
50         P_WMS_INSTALLED := 'TRUE';
51       END IF;
52     END;
53     RETURN (TRUE);
54   END BEFOREREPORT;
55 
56   FUNCTION AFTERREPORT RETURN BOOLEAN IS
57   BEGIN
58     BEGIN
59       /*SRW.USER_EXIT('FND SRWEXIT')*/NULL;
60       RETURN (TRUE);
61     END;
62     RETURN (TRUE);
63   END AFTERREPORT;
64 
65   FUNCTION C_REPORTDATEFORMULA RETURN DATE IS
66   BEGIN
67     BEGIN
68       RETURN (SYSDATE);
69     END;
70     RETURN NULL;
71   END C_REPORTDATEFORMULA;
72 
73   FUNCTION C_OVERDUEONLYFORMULA RETURN VARCHAR2 IS
74   BEGIN
75     BEGIN
76       IF P_OVERDUEONLY = 1 THEN
77         RETURN ('Yes');
78       ELSE
79         RETURN ('No');
80       END IF;
81     END;
82     RETURN NULL;
83   END C_OVERDUEONLYFORMULA;
84 
85   FUNCTION AFTERPFORM RETURN BOOLEAN IS
86   BEGIN
87     RETURN (TRUE);
88   END AFTERPFORM;
89 
90   FUNCTION CF_PARENT_LPNFORMULA(CONTAINER_ENABLED_FLAG IN NUMBER
91                                ,PARENT_LPN_ID IN NUMBER) RETURN CHAR IS
92     X_PARENT_LPN VARCHAR2(30) := NULL;
93     --bug14252379,added local variable
94     L_PARENT_LPN_ID NUMBER;
95   BEGIN
96     IF ((P_WMS_INSTALLED = 'TRUE') AND (NVL(CONTAINER_ENABLED_FLAG
97        ,-99) > 0)) THEN
98       IF (PARENT_LPN_ID IS NOT NULL) THEN
99         L_PARENT_LPN_ID := PARENT_LPN_ID;
100         BEGIN
101           SELECT
102             LICENSE_PLATE_NUMBER
103           INTO X_PARENT_LPN
104           FROM
105             WMS_LICENSE_PLATE_NUMBERS
106           WHERE LPN_ID = L_PARENT_LPN_ID;--bug14252379,parameter name same with the column name causing the ambiguous reference
107         EXCEPTION
108           WHEN NO_DATA_FOUND THEN
109             X_PARENT_LPN := 'ERROR';
110         END;
111       END IF;
112     END IF;
113     RETURN (X_PARENT_LPN);
114   END CF_PARENT_LPNFORMULA;
115 
116   FUNCTION CF_OUTERMOST_LPNFORMULA(CONTAINER_ENABLED_FLAG IN NUMBER
117                                   ,OUTERMOST_LPN_ID IN NUMBER) RETURN CHAR IS
118     X_OUTERMOST_LPN VARCHAR2(30) := NULL;
119     --bug14252379,added local variable
120     L_OUTERMOST_LPN_ID NUMBER;
121   BEGIN
122     IF ((P_WMS_INSTALLED = 'TRUE') AND (NVL(CONTAINER_ENABLED_FLAG
123        ,-99) > 0)) THEN
124       IF (OUTERMOST_LPN_ID IS NOT NULL) THEN
125         L_OUTERMOST_LPN_ID := OUTERMOST_LPN_ID;
126         BEGIN
127           SELECT
128             LICENSE_PLATE_NUMBER
129           INTO X_OUTERMOST_LPN
130           FROM
131             WMS_LICENSE_PLATE_NUMBERS
132           WHERE LPN_ID = L_OUTERMOST_LPN_ID;--bug14252379,parameter name same with the column name causing the ambiguous reference
133         EXCEPTION
134           WHEN NO_DATA_FOUND THEN
135             X_OUTERMOST_LPN := 'ERROR';
136         END;
137       END IF;
138     END IF;
139     RETURN (X_OUTERMOST_LPN);
140   END CF_OUTERMOST_LPNFORMULA;
141 
142   FUNCTION CF_COST_GROUPFORMULA(COST_GROUP_ID IN NUMBER) RETURN CHAR IS
143     M_COST_GROUP VARCHAR2(10) := NULL;
144     --bug14252379,added local variable
145     L_COST_GROUP_ID NUMBER;
146   BEGIN
147     IF ((P_WMS_INSTALLED = 'TRUE') AND (COST_GROUP_ID IS NOT NULL)) THEN
148       L_COST_GROUP_ID := COST_GROUP_ID;
149       BEGIN
150         SELECT
151           COST_GROUP
152         INTO M_COST_GROUP
153         FROM
154           CST_COST_GROUPS
155         WHERE COST_GROUP_ID = L_COST_GROUP_ID;--bug14252379,parameter name same with the column name causing the ambiguous reference
156       EXCEPTION
157         WHEN NO_DATA_FOUND THEN
158           M_COST_GROUP := 'ERROR';
159       END;
160     END IF;
161     RETURN (M_COST_GROUP);
162   END CF_COST_GROUPFORMULA;
163 
164 END INV_INVARORE_XMLP_PKG;
165