1 PACKAGE PON_WF_UTL_PKG AUTHID CURRENT_USER AS
2 /* $Header: PONWFUTS.pls 120.10 2010/04/03 11:19:35 ssreekum ship $ */
3
4
5 /* corresponding constants for the Sourcing doc types */
6
7 SRC_AUCTION CONSTANT varchar2(30) := 'BUYER_AUCTION';
8 SRC_RFQ CONSTANT varchar2(30) := 'REQUEST_FOR_QUOTE';
9 SRC_RFI CONSTANT varchar2(30) := 'REQUEST_FOR_INFORMATION';
10 SRC_SOL CONSTANT VARCHAR2(30) := 'SOLICITATION'; --<Sol Project>
11
12 /* constants to determine the return value - YES or NO*/
13 G_NO CONSTANT varchar2(3) := 'NO';
14 G_YES CONSTANT varchar2(3) := 'YES';
15
16 /* Read the profile option that enables/disables the debug log
17 store the profile value for logging in a global constant variable
18 so that we avoid checking the profile every time
19 */
20
21 g_fnd_debug CONSTANT VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
22
23 /* package name for logging */
24
25 g_pkg_name CONSTANT VARCHAR2(30) := 'PON_WF_UTL_PVT';
26
27 /* module prefix for logging ->Create a module name used for logging */
28
29 g_module_prefix CONSTANT VARCHAR2(50):='pon.plsql.' ||g_pkg_name || '.';
30
31
32 /* Record that contains menu and function context (name/value pair) */
33
34 TYPE menu_function_parameter_rec IS RECORD (OAHP VARCHAR2(240),
35 OASF VARCHAR2(240));
36
37 /* Record that represents a URL parameter (name/value pair) */
38
39 TYPE url_parameter_rec IS RECORD (name VARCHAR2(240),
40 value VARCHAR2(240));
41
42 /* Collection of URL parameters (Collections of name/value pairs) */
43
44 /* removed the 'not null' from the url_parameters_tab type definition to be able to
45 compile in Oracle 8i database */
46 TYPE url_parameters_tab IS TABLE OF url_parameter_rec INDEX BY BINARY_INTEGER;
47
48
49 /* Low level function that returns an OA page URL using the following form
50 at: 'http://<some_server>:<port>/OA_HTML/OA.jsp' || <parameters>'
51 where: <some_server> and <port> are read from profile.
52 <parameters> are construted from the input to the function. */
53
54 FUNCTION get_page_url(p_url_parameters_tab url_parameters_tab
55 ,p_notif_performer VARCHAR2)
56 RETURN VARCHAR2;
57
58 /* High-level function that returns the iSP Supplier Register page url */
59
60 FUNCTION get_isp_supplier_register_url (p_registration_key IN VARCHAR2
61 ,p_language_code IN VARCHAR2)
62 RETURN VARCHAR2;
63
64
65 /* Sets the workflow notification header attributes */
66
67 PROCEDURE set_hdr_attributes (p_itemtype IN VARCHAR2
68 ,p_itemkey IN VARCHAR2
69 ,p_auction_tp_name IN VARCHAR2
70 ,p_auction_title IN VARCHAR2
71 ,p_document_number IN VARCHAR2
72 ,p_auction_tp_contact_name IN VARCHAR2);
73
74 /* High-level function that returns a destination page url */
75 FUNCTION get_dest_page_url (p_dest_func IN VARCHAR2
76 ,p_notif_performer IN VARCHAR2)
77
78 RETURN VARCHAR2;
79
80 -- Retreive WF item attribute values for a given item type and item key
81 PROCEDURE get_dest_page_params (
82 p_ntf_id IN NUMBER,
83 p_dest_page IN VARCHAR2,
84 x_auction_id OUT NOCOPY NUMBER,
85 x_site_id OUT NOCOPY NUMBER,
86 x_bid_number OUT NOCOPY NUMBER,
87 x_doc_type_id OUT NOCOPY NUMBER,
88 x_reviewpg_redirect_func OUT NOCOPY VARCHAR2,
89 x_request_id OUT NOCOPY NUMBER,
90 x_DocumentNumber OUT NOCOPY VARCHAR2,
91 x_entry_id OUT NOCOPY NUMBER,
92 x_message_type OUT NOCOPY VARCHAR2,
93 x_discussion_id OUT NOCOPY NUMBER,
94 x_neg_deleted OUT NOCOPY VARCHAR2);
95
96 PROCEDURE GetConcProgramType(itemtype in varchar2,
97 itemkey in varchar2,
98 actid in number,
99 uncmode in varchar2,
100 resultout out NOCOPY varchar2);
101
102 PROCEDURE GetLastLineNumberInBatch(itemtype in varchar2,
103 itemkey in varchar2,
104 actid in number,
105 uncmode in varchar2,
106 resultout out NOCOPY varchar2);
107
108 PROCEDURE GetLastWorksheetInBatch(itemtype in varchar2,
109 itemkey in varchar2,
110 actid in number,
111 uncmode in varchar2,
112 resultout out NOCOPY varchar2);
113
114 Procedure ReportConcProgramStatus(
115 p_request_id in Number,
116 p_messagetype in Varchar2,
117 p_RecepientUsername in Varchar2,
118 p_recepientType in Varchar2,
119 p_auction_header_id in number,
120 p_ProgramTypeCode in Varchar2,
121 p_DestinationPageCode in Varchar2,
122 p_bid_number in Number,
123 p_max_good_line_num in number default -1,
124 p_last_goodline_worksheet in Varchar2 default ''
125 );
126
127 /*=======================================================================+
128 -- API Name: GET_NOTIF_PREFERENCE
129 --
130 -- Type : Public
131 --
132 -- Pre-reqs: None
133 --
134 -- Function: This new API will determine whether the notification
135 -- preference for the current workflow message has been set.
136 --
137 -- Parameters:
138 --
139 -- p_wf_message_name IN VARCHAR2
140 -- p_auction_id IN NUMBER
141 --
142 +=======================================================================*/
143
144 FUNCTION GET_NOTIF_PREFERENCE (
145 p_wf_message_name IN WF_MESSAGES.NAME%TYPE
146 ,p_auction_id IN PON_AUCTION_HEADERS_ALL.AUCTION_HEADER_ID%TYPE)
147 RETURN VARCHAR2;
148
149
150 /* High-level function that returns the external supplier url
151 of the following form at: 'http://<some_server>:<port>/' */
152 FUNCTION get_base_external_supplier_url RETURN VARCHAR2;
153
154 /* High-level function that returns the internal buyer url
155 of the following form at: 'http://<some_server>:<port>/' */
156 FUNCTION get_base_internal_buyer_url RETURN VARCHAR2;
157
158 /* Function returning FND Profile value at Site Level */
159 FUNCTION get_site_level_profile_value(p_profile_name varchar2) RETURN VARCHAR2;
160
161
162 END PON_WF_UTL_PKG;