DBA Data[Home] [Help]

APPS.ZX_P2P_DEF_AP_PREUPG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 48

|		   into zx_update_criteria_results		            |
|		   which is the driving table for rates data load           |
|                                                                           |
|                                                                           |
|  ARGUMENTS  : 							    |
|                                                                           |
|                                                                           |
|  MODIFICATION HISTORY                                                     |
|									    |
|  06-Mar-06    Arnab Sengupta        Created. 		                    |
|                                                                           |
|    									    |
+===========================================================================*/
PROCEDURE load_results_for_ap (p_tax_id   NUMBER) AS
  BEGIN
	NULL;
Line: 71

 |     This routine processes AP normal Tax codes and inserts appropriate    |
 |     data into the following zx base tables.                               |
 |               ZX_RATES_B                                                  |
 |               ZX_RATES_TL                                                 |
 |               ZX_ACCOUNTS                                                 |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                    |
 |                                                                           |
 | CALLED FROM                                                               |
 |        migrate_ap_tax_codes_setup                                         |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-Dec-03  Srinivas Lokam      Created.                               |
 |     30-Jan-04  Srinivas Lokam      Added INPUT parameters,AND conditions  |
 |                                    in SELECT statements for handling      |
 |                                    SYNC process.                          |
 |==========================================================================*/

PROCEDURE Migrate_Normal_Tax_Codes(p_tax_id IN NUMBER DEFAULT NULL) IS
BEGIN
 null;
Line: 116

 |     This routine processes assigned OFFSET Tax codes and inserts          |
 |     appropriate data into the following zx base tables.                   |
 |               ZX_RATES_B                                                  |
 |               ZX_RATES_TL                                                 |
 |               ZX_ACCOUNTS                                                 |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                    |
 |                                                                           |
 | CALLED FROM                                                               |
 |        migrate_ap_tax_codes_setup                                         |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-Dec-03  Srinivas Lokam      Created.                               |
 |     30-Jan-04  Srinivas Lokam      Added INPUT parameters,AND conditions  |
 |                                    in SELECT statements for handling      |
 |                                    SYNC process.                          |
 |                                                                           |
 |==========================================================================*/



PROCEDURE migrate_assign_offset_codes(p_tax_id IN NUMBER DEFAULT NULL) IS
BEGIN

  NULL;
Line: 161

 |     This routine processes unassigned OFFSET Tax codes and inserts        |
 |     appropriate data into the following zx base tables.                   |
 |               ZX_RATES_B                                                  |
 |               ZX_RATES_TL                                                 |
 |               ZX_ACCOUNTS                                                 |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                    |
 |                                                                           |
 | CALLED FROM                                                               |
 |        migrate_ap_tax_codes_setup                                         |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-Dec-03  Srinivas Lokam      Created.                               |
 |     30-Jan-04  Srinivas Lokam      Added INPUT parameters,AND conditions  |
 |                                    in SELECT statements for handling      |
 |                                    SYNC process.                          |
 |                                                                           |
 |==========================================================================*/


PROCEDURE migrate_unassign_offset_codes(p_tax_id IN NUMBER DEFAULT NULL) IS
BEGIN
null;
Line: 203

 |     This routine processes distinct recovery rates,inserts appropriate    |
 |     data into the following zx base tables.                               |
 |               ZX_RATES_B                                                  |
 |               ZX_RATES_TL                                                 |
 |               ZX_ACCOUNTS                                                 |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                    |
 |                                                                           |
 | CALLED FROM                                                               |
 |        migrate_ap_tax_codes_setup                                         |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     24-Dec-03  Srinivas Lokam      Created.                               |
 |     30-Jan-04  Srinivas Lokam      Added INPUT parameters,AND conditions  |
 |                                    in SELECT statements for handling      |
 |                                    SYNC process.                          |
 |                                                                           |
 |==========================================================================*/


PROCEDURE migrate_recovery_rates(p_tax_id IN NUMBER DEFAULT NULL) IS
BEGIN

 null;
Line: 291

	select aptax2.tax_id tax_id
	from
	(
		select DISTINCT org_id,set_of_books_id,name
		from   ap_tax_codes_all a
		where a.enabled_flag = 'N'
		and    exists
		(
			select 1 from ap_tax_codes_all b
				   where  a.org_id = b.org_id
			       and    a.set_of_books_id = b.set_of_books_id
			       and    a.name =  b.name
			       and
				(          (    Nvl(a.START_DATE,l_min_start_date) > Nvl(b.START_DATE,l_min_start_date)
					    and Nvl(a.INACTIVE_DATE,l_max_end_date)  < Nvl(b.INACTIVE_DATE,l_max_end_date))

				       or  (    Nvl(a.START_DATE,l_min_start_date) < Nvl(b.START_DATE,l_min_start_date)
					    and Nvl(a.INACTIVE_DATE,l_max_end_date) > Nvl(b.START_DATE,l_max_end_date)
					    and Nvl(a.INACTIVE_DATE,l_max_end_date)  Nvl(b.START_DATE,l_min_start_date)
					    and Nvl(a.START_DATE,l_min_start_date) Nvl(b.INACTIVE_DATE,l_max_end_date))
		                 )
		and     b.enabled_flag = 'N'
     	         )
		and     exists
		(select c.org_id,c.set_of_books_id,c.name ,count(c.org_id) from ap_tax_codes_all c
			 where        a.org_id                 = c.org_id
			       and    a.set_of_books_id        = c.set_of_books_id
			       and    a.name                   = c.name
			 group by c.org_id,c.set_of_books_id,c.name
			 having count(c.org_id) > 1)
	)
	aptax1,
	ap_tax_codes_all aptax2
	where
		aptax1.org_id           = 	aptax2.org_id
	and	aptax1.set_of_books_id  =      	aptax2.set_of_books_id
	and	aptax1.	name            =      	aptax2.	name
	;
Line: 423

	    SELECT 'Y' INTO ID_CLASH FROM DUAL
	    WHERE EXISTS (select 1
			  from ap_tax_codes_all,
			       ar_vat_tax_all_b
			  where tax_id = vat_tax_id);
Line: 438

	   SELECT NVL(MULTI_ORG_FLAG,'N')  INTO L_MULTI_ORG_FLAG FROM
	    FND_PRODUCT_GROUPS;