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