DBA Data[Home] [Help]

PACKAGE: APPS.WMS_DATECHECK_PVT

Source


1 PACKAGE WMS_DateCheck_PVT AUTHID CURRENT_USER AS
2 /* $Header: WMSVPPDS.pls 120.0 2005/05/25 09:03:54 appldev noship $*/
3 --
4 
5 /*Date_Valid
6  *   returns
7  *      'Y' - current date falls within date range
8  *      'N' - current date does not fall within range
9  *   Parameters
10  *      org_id NUMBER - ID of the organization for which the rules
11  *                      engine is being run  Passing NULL for org_id
12  *                      has no effect if date_type is always, fulldate,
13  *                      day, date, month, or year
14  *      date_type VARCHAR2 - equivalent to Date_Type column in table.
15  *                           This value signals how to process the date info.
16  *                           If this value is NULL, Date_Valid assumes
17  *                           date_type is fulldate.
18  *      from_val NUMBER - The from value.  Equivalent to Date_Type_From in
19  *                        table.Ignored if date_type is fulldate or always.
20  *                        NULL value implies no "from" boundray.
21  *      to_val NUMBER - The to value. Equivalent to Date_Type_From in table.
22  *                      Ignored if date_type is fulldate or always. NULL
23  *                      value implies no "to" boundray.
24  *      from_date DATE - The from value used if date_type is fulldate.
25  *                       Equivalent to Effective_From in table.
26  *                        NULL value implies no "from" boundray.
27  *      to_date DATE - The to value used if date_type is fulldate.
28  *                       Equivalent to Effective_to in table.
29  *                        NULL value implies no "from" boundray.
30  */
31 
32 
33 FUNCTION Date_Valid
34 		(org_id NUMBER,	--Organization ID
35 		 date_type VARCHAR2 ,
36 		 from_val NUMBER, --same as Date_Type_From
37 		 to_val NUMBER,  --same as Date_Type_To
38 		 from_date DATE, --same as Effective_From
39 		 to_date DATE)  --same as Effective_To
40 return VARCHAR2;
41 
42 
43 /* Helper functions for Date_Valid */
44 
45 FUNCTION Get_Current_Date
46 	(format VARCHAR2)
47 return VARCHAR2;
48 
49 
50 FUNCTION Check_Between
51 	(cur_val NUMBER,
52 	 from_val NUMBER,
53 	 to_val NUMBER)
54 return VARCHAR2;
55 
56 
57 /* Constants used in Date_Valid
58  * 	Correspond to lookup_type MTL_PP_DATE_TYPE
59  */
60 
61 c_fulldate 	CONSTANT NUMBER := 1;
62 c_day 		CONSTANT NUMBER := 2;
63 c_date 		CONSTANT NUMBER := 3;
64 c_month 	CONSTANT NUMBER := 4;
65 c_year	 	CONSTANT NUMBER := 5;
66 c_shift		CONSTANT NUMBER := 6;
67 c_week	 	CONSTANT NUMBER := 7;
68 c_cal_period	CONSTANT NUMBER := 8;
69 c_acct_period	CONSTANT NUMBER := 9;
70 c_quarter 	CONSTANT NUMBER := 10;
71 c_always 	CONSTANT NUMBER := 11;
72 
73 
74 
75 
76 END WMS_DateCheck_PVT;