DBA Data[Home] [Help]

PACKAGE: APPS.ARP_STANDARD

Source


1 PACKAGE ARP_STANDARD AS
2 /* $Header: ARPLSTDS.pls 120.4 2003/10/22 20:53:30 mraymond ship $ */
3 
4 /*-------------------------------------------------------------------------+
5  |                                                                         |
6  | PUBLIC  CONSTANTS                                                       |
7  |                                                                         |
8  +-------------------------------------------------------------------------*/
9 
10 MAX_END_DATE date := to_date( '31-12-2199', 'DD-MM-YYYY');
11 MIN_START_DATE date := to_date( '01-01-1900', 'DD-MM-YYYY');
12 AR_ERROR_NUMBER constant number := -20000;
13 
14 /*-------------------------------------------------------------------------+
15  |                                                                         |
16  | PUBLIC  TYPES                                                           |
17  |                                                                         |
18  +-------------------------------------------------------------------------*/
19 
20     TYPE      PROFILE_TYPE IS RECORD
21         (
22               PROGRAM_APPLICATION_ID    NUMBER := 0,
23               PROGRAM_ID                NUMBER := 0,
24               REQUEST_ID                NUMBER := 0,
25               USER_ID                   NUMBER := 0,
26               LAST_UPDATE_LOGIN         NUMBER := 0,
27               LANGUAGE_ID               NUMBER := 0,
28               LANGUAGE_CODE             VARCHAR2(50) := NULL
29          );
30 
31 /*-------------------------------------------------------------------------+
32  |                                                                         |
33  | Data type: PRV_MESSAGE_TYPE,                                            |
34  |   Procedure calls to fnd_message store each of the parameters passed so |
35  |   that a calling PL/SQL block can access the same message and tokens    |
36  |   and determine the processing steps required.                          |
37  |                                                                         |
38  +-------------------------------------------------------------------------*/
39 
40     TYPE 	PRV_MESSAGE_TYPE IS RECORD
41 	(
42    		name varchar2(30),
43    		t1   varchar2(240),
44    		v1   varchar2(240),
45    		t2   varchar2(240),
46    		v2   varchar2(240),
47    		t3   varchar2(240),
48    		v3   varchar2(240),
49    		t4   varchar2(240),
50    		v4   varchar2(240)
51 	);
52 
53 /*-------------------------------------------------------------------------+
54  |                                                                         |
55  | PUBLIC  VARIABLES                                                       |
56  |                                                                         |
57  +-------------------------------------------------------------------------*/
58 
59 
60     sysparm   		AR_SYSTEM_PARAMETERS%ROWTYPE;
61 
62     profile   		PROFILE_TYPE;
63     previous_msg 	PRV_MESSAGE_TYPE;
64 
65     application_id                      NUMBER;
66     gl_application_id                   NUMBER;
67     gl_chart_of_accounts_id             NUMBER;
68     SEQUENCE_OFFSET                     NUMBER := 0;
69     g_msg_module                        VARCHAR2(256);
70 
71 /*-------------------------------------------------------------------------+
72  |                                                                         |
73  | PUBLIC  FUNCTIONS                                                       |
74  |                                                                         |
75  +-------------------------------------------------------------------------*/
76 
77 
78 
79 /*----------------------------------------------------------------------------*
80  | PUBLIC FUNCTION                                                            |
81  |    get_next_word( list in out, value out NOCOPY ) return boolean                  |
82  |                                                                            |
83  | DESCRIPTION                                                                |
84  |    Given an input list of 'words' this routine will extract the first      |
85  |    word from the list and set the output parameter "value" to this word.   |
86  |    Returns false when the list is empty.                                   |
87  |                                                                            |
88  | REQUIRES                                                                   |
89  |    list of words, separated by space characters, eg:                       |
90  |         COUNTY STATE COUNTY CITY                                           |
91  |                                                                            |
92  | MODIFIES                                                                   |
93  |    list   - Each time a word is found, it is taken off this list.          |
94  |    value  - Next word on list or null if list was empty.                   |
95  |                                                                            |
96  | RETURNS                                                                    |
97  |    TRUE   - The output parameter value is not null                         |
98  |    FALSE  - The input list was empty, and no word could be found.          |
99  |                                                                            |
100  | NOTES                                                                      |
101  |    Was originally written as part of the package: arp_flex but has been    |
102  |    moved to arp_standard( public function ) so that it can be used in      |
103  |    all software.                                                           |
104  |                                                                            |
105  | HISTORY                                                                    |
106  |      2/11/93         Nigel Smith     Created                               |
107  |                                                                            |
108  *----------------------------------------------------------------------------*/
109 
110 function get_next_word( list in out NOCOPY varchar2, value in out NOCOPY varchar2 ) return boolean ;
111 
112 
113 /*----------------------------------------------------------------------------*
114  | PUBLIC FUNCTION                                                            |
115  |    ceil (in date ) return date                                             |
116  |                                                                            |
117  | DESCRIPTION                                                                |
118  |    Rounds any given date to the last second before midnight of that night  |
119  |    usefull in ensuring any given date is between trunc(start) and ceil(max)|
120  |                                                                            |
121  |                                                                            |
122  | REQUIRES                                                                   |
123  |    d                 - Any date and time value                             |
124  |                                                                            |
125  | RETURNS                                                                    |
126  |    Date set to DD-MON-YYYY 23:59:59                                        |
127  |                                                                            |
128  | EXCEPTIONS RAISED                                                          |
129  |                                                                            |
130  | KNOWN BUGS                                                                 |
131  |                                                                            |
132  | NOTES                                                                      |
133  |                                                                            |
134  | HISTORY                                                                    |
135  |      2/11/93         Nigel Smith     Created                               |
136  |                                                                            |
137  *----------------------------------------------------------------------------*/
138 
139 
140 function ceil( d in date ) return date;
141 
142 /*----------------------------------------------------------------------------*
143  | PUBLIC FUNCTIONS                                                           |
144  |    Bit Wise Operations                                                     |
145  |                                                                            |
146  | DESCRIPTION                                                                |
147  |    Provides support for bitwise operations within PL/SQL, useful for       |
148  |    control flags etc.                                                      |
149  |                                                                            |
150  |                                                                            |
151  | FUNCTIONS                                                                  |
152  |    even( n )         -- Returns true if n is even                          |
153  |    odd( n )          -- Returns true if n is odd                           |
154  |    set_flag          -- Sets a given flag in the options variable          |
155  |    clear_flag        -- Clears a given flag from the options variable      |
156  |    check_flag        -- Returns true if a given flag is set                |
157  |                                                                            |
158  | KNOWN BUGS                                                                 |
159  |    All flags must be powers of 10.                                         |
160  |                                                                            |
161  | NOTES                                                                      |
162  |                                                                            |
163  | HISTORY                                                                    |
164  |      2/11/93         Nigel Smith     Created                               |
165  |                                                                            |
166  *----------------------------------------------------------------------------*/
167 
168 function even( n in number ) return boolean ;
169 function odd( n in number ) return boolean ;
170 function check_flag( options in number, flag in number ) return boolean ;
171 procedure clear_flag( options in out NOCOPY number, flag in number ) ;
172 procedure set_flag( options in out NOCOPY number, flag in number ) ;
173 
174 
175 
176 /*----------------------------------------------------------------------------*
177  | PUBLIC FUNCTION                                                            |
178  |    fnd_message                                                             |
179  |                                                                            |
180  | DESCRIPTION                                                                |
181  |    Interfaces with AOL's message dictionary                                |
182  |                                                                            |
183  |    Called as a function, it returns the message text with any tokens       |
184  |    expanded to the passed token values.                                    |
185  |                                                                            |
186  |    Called as a procedure, it raises an oracle error ( -20000 ) and the     |
187  |    message number, text with expanded tokens for the passed message name   |
188  |                                                                            |
189  | REQUIRES                                                                   |
190  |    Message Name      - Message dictionary name                             |
191  |    TOKEN, VALUE      - Up to four pairs of token, values                   |
192  |                                                                            |
193  | RETURNS                                                                    |
194  |    Expanded message text, or if called as a procedure an oracle error      |
195  |                                                                            |
196  | EXCEPTIONS RAISED                                                          |
197  |                                                                            |
198  | KNOWN BUGS                                                                 |
199  |    application_id is currently held in package ar, should be in AOL        |
200  |                                                                            |
201  | NOTES                                                                      |
202  |                                                                            |
203  | HISTORY                                                                    |
204  |      2/11/93         Nigel Smith     Created                               |
205  |                                                                            |
206  *----------------------------------------------------------------------------*/
207 
208 
209 function fnd_message( md_options in number ) return varchar2;
210 function fnd_message return varchar2;
211 
212 function previous_message( md_options in number ) return varchar2 ;
213 function previous_message return varchar2 ;
214 
215 function fnd_message( msg_name in varchar2 ) return varchar2;
216 
217 function fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2 )
218          return varchar2;
219 
220 function fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
221                                             T2 in varchar2, V2 in varchar2  )
222          return varchar2;
223 
224 function fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
225                                             T2 in varchar2, V2 in varchar2,
226                                             T3 in varchar2, V3 in varchar2 )
227         return varchar2;
228 
229 function fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
230                                             T2 in varchar2, V2 in varchar2,
231                                             T3 in varchar2, V3 in varchar2,
232                                             T4 in varchar2, V4 in varchar2 )
233         return varchar2;
234 
235 function fnd_message( md_options in number,
236                       msg_name in varchar2 ) return varchar2;
237 
238 function fnd_message( md_options in number,
239                       msg_name in varchar2, T1 in varchar2, V1 in varchar2 )
240          return varchar2;
241 
242 function fnd_message( md_options in number,
243                       msg_name in varchar2, T1 in varchar2, V1 in varchar2,
244                                             T2 in varchar2, V2 in varchar2  )
245          return varchar2;
246 
247 function fnd_message( md_options in number,
248                       msg_name in varchar2, T1 in varchar2, V1 in varchar2,
249                                             T2 in varchar2, V2 in varchar2,
250                                             T3 in varchar2, V3 in varchar2 )
251         return varchar2;
252 
253 function fnd_message( md_options in number,
254                       msg_name in varchar2, T1 in varchar2, V1 in varchar2,
255                                             T2 in varchar2, V2 in varchar2,
256                                             T3 in varchar2, V3 in varchar2,
257                                             T4 in varchar2, V4 in varchar2 )
258         return varchar2;
259 
260 /*----------------------------------------------------------------------------*
261  | PUBLIC FUNCTION                                                            |
262  |    functional_amount                                                       |
263  |                                                                            |
264  | DESCRIPTION                                                                |
265  |    This function returns the functional amount for a given foreign amount. |
269  |    Amount - the foreign amount                                             |
266  |    THe functional amount is rounded to the correct precision.              |
267  |                                                                            |
268  | REQUIRES                                                                   |
270  |    Exchange Rate - to use when converting to functional amount             |
271  |   one of:                                                                  |
272  |    Currency Code            - of the functional amount                     |
273  |    Precision                - of the functional amount                     |
274  |    minimum accountable unit - of the functional amount                     |
275  |                                                                            |
276  | RETURNS                                                                    |
277  |    amount * exchange_rate to correct rounding for currency                 |
278  |                                                                            |
279  | EXCEPTIONS RAISED                                                          |
280  |    Oracle Error      If Currency Code, Precision and minimum accountable   |
281  |                      are all NULL or if Amount or Exchange Rate ar NULL    |
282  |                                                                            |
283  |    Oracle Error      If can not find information for Currency Code         |
284  |                      supplied                                              |
285  |                                                                            |
286  | KNOWN BUGS                                                                 |
287  |    <none>                                                                  |
288  |                                                                            |
289  | NOTES                                                                      |
290  |                                                                            |
291  | HISTORY                                                                    |
292  |      2/10/93         Martin Morris           Created                       |
293  |                                                                            |
294  *----------------------------------------------------------------------------*/
295 
296 FUNCTION functional_amount(amount        IN NUMBER,
297                            currency_code IN VARCHAR2,
298                            exchange_rate IN NUMBER,
299                            precision     IN NUMBER,
300                            min_acc_unit  IN NUMBER) RETURN NUMBER ;
301 
302 
303 /*----------------------------------------------------------------------------*
304  | gl_date_range_open - date format in YYYYMMDD                               |
305  *----------------------------------------------------------------------------*/
306 function gl_date_range_open( pstart_date in varchar2,
307                              pend_date   in varchar2 ) RETURN BOOLEAN ;
308 
309 
310 /*----------------------------------------------------------------------------*
311  | PUBLIC FUNCTION                                                            |
312  |    ar_lookup                                                               |
313  |                                                                            |
314  | DESCRIPTION                                                                |
315  |    Interfaces with AR lookups, returning meaning for message type and code |
316  |                                                                            |
317  | REQUIRES                                                                   |
318  |    lookup_type                                                             |
319  |    lookup_code                                                             |
320  |                                                                            |
321  | RETURNS                                                                    |
322  |    Meaning                   Lookup meaning                                |
323  |                                                                            |
324  | EXCEPTIONS RAISED                                                          |
325  |    NO_DATA_FOUND             If Lookup Type/Code cannot be found           |
326  |                                                                            |
327  | KNOWN BUGS                                                                 |
328  |                                                                            |
329  | NOTES                                                                      |
330  |                                                                            |
331  | HISTORY                                                                    |
332  |      2/11/93         Nigel Smith     Created                               |
333  |                                                                            |
334  *----------------------------------------------------------------------------*/
335 
336 function ar_lookup( lookup_type in varchar2, lookup_code in varchar2 )
337          return varchar2;
338 
339 
340 /*-------------------------------------------------------------------------+
341  |                                                                         |
342  | PUBLIC  FLAGS                                                           |
343  |  Control flags are currently held in base 10.                           |
344  |                                                                         |
345  +-------------------------------------------------------------------------*/
346 
347 function MD_MSG_NUMBER return number ;          -- Message Dictionary control
351 function MD_MSG_EXPLANATION return number ;     -- Not supported yet
348 function MD_MSG_TEXT   return number ;          -- Options
349 function MD_MSG_NAME   return number ;          -- Show message name only
350 function MD_MSG_TOKENS return number ;          -- Return Tokens and Values
352 function MD_MSG_FIND_NUMBER return number ;     -- Use Message Number not Name
353 
354 procedure gl_period_info(    gl_date        in  date,
355                              period_name    out NOCOPY varchar2,
356                              start_date     out NOCOPY date,
357                              end_date       out NOCOPY date,
358                              closing_status out NOCOPY varchar2,
359                              period_type    out NOCOPY varchar2,
360                              period_year    out NOCOPY number,
361                              period_num     out NOCOPY number,
362                              quarter_num    out NOCOPY number
363  );
364 
365 function gl_period_name( gl_date in date ) return varchar2;
366 FUNCTION is_gl_date_valid(  p_gl_date                IN DATE,
367                             p_trx_date               IN DATE,
368                             p_validation_date1       IN DATE,
369                             p_validation_date2       IN DATE,
370                             p_validation_date3       IN DATE,
371                             p_allow_not_open_flag    IN VARCHAR2,
372                             p_set_of_books_id        IN NUMBER,
373                             p_application_id         IN NUMBER,
374                             p_check_period_status    IN BOOLEAN DEFAULT TRUE)
375   RETURN BOOLEAN;
376 
377 function validate_and_default_gl_date(
378                                        gl_date                in date,
379                                        trx_date               in date,
380                                        validation_date1       in date,
381                                        validation_date2       in date,
382                                        validation_date3       in date,
383                                        default_date1          in date,
384                                        default_date2          in date,
385                                        default_date3          in date,
386                                        p_allow_not_open_flag  in varchar2,
387                                        p_invoicing_rule_id    in varchar2,
388                                        p_set_of_books_id      in number,
389                                        p_application_id       in number,
390                                        default_gl_date       out NOCOPY date,
391                                        defaulting_rule_used  out NOCOPY varchar2,
392                                        error_message         out NOCOPY varchar2
393                                      ) return boolean;
394 
395 
396 /*1882597
397   Added a new function default_gl_date_conc which returns the gl_date
398   to be defaulted to the concurrent programs based on sysdate */
399 
400 function default_gl_date_conc return date;
401 
402 /*-------------------------------------------------------------------------+
403  |                                                                         |
404  | PUBLIC  PROCEDURES                                                      |
405  |                                                                         |
406  +-------------------------------------------------------------------------*/
407 
408 /*----------------------------------------------------------------------------*
409  | PUBLIC PROCEDURE                                                           |
410  |    debug             - Display text message if in debug mode               |
411  |    enable_debug      - Enable run time debugging                           |
412  |    disable_debug     - Disable run time debugging                          |
413  |                                                                            |
414  | DESCRIPTION                                                                |
415  |    Generate standard debug information sending it to dbms_output so that   |
416  |    the client tool can log it for the user.                                |
417  |                                                                            |
418  |   NOTE:  As of 115.16 of this package, we no longer use dbms_output to
419  |      route messages to log or screen.  As of version 115.36, we now use
420  |      FND_LOG routines to record the messages in the FND_LOG_MESSAGES table.
421  |
422  |   The current version of the debug procedure works like this:
423  |
424  |    arp_standard.debug('arp_util_pkg.get_value()+',    --> msg text
425  |                       'plsql',                        --> prefix (source)
426  |                       'arp_util_pkg.get_value.begin', --> package name
427  |                       FND_LOG_LEVEL.PROCEDURE);       --> FND constant
428  |
429  |   Now, in reality, only the first parameter is required and the others
430  |   will be defaulted or determined based on content of the message.
431  |
432  |    arp_standard.debug('arp_util_pkg.get_value()+');
433  |
434  |   Both of the above examples will log the following message:
435  |
436  |     module := ar.plsql.arp_util_pkg.get_value.begin
437  |     level  := 2 (this equates to FND_LOG.LEVEL_PROCEDURE)
438  |     text   := 'arp_util_pkg.get_value()+'
439  |
440  |   Several rules you should keep in mind...
441  |    (1) I never manipulate the message text (looks just like it did before)
442  |    (2) I default the source as 'plsql' in most cases.
443  |         Valid values include 'resource','reports','forms','src.<subdir>'
447  |       FND_LOG.LEVEL_PROCEDURE and the '.begin' or '.end'
444  |    (3) I use parentheses () and +/- signs to determine the module name
445  |       and log level.  Only use parens to designate calls and put a +
446  |       or - adjacent to the closing (right) paren to default
448  |       DO NOT HAVE EXTRA SPACES WITHIN PARENS OR PROCEDURE NAMES
449  |    (4) The word 'EXCEPTION' is interpreted as an
450  |       FND_LOG.LEVEL_EXCEPTION message.
451  |
452  | Here are sample uses of arp_standard.debug:
453  |
454  | Typical entry/exit messages in plsql packages:
455  |    arp_standard.debug('ar_rounding.correct_other_receivables()+');
456  |
457  | Inline in .pld library:
458  |    arp_standard.debug('arxtwmai_folder.validate(EVENT)-','resource');
459  |
460  | Inline in pro*C:
461  |    arp_standard.debug('raaiad()+', 'src.autoinv');
462  |
463  | Detail messages in plsql:
464  |    arp_standard.debug('request_id = ' || l_request_id,
465  |                       'plsql',
466  |                       'arp_util.get_gl_date');
467  |
468  | Specific exception/error logging:
469  |    arp_standard.debug('ERROR:  Processed has failed',
470  |                       'plsql',
471  |                       'arp_trx_validate.gl_date',
472  |                       'FND_LOG.LEVEL_ERROR');
473  |
474  | For most logging messages, it is sufficient to just supply the message
475  | text and maybe the prefix (source type).  As long as you follow the naming
476  | convention and use of parens, I can get the procedure name for you.
477  |
478  | The valid FND_LOG LEVEL values are:
479  |
480  |     FND_LOG.LEVEL_STATEMENT - most detailed level - should be used
481  |          for displaying values and other run-time specifics
482  |     FND_LOG.LEVEL_PROCEDURE - Entry and exit points.  I determine
483  |          this level in the algorythm logic by looking for )+, +),
484  |          )-, and -). When using this level, you should include
485  |          '.begin' or '.end' to the module_name
486  |     FND_LOG.LEVEL_EVENT - A higher level message for indicating
487  |          things like 'record added' or 'calling arp_whatever_api'
488  |     FND_LOG.LEVEL_EXCEPTION - recording a handled exception in an
489  |          exception block.  By default, I look for the word
490  |          'exception' in the message text and set this level.
491  |     FND_LOG.LEVEL_ERROR - An error message displayed to the end-user
492  |     FND_LOG.LEVEL_UNEXPECTED - A failure that could result in
493  |          the product becoming unstable.
494  |
495  |  In the database, the log level is reflected as a number from 1 to 6
496  |  where LEVEL_STATEMENT = 1 and LEVEL_UNEXPECTED = 6
497  |
498  | REQUIRES                                                                   |
499  |    line_of_text           The line of text that will be displayed.         |
500  |                                                                            |
501  | EXCEPTIONS RAISED                                                          |
502  |                                                                            |
503  | KNOWN BUGS                                                                 |
504  |                                                                            |
505  | NOTES                                                                      |
506  |                                                                            |
507  | HISTORY                                                                    |
508  |    26 Mar 93  Nigel Smith      Created                                     |
509  |    12-NOV-97	 OSTEINME	  added file io debugging		      |
510  |    07-OCT-03  M Raymond        added optional parameters to debug()        |
511  *----------------------------------------------------------------------------*/
512 
513 procedure debug( line in varchar2,
514           msg_prefix  in varchar2 DEFAULT 'plsql',
515           msg_module  in varchar2 DEFAULT NULL,
516           msg_level   in number   DEFAULT NULL ) ;
517 procedure enable_debug;
518 procedure enable_debug( buffer_size NUMBER );
519 procedure disable_debug;
520 procedure enable_file_debug(path_name IN varchar2,
521 			file_name IN VARCHAR2);
522 procedure disable_file_debug;
523 
524 /*----------------------------------------------------------------------------*
525  | PUBLIC PROCEDURE                                                           |
526  |    set who information                                                     |
527  |                                                                            |
528  | DESCRIPTION                                                                |
529  |    Set foundation who information so that all future packages and         |
530  |    procedure can reference the correct value.                              |
531  |                                                                            |
532  | REQUIRES                                                                   |
533  |                                                                            |
534  |    user_id                    Foundation User ID                           |
535  |    request_id                 Concurrent Request ID                        |
536  |    program_application_id                                                  |
537  |    program_id                                                              |
538  |    last_update_login                                                       |
539  |                                                                            |
540  | EXCEPTIONS RAISED                                                          |
541  |                                                                            |
545  |                                                                            |
542  | KNOWN BUGS                                                                 |
543  |                                                                            |
544  | NOTES                                                                      |
546  | HISTORY                                                                    |
547  |      2/11/93         Nigel Smith     Created                               |
548  |                                                                            |
549  *----------------------------------------------------------------------------*/
550 
551 PROCEDURE set_who_information( user_id in number,
552                                request_id in number,
553                                program_application_id in number,
554                                program_id in number,
555                                last_update_login in number ) ;
556 
557 
558 PROCEDURE set_application_information( appl_id in number,
559                                        language_id    in number );
560 
561 /*----------------------------------------------------------------------------*
562  | PUBLIC PROCEDURE                                                           |
563  |    fnd_message                                                             |
564  |                                                                            |
565  | DESCRIPTION                                                                |
566  |    Interfaces with AOL's message dictionary                                |
567  |                                                                            |
568  |    Called as a procedure, it raises an oracle error ( -20000 ) and the     |
569  |    message number, text with expanded tokens for the passed message name   |
570  |                                                                            |
571  | REQUIRES                                                                   |
572  |    Message Name      - Message dictionary name                             |
573  |    TOKEN, VALUE      - Up to four pairs of token, values                   |
574  |                                                                            |
575  | RETURNS                                                                    |
576  |    Expanded message text, or if called as a procedure an oracle error      |
577  |                                                                            |
578  | EXCEPTIONS RAISED                                                          |
579  |                                                                            |
580  | KNOWN BUGS                                                                 |
581  |    application_id is currently held in package ar, should be in AOL        |
582  |                                                                            |
583  | NOTES                                                                      |
584  |                                                                            |
585  | HISTORY                                                                    |
586  |      2/11/93         Nigel Smith     Created                               |
587  |                                                                            |
588  *----------------------------------------------------------------------------*/
589 
590 procedure fnd_message;
591 
592 procedure fnd_message( msg_name in varchar2 ) ;
593 
594 procedure fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2 );
595 
596 procedure fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
597                                              T2 in varchar2, V2 in varchar2  );
598 
599 procedure fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
600                                              T2 in varchar2, V2 in varchar2,
601                                              T3 in varchar2, V3 in varchar2);
602 
603 procedure fnd_message( msg_name in varchar2, T1 in varchar2, V1 in varchar2,
604                                              T2 in varchar2, V2 in varchar2,
605                                              T3 in varchar2, V3 in varchar2,
606                                              T4 in varchar2, V4 in varchar2 );
607 
608 procedure fnd_message( md_options in number  );
609 
610 procedure fnd_message( md_options in number,
611                        msg_name in varchar2 ) ;
612 
613 procedure fnd_message( md_options in number,
614                        msg_name in varchar2, T1 in varchar2, V1 in varchar2 );
615 
616 procedure fnd_message( md_options in number,
617                        msg_name in varchar2, T1 in varchar2, V1 in varchar2,
618                                              T2 in varchar2, V2 in varchar2  );
619 
620 procedure fnd_message( md_options in number,
621                        msg_name in varchar2, T1 in varchar2, V1 in varchar2,
622                                              T2 in varchar2, V2 in varchar2,
623                                              T3 in varchar2, V3 in varchar2);
624 
625 procedure fnd_message( md_options in number,
626                        msg_name in varchar2, T1 in varchar2, V1 in varchar2,
627                                              T2 in varchar2, V2 in varchar2,
628                                              T3 in varchar2, V3 in varchar2,
629                                              T4 in varchar2, V4 in varchar2 );
630 
631 /*----------------------------------------------------------------------------*
632  | PUBLIC PROCEDURE                                                           |
633  |    gl_activity        ( P_PERIOD_FROM         IN                           |
637  |                         ,PERIOD_NET_DR         OUT NOCOPY                         |
634  |                         ,P_PERIOD_TO           IN                          |
635  |                         ,P_CODE_COMBINATION_ID IN                          |
636  |                         ,P_SET_OF_BOOKS_ID     IN                          |
638  |                         ,PERIOD_NET_CR         OUT)                        |
639  |                                                                            |
640  |                                                                            |
641  | DESCRIPTION                                                                |
642  |    Given the parameter listed above and the procedure will return          |
643  |    the Period Net Cr and the Period Net Dr                                 |
644  |    or raise exception NO_DATA_FOUND                                        |
645  |                                                                            |
646  |    If the GL Server server package: GL_BALANCES is not installed, this     |
647  |    function returns NO_DATA_FOUND.                                         |
648  |                                                                            |
649  | PARAMETERS                                                                 |
650  |      PERIOD_FROM          VARCHAR2                                         |
651  |      PERIOD_TO            VARCHAR2                                         |
652  |      CODE_COMBINATION_ID  NUMBER                                           |
653  |      SET_OF_BOOKS_ID      NUMBER                                           |
654  |                                                                            |
655  | RETURNS                                                                    |
656  |    PERIOD_NET_DR                                                           |
657  |    PERIOD_NET_CR                                                           |
658  |    exception NO_DATA_FOUND                                                 |
659  |                                                                            |
660  |                                                                            |
661  | HISTORY                                                                    |
662  |      3/16/95        Schirin Farzaneh  Created                              |
663  |                                                                            |
664  *----------------------------------------------------------------------------*/
665 
666 procedure gl_activity     ( P_PERIOD_FROM         IN VARCHAR2
667                            ,P_PERIOD_TO           IN VARCHAR2
668                            ,P_CODE_COMBINATION_ID IN NUMBER
669                            ,P_SET_OF_BOOKS_ID     IN NUMBER
670                            ,P_PERIOD_NET_DR       OUT NOCOPY NUMBER
671                            ,P_PERIOD_NET_CR       OUT NOCOPY NUMBER) ;
672 
673 
674 
675 
676 /*===========================================================================+
677  | PROCEDURE                                                                 |
678  |    find_previous_trx_line_id                                              |
679  |                                                                           |
680  | DESCRIPTION                                                               |
681  |    For a given invoice line and associated line number for tax, this      |
682  |    rountine will attempt to find the same tax line for that invoice line  |
683  |    so that the accounting engine can build the autoaccounting for the     |
684  |    credit memo line.                                                      |
685  |                                                                           |
686  | SCOPE - PRIVATE                                                           |
687  |                                                                           |
688  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
689  |                                                                           |
690  | ARGUMENTS  : IN:  p_customer_trx_line_id                                  |
691  |              IN:  p_tax_line_number                                       |
692  |              IN:  p_vat_tax_id                                            |
693  |             OUT:  p_tax_customer_trx_id                                   |
694  |             OUT:  p_tax_customer_trx_line_id                              |
695  |                                                                           |
696  | NOTES                                                                     |
697  |                                                                           |
698  | MODIFICATION HISTORY                                                      |
699  |     28-Nov-95  Nigel Smith         Created                                |
700  |                                                                           |
701  +===========================================================================*/
702 
703 PROCEDURE find_previous_trx_line_id( p_customer_trx_line_id IN NUMBER,
704                                     p_tax_line_number IN NUMBER,
705 				    p_vat_tax_id      IN NUMBER,
706 				    p_tax_customer_trx_id OUT NOCOPY NUMBER,
707 				    p_tax_customer_trx_line_id OUT NOCOPY NUMBER,
708 				    p_chk_applied_cm in BOOLEAN default FALSE );
709 
710 
711 
712 /*===========================================================================+
713  | PROCEDURE                                                                 |
714  |    enable_sql_trace                                                       |
715  |                                                                           |
716  | DESCRIPTION                                                               |
717  |    Enable sql trace based on value (YES/NO) of profile AR_ENABLE_SQL_TRACE|
718  |                                                                           |
719  | SCOPE - PRIVATE                                                           |
720  |                                                                           |
721  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
722  |                                                                           |
723  | NOTES                                                                     |
724  |                                                                           |
728  +===========================================================================*/
725  | MODIFICATION HISTORY                                                      |
726  |     10-Sep-99  Govind Jayanth      Created                                |
727  |                                                                           |
729 PROCEDURE enable_sql_trace;
730 
731 
732 /*===========================================================================+
733  | PROCEDURE                                                                 |
734  |    init_standard                                                          |
735  |                                                                           |
736  | DESCRIPTION                                                               |
737  | New public procedure init_standard defined for initialization             |
738  | of arp_standard. This procedure may be called from other modules to run   |
739  | initialization whenever required.                                         |
740  |                                                                           |
741  |                                                                           |
742  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
743  |                                                                           |
744  | NOTES                                                                     |
745  |                                                                           |
746  | MODIFICATION HISTORY                                                      |
747  |     10-Sep-02  Sahana Shetty       Created for Bug2538244.                |
748  |                                                                           |
749  +===========================================================================*/
750 --Begin anuj
751 /* Multi-Org Access Control Changes for SSA;Begin;anukumar;11/01/2002*/
752  PROCEDURE INIT_STANDARD(p_org_id number default null);
753 /* Multi-Org Access Control Changes for SSA;end;anukumar;11/01/2002*/
754 --end anuj
755 
756 
757 pg_prf_enable_debug	VARCHAR2(10) := 'N';
758 
759 
760 END ARP_STANDARD;