DBA Data[Home] [Help]

PACKAGE: APPS.IBY_BUILD_UTILS_PKG

Source


1 PACKAGE IBY_BUILD_UTILS_PKG AUTHID CURRENT_USER AS
2 /*$Header: ibybluts.pls 120.14.12020000.2 2013/02/25 10:44:40 kchavali ship $*/
3 
4  --
5  -- Payment profile record
6  --
7  TYPE pmtProfRecType IS RECORD (
8      profile_id   IBY_DOCS_PAYABLE_ALL.payment_profile_id%TYPE
9      );
10 
11  --
12  -- Payment profiles table
13  --
14  TYPE pmtProfTabType IS TABLE OF pmtProfRecType
15      INDEX BY BINARY_INTEGER;
16 
17  --
18  -- Utility record to map a payment profile id on a payment instruction
19  -- to a payment profile code on instr creation rules record.
20  --
21  -- Multiple payment profile ids can be mapped to the same payment
22  -- profile code.
23  --
24  TYPE profileIdToCodeMap IS RECORD (
25      pmt_profile_id     IBY_PAYMENT_PROFILES.payment_profile_id%TYPE,
26      pmt_profile_cd     IBY_PAYMENT_PROFILES.system_profile_code%TYPE
27      );
28 
29  --
30  -- Table of payment profile code maps.
31  --
32  TYPE profileIdToCodeMapTabType IS TABLE OF profileIdToCodeMap
33      INDEX BY BINARY_INTEGER;
34 
35 
36 /*--------------------------------------------------------------------
37  | NAME:
38  |     print_debuginfo
39  |
40  | PURPOSE:
41  |
42  |
43  | PARAMETERS:
44  |     IN
45  |
46  |
47  |     OUT
48  |
49  |
50  | RETURNS:
51  |
52  | NOTES:
53  |
54  *---------------------------------------------------------------------*/
55  PROCEDURE print_debuginfo(p_module IN VARCHAR2,
56      p_debug_text  IN VARCHAR2,
57      p_debug_level IN VARCHAR2  DEFAULT FND_LOG.LEVEL_STATEMENT
58      );
59 
60 /*--------------------------------------------------------------------
61  | NAME:
62  |     printXMLClob
63  |
64  | PURPOSE:
65  |     Prints out the XML data contained within the given clob; to be
66  |     used for testing purposes.
67  |
68  |
69  | PARAMETERS:
70  |     IN
71  |
72  |     OUT
73  |
74  |
75  | RETURNS:
76  |
77  | NOTES:
78  |
79  *---------------------------------------------------------------------*/
80  PROCEDURE printXMLClob(
81      p_xml_clob IN CLOB);
82 
83 /*--------------------------------------------------------------------
84  | NAME:
85  |     checkForInvalidChars
86  |
87  | PURPOSE:
88  |     Given an input string and a string of invalid characters, this
89  |     procedure checks if any of the invalid characters are present
90  |     in the given input string.
91  |
92  |     If any of the invalid characters are found, an error message is
93  |     inserted into the error table identifying the invalid character.
94  |
95  |     If no invalid characters are found in the input string, this
96  |     procedure simply returns.
97  |
98  | PARAMETERS:
99  |     IN
100  |     p_fieldName  - The name  of the input field (used for logging)
101  |     p_fieldValue - The value of the input field
102  |     p_isComposite - Indidicates that the field is a composite
103  |                     field created by appending multiple individual
104  |                     fields. For composite fields, the field value
105  |                     will not be printed in the error message.
106  |     p_invalid_chars_list - List of invalid characters that
107  |                    should not be present in the field value
108  |     OUT
109  |     x_docErrorRec - Error message record. This should contain the
110  |                     document id when coming into this method.
111  |     x_docErrorTab - Error messages table. An error message will be
112  |                     added to this table if the input field value
113  |                     contains an invalid char.
114  |
115  | RETURNS:
116  |
117  | NOTES:
118  |
119  *---------------------------------------------------------------------*/
120  PROCEDURE checkForInvalidChars(
121          p_fieldName          IN VARCHAR2,
122          p_fieldValue         IN VARCHAR2,
123          p_isComposite        IN BOOLEAN,
124          p_validCharsList     IN VARCHAR2,
125          p_invalidCharsList   IN VARCHAR2,
126          x_docErrorRec        IN OUT NOCOPY IBY_TRANSACTION_ERRORS%ROWTYPE,
127          x_docErrorTab        IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.
128                                                 docErrorTabType
129          );
130 
131 /*--------------------------------------------------------------------
132  | NAME:
133  |     getChar
134  |
135  | PURPOSE:
136  |     Returns the character at a given position of a given string.
137  |     Similar to ChatAt(index) in Java.
138  |
139  |     Note that in PLSQL indexes are 1 based i.e., the very first
140  |     character in the string has index 1 (as opposed to 0 based
141  |     indexes in C and Java).
142  |
143  |     Therefore, if the given string is 'I am the walrus', then
144  |     getChar(str, 10) will return 'w'.
145  |
146  |     NULL will be returned if the index is out-of-bounds.
147  |
148  | PARAMETERS:
149  |     IN
150  |     p_string - The name  of the input field (used for logging)
151  |     p_index - The value of the input field
152  |
153  |     OUT
154  |
155  | RETURNS:
156  |
157  |     VARCHAR2(1) - the character at the given index on the given string
158  |
159  | NOTES:
160  |
161  *---------------------------------------------------------------------*/
162  FUNCTION getChar(
163          p_string      IN VARCHAR2,
164          p_index       IN VARCHAR2
165          )
166          RETURN VARCHAR2;
167 
168 /*--------------------------------------------------------------------
169  | NAME:
170  |     diffStrings
171  |
172  | PURPOSE:
173  |     Given two strings, this method performs a diff on them
174  |     and returns their differences.
175  |
176  |     The two args are not expected to be completely arbitary;
177  |     instead arg2 is expected to be similar to arg1 with some
178  |     differences. For this reason, both strings are expected to
179  |     be of the same length.
180  |
181  |     Whenever there are differences, the value from arg1 is added
182  |     to the diff list. The value from arg2 is ignored.
183  |
184  | PARAMETERS:
185  |     IN
186  |     p_originalString - The original string
187  |     p_compareString  - The changed string
188  |
189  |     OUT
190  |
191  | RETURNS:
192  |
193  |     VARCHAR2 - the difference between the two strings
194  |     NULL will be returned if both strings are the same
195  |
196  | NOTES:
197  |     Comparison between the two strings will only take place uptil the
198  |     length of the original string.
199  |
200  *---------------------------------------------------------------------*/
201  FUNCTION diffStrings(
202          p_originalString      IN VARCHAR2,
203          p_compareString       IN VARCHAR2
204          )
205          RETURN VARCHAR2;
206 
207 /*--------------------------------------------------------------------
208  | NAME:
209  |     createErrorRecord
210  |
211  | PURPOSE:
212  |
213  | PARAMETERS:
214  |     IN
215  |
216  |     OUT
217  |
218  |
219  | RETURNS:
220  |
221  | NOTES:
222  |
223  *---------------------------------------------------------------------*/
224  PROCEDURE createErrorRecord(
225      p_trxn_type    IN IBY_TRANSACTION_ERRORS.transaction_type%TYPE,
226      p_doc_id       IN IBY_DOCS_PAYABLE_ALL.document_payable_id%TYPE,
227      p_doc_status   IN IBY_DOCS_PAYABLE_ALL.document_status%TYPE,
228      p_ca_id        IN IBY_DOCS_PAYABLE_ALL.calling_app_id%TYPE,
229      p_ca_doc_id1    IN IBY_DOCS_PAYABLE_ALL.
230                            calling_app_doc_unique_ref1%TYPE,
231      p_ca_doc_id2    IN IBY_DOCS_PAYABLE_ALL.
232                            calling_app_doc_unique_ref2%TYPE,
233      p_ca_doc_id3    IN IBY_DOCS_PAYABLE_ALL.
234                            calling_app_doc_unique_ref3%TYPE,
235      p_ca_doc_id4    IN IBY_DOCS_PAYABLE_ALL.
236                            calling_app_doc_unique_ref4%TYPE,
237      p_ca_doc_id5    IN IBY_DOCS_PAYABLE_ALL.
238                            calling_app_doc_unique_ref5%TYPE,
239      p_pp_tt_cd     IN IBY_DOCS_PAYABLE_ALL.pay_proc_trxn_type_code%TYPE,
240      x_docErrorRec  IN OUT NOCOPY IBY_TRANSACTION_ERRORS%ROWTYPE,
241      x_docTokenTab  IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.trxnErrTokenTabType,
242      p_rel_doc_id   IN IBY_DOCS_PAYABLE_ALL.calling_app_doc_ref_number%TYPE
243                            DEFAULT NULL,  -- AWT Enh 16296267
244      p_error_code   IN VARCHAR2 DEFAULT NULL
245      );
246 
247 /*--------------------------------------------------------------------
248  | NAME:
249  |     createPmtErrorRecord
250  |
251  | PURPOSE:
252  |
253  | PARAMETERS:
254  |     IN
255  |
256  |     OUT
257  |
258  |
259  | RETURNS:
260  |
261  | NOTES:
262  |
263  *---------------------------------------------------------------------*/
264  PROCEDURE createPmtErrorRecord(
265      p_pmt_id        IN IBY_PAYMENTS_ALL.payment_id%TYPE,
266      p_pmt_status    IN IBY_PAYMENTS_ALL.
267                             payment_status%TYPE,
268      p_error_code    IN IBY_TRANSACTION_ERRORS.error_code%TYPE
269                            DEFAULT NULL,
270      p_error_msg     IN IBY_TRANSACTION_ERRORS.error_message%TYPE
271                            DEFAULT NULL,
272      x_docErrorRec   IN OUT NOCOPY IBY_TRANSACTION_ERRORS%ROWTYPE
273      );
274 
275 /*--------------------------------------------------------------------
276  | NAME:
277  |     getProfListFromProfileDrivers
278  |
279  | PURPOSE:
280  |     Derives the payment profile for the given (payment method,
281  |     payment format, org, payment currency, internal bank acct)
282  |     combination.
283  |
284  | PARAMETERS:
285  |     IN
286  |
287  |     OUT
288  |
289  |
290  | RETURNS:
291  |
292  |
293  | NOTES: Mark For Removal
294  |
295  *---------------------------------------------------------------------*/
296  PROCEDURE getProfListFromProfileDrivers(
297      p_pmt_method_cd     IN IBY_DOCS_PAYABLE_ALL.payment_method_code%TYPE,
298      p_org_id            IN IBY_DOCS_PAYABLE_ALL.org_id%TYPE,
299      p_org_type          IN IBY_DOCS_PAYABLE_ALL.org_type%TYPE,
300      p_pmt_currency      IN IBY_DOCS_PAYABLE_ALL.payment_currency_code%TYPE,
301      p_int_bank_acct_id  IN IBY_DOCS_PAYABLE_ALL.internal_bank_account_id%TYPE,
302      x_profilesTab       IN OUT NOCOPY pmtProfTabType
303      );
304 
305 
306 /*--------------------------------------------------------------------
307  | NAME:
308  |     getProfListFromProfileDrivers
309  |
310  | PURPOSE:
311  |     Derives the payment profile for the given (payment method,
312  |     payment format, org, payment currency, internal bank acct)
313  |     combination.
314  |
315  | PARAMETERS:
316  |     IN
317  |
318  |     OUT
319  |
320  |
321  | RETURNS:
322  |
323  |
324  | NOTES:
325  |
326  *---------------------------------------------------------------------*/
327  PROCEDURE getProfListFromProfileDrivers(
328      p_pmt_method_cd     IN IBY_DOCS_PAYABLE_ALL.payment_method_code%TYPE,
329      p_org_id            IN IBY_DOCS_PAYABLE_ALL.org_id%TYPE,
330      p_org_type          IN IBY_DOCS_PAYABLE_ALL.org_type%TYPE,
331      p_pmt_currency      IN IBY_DOCS_PAYABLE_ALL.payment_currency_code%TYPE,
332      p_int_bank_acct_id  IN IBY_DOCS_PAYABLE_ALL.internal_bank_account_id%TYPE,
333      p_profile_id       IN OUT NOCOPY IBY_DOCS_PAYABLE_ALL.payment_profile_id%TYPE,
334      p_valid_flag       OUT NOCOPY VARCHAR2
335      );
336 
337 /*--------------------------------------------------------------------
338  | NAME:
339  |     getProfileMap
340  |
341  | PURPOSE:
342  |
343  | PARAMETERS:
344  |     IN
345  |
346  |
347  |     OUT
348  |
349  |
350  | RETURNS:
351  |
352  | NOTES:
353  |
354  *---------------------------------------------------------------------*/
355  PROCEDURE getProfileMap(
356      x_profileMap     IN OUT NOCOPY profileIdToCodeMapTabType
357      );
358 
359 /*--------------------------------------------------------------------
360  | NAME:
361  |     getProfileCodeFromId
362  |
363  | PURPOSE:
364  |
365  | PARAMETERS:
366  |     IN
367  |
368  |
369  |     OUT
370  |
371  |
372  | RETURNS:
373  |
374  | NOTES:
375  |
376  *---------------------------------------------------------------------*/
377  FUNCTION getProfileCodeFromId(
378      p_profile_id     IN IBY_PAY_INSTRUCTIONS_ALL.payment_profile_id%TYPE,
379      p_profileMap     IN profileIdToCodeMapTabType
380      ) RETURN VARCHAR2;
381 
382 /*--------------------------------------------------------------------
383  | NAME:
384  |     printWrappedString
385  |
386  | PURPOSE:
387  |
388  | PARAMETERS:
389  |     IN
390  |
391  |
392  |     OUT
393  |
394  |
395  | RETURNS:
396  |
397  | NOTES:
398  |
399  *---------------------------------------------------------------------*/
400  PROCEDURE printWrappedString(
401      p_string     IN VARCHAR2
402      );
403 
404 /*--------------------------------------------------------------------
405  | NAME:
406  |     inactivateOldErrors
407  |
408  | PURPOSE:
409  |
410  | PARAMETERS:
411  |     IN
412  |
413  |
414  |     OUT
415  |
416  |
417  | RETURNS:
418  |
419  | NOTES:
420  |
421  *---------------------------------------------------------------------*/
422  PROCEDURE inactivateOldErrors(
423      p_trxn_id    IN IBY_TRANSACTION_ERRORS.transaction_id%TYPE,
424      p_trxn_type  IN IBY_TRANSACTION_ERRORS.transaction_type%TYPE
425      );
426 
427  /*--------------------------------------------------------------------
428  | NAME:
429  |     resetPaymentErrors
430  |
431  | PURPOSE:
432  |
433  | PARAMETERS:
434  |     IN
435  |
436  |
437  |     OUT
438  |
439  |
440  | RETURNS:
441  |
442  | NOTES:
443  |
444  *---------------------------------------------------------------------*/
445  PROCEDURE resetPaymentErrors(
446      p_payment_request_id  IN IBY_PAY_SERVICE_REQUESTS.
447                                   payment_service_request_id%TYPE
448      );
449 
450 /*--------------------------------------------------------------------
451  | NAME:
452  |     resetDocumentErrors
453  |
454  | PURPOSE:
455  |
456  | PARAMETERS:
457  |     IN
458  |
459  |
460  |     OUT
461  |
462  |
463  | RETURNS:
464  |
465  | NOTES:
466  |
467  *---------------------------------------------------------------------*/
468  PROCEDURE resetDocumentErrors(
469      p_payment_request_id  IN IBY_PAY_SERVICE_REQUESTS.
470                                   payment_service_request_id%TYPE
471      );
472 
473 /*--------------------------------------------------------------------
474  | NAME:
475  |     resetPaymentInstructionErrors
476  |
477  | PURPOSE:
478  |
479  | PARAMETERS:
480  |     IN
481  |
482  |
483  |     OUT
484  |
485  |
486  | RETURNS:
487  |
488  | NOTES:
489  |
490  *---------------------------------------------------------------------*/
491  PROCEDURE resetPaymentInstructionErrors(
492      p_instr_id  IN IBY_PAY_INSTRUCTIONS_ALL.
493                         payment_instruction_id%TYPE
494      );
495 
496 END IBY_BUILD_UTILS_PKG;