1 PACKAGE AMS_STATUS_PVT AUTHID CURRENT_USER as
2 /* $Header: amsvstss.pls 115.6 2002/11/22 23:39:08 dbiswas ship $ */
3
4 -- Start of Comments
5 --
6 -- NAME
7 -- AMS_STATUS_PVT
8 --
9 -- PURPOSE
10 -- This package is a Private API for Getting Next Valid statuses for
11 -- Marketing Activities
12 -- Tables and Record types :
13 -- type next_status_rec_type (see below for specification)
14 -- next_status_tbl_type (see below for specification)
15 --
16 -- Procedures and Functions:
17 -- Get_Status_Lookup_Type (see below for specification)
18 -- Get_Lookup_Meaning (see below for specification)
19 -- Is_Approval_Needed (see below for specification)
20 -- Get_Next_Statuses (see below for specification)
21 -- Validate_Status_Change (see below for specification)
22 --
23 -- NOTES
24 --
25 --
26 -- HISTORY
27 -- 06/29/1999 holiu created
28 -- 11/19/1999 ptendulk Modified
29 -- End of Comments
30
31
32 TYPE next_status_rec_type IS RECORD(
33 user_status_id NUMBER,
34 system_status_code VARCHAR2(30),
35 system_status_type VARCHAR2(30),
36 default_flag VARCHAR2(1),
37 user_status_name VARCHAR2(120)
38 );
39
40 TYPE next_status_tbl_type is TABLE OF next_status_rec_type
41 INDEX BY BINARY_INTEGER ;
42
43
44 --------------- start of comments --------------------------
45 -- NAME
46 -- Get_Status_Lookup_Type
47 --
48 -- USAGE
49 -- Given the arc qualifier for a certain area such as
50 -- 'PROM', return the lookup type for the statuses
51 -- in that area, such as 'AMS_PROMOTION_STATUS'.
52 --
53 -- Return null if no corresponding lookup type.
54 --
55 -- PARAMETERS
56 -- 1. p_arc_status_for: arc qualifier for a area, e.g. 'PROM'
57 --
58 --------------- end of comments ----------------------------
59
60 FUNCTION Get_Status_Lookup_Type (
61 p_arc_status_for IN VARCHAR2
62 )
63 RETURN VARCHAR2;
64
65
66 --------------- start of comments --------------------------
67 -- NAME
68 -- get_lookup_meaning
69 --
70 -- USAGE
71 -- Given the lookup type and lookup code, get the meaning.
72 -- Return null if invalid type or code provided.
73 --
74 --------------- end of comments ----------------------------
75
76 FUNCTION Get_Lookup_Meaning(
77 p_lookup_type IN VARCHAR2,
78 p_lookup_code IN VARCHAR2
79 )
80 RETURN varchar2;
81
82
83 --------------- start of comments --------------------------
84 -- NAME
85 -- Is_Approval_Needed
86 --
87 -- USAGE
88 -- Check if a certain type of approval is needed for an
89 -- object area (and activity type). Return fnd_api.g_true
90 -- or fnd_api.g_false.
91 --
92 -- PARAMETERS
93 -- 1. p_arc_approval_for: arc qualifier for a area, e.g. 'PROM'
94 -- 2. p_approval_type: the lookup code of the approval type, e.g.
95 -- 'BUDGET' or 'THEME'
96 -- 3. p_activity_type_code: the type of the activity depending
97 -- on the object area, e.g. promotion type code for 'PROM'
98 --
99 ------------------- end of comments ----------------------------
100
101 FUNCTION Is_Approval_Needed(
102 p_arc_approval_for IN VARCHAR2,
103 p_approval_type IN VARCHAR2,
104 p_activity_type_code IN VARCHAR2 := NULL
105 )
106 RETURN VARCHAR2;
107
108
109 --------------- start of comments --------------------------
110 -- NAME
111 -- Get_Next_Statuses
112 --
113 -- USAGE
114 -- For a certain status in an object area, return all the
115 -- valid next statuses in a PL/SQL table.
116 --
117 -- The client side may use it to populate list items.
118 --
119 -- PARAMETERS
120 -- 1. p_arc_status_for: arc qualifier for a area, e.g. 'PROM'
121 -- 2. p_current_status_code:
122 -- 3. p_activity_type_code: the type of the activity depending
123 -- on the object area, e.g. promotion type code for 'PROM'
124 -- 4. x_next_status_tbl: the PL/SQL table containing all valid
125 -- next statuses
126 --
127 --------------- end of comments ----------------------------
128 PROCEDURE Get_Next_Statuses(
129 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
130 x_msg_count OUT NOCOPY NUMBER,
131 x_msg_data OUT NOCOPY VARCHAR2,
132
133 p_arc_status_for IN VARCHAR2,
134 p_current_status_id IN NUMBER,
135 p_activity_type_code IN VARCHAR2 := NULL,
136 x_next_status_tbl OUT NOCOPY next_status_tbl_type,
137 x_return_status OUT NOCOPY VARCHAR2
138 );
139
140
141 --------------- start of comments --------------------------
142 -- NAME
143 -- Validate_Status_Change
144 --
145 -- USAGE
146 -- Check whether a status change is valid or not.
147 -- Server side API may use it for validate status changes.
148 --
149 -- PARAMETERS
150 -- 1. p_arc_status_for: arc qualifier for a area, e.g. 'PROM'
151 -- 2. p_current_status_code:
152 -- 3. p_next_status_code:
153 -- 4. p_activity_type_code: type code of the activity depending
154 -- on the object area, e.g. promotion type code for 'PROM'
155 -- 5. x_valid_flag: indicate if the status change is valid
156 --
157 --------------- end of comments ----------------------------
158 PROCEDURE Validate_Status_Change(
159 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
160 x_msg_count OUT NOCOPY NUMBER,
161 x_msg_data OUT NOCOPY VARCHAR2,
162
163 p_arc_status_for IN VARCHAR2,
164 p_current_status_id IN VARCHAR2,
165 p_next_status_id IN VARCHAR2,
166 p_activity_type_code IN VARCHAR2 := NULL,
167 x_valid_flag OUT NOCOPY VARCHAR2, -- fnd_api.g_true, fnd_api.g_false
168 x_return_status OUT NOCOPY VARCHAR2
169 );
170
171 END AMS_STATUS_PVT ;