DBA Data[Home] [Help]

APPS.ARP_DISTRIBUTIONS_PKG SQL Statements

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

Line: 6

PROCEDURE insert_p(
	p_dist_rec 	IN ar_distributions%ROWTYPE,
	p_line_id	OUT NOCOPY ar_distributions.line_id%TYPE ) IS
l_line_id	ar_distributions.line_id%TYPE;
Line: 10

exp_null_insert exception;
Line: 11

pragma exception_init(exp_null_insert, -1400);
Line: 14

         arp_standard.debug( 'arp_distributions_pkg.insert_p()+' );
Line: 17

      SELECT ar_distributions_s.nextval
      INTO   l_line_id
      FROM   dual;
Line: 61

      INSERT INTO  ar_distributions (
		   line_id,
		   source_id,
 		   source_table,
 		   source_type,
 		   source_type_secondary,
 		   code_combination_id,
 		   amount_dr,
 		   amount_cr,
 		   acctd_amount_dr,
 		   acctd_amount_cr,
 		   created_by,
 		   creation_date,
 		   last_updated_by,
 		   last_update_date,
                   last_update_login,
                   source_id_secondary,
                   source_table_secondary,
                   currency_code        ,
                   currency_conversion_rate,
                   currency_conversion_type,
                   currency_conversion_date,
                   third_party_id,
                   third_party_sub_id,
                   tax_code_id,
                   location_segment_id,
                   taxable_entered_dr,
                   taxable_entered_cr,
                   taxable_accounted_dr,
                   taxable_accounted_cr,
                   tax_link_id,
                   reversed_source_id,
                   tax_group_code_id
                   ,org_id
                   --{BUG#2979254
                   ,ref_customer_trx_line_id
                   ,ref_cust_trx_line_gl_dist_id
                   ,ref_line_id
                   ,from_amount_dr
                   ,from_amount_cr
                   ,from_acctd_amount_dr
                   ,from_acctd_amount_cr
                   ,ref_account_class
                   ,activity_bucket
                   ,ref_dist_ccid
                   ,ref_mf_dist_flag
                   --}
 		 )
       VALUES (    l_line_id,
                   p_dist_rec.source_id,
                   p_dist_rec.source_table,
                   p_dist_rec.source_type,
                   p_dist_rec.source_type_secondary,
                   p_dist_rec.code_combination_id,
                   p_dist_rec.amount_dr,
                   p_dist_rec.amount_cr,
                   p_dist_rec.acctd_amount_dr,
                   p_dist_rec.acctd_amount_cr,
		   arp_standard.profile.user_id,
 		   SYSDATE,
		   arp_standard.profile.user_id,
 		   SYSDATE,
		   NVL( arp_standard.profile.last_update_login,
			p_dist_rec.last_update_login ),
                   p_dist_rec.source_id_secondary,
                   p_dist_rec.source_table_secondary,
                   p_dist_rec.currency_code        ,
                   p_dist_rec.currency_conversion_rate,
                   p_dist_rec.currency_conversion_type,
                   p_dist_rec.currency_conversion_date,
                   p_dist_rec.third_party_id,
                   p_dist_rec.third_party_sub_id,
                   p_dist_rec.tax_code_id,
                   p_dist_rec.location_segment_id,
                   p_dist_rec.taxable_entered_dr,
                   p_dist_rec.taxable_entered_cr,
                   p_dist_rec.taxable_accounted_dr,
                   p_dist_rec.taxable_accounted_cr,
                   p_dist_rec.tax_link_id,
                   p_dist_rec.reversed_source_id,
                   p_dist_rec.tax_group_code_id
                   ,arp_standard.sysparm.org_id /* SSA changes anuj */
                   --{BUG#2979254
                   ,p_dist_rec.ref_customer_trx_line_id
                   ,p_dist_rec.ref_cust_trx_line_gl_dist_id
                   ,p_dist_rec.ref_line_id
                   ,p_dist_rec.from_amount_dr
                   ,p_dist_rec.from_amount_cr
                   ,p_dist_rec.from_acctd_amount_dr
                   ,p_dist_rec.from_acctd_amount_cr
                   ,p_dist_rec.ref_account_class
                   ,p_dist_rec.activity_bucket
                   ,p_dist_rec.ref_dist_ccid
                   ,p_dist_rec.ref_mf_dist_flag
                   --}
	       );
Line: 161

       arp_standard.debug( 'arp_distributions_pkg.insert_p()-' );
Line: 164

	WHEN exp_null_insert THEN
        FND_MESSAGE.SET_NAME('AR','AR_INS_NULL_INTO_NOTNULL');
Line: 169

	       arp_standard.debug( 'EXCEPTION: arp_distributions_pkg.insert_p' );
Line: 172

END insert_p;
Line: 174

PROCEDURE update_p(
	p_dist_rec 	IN ar_distributions%ROWTYPE ) IS
BEGIN
    IF PG_DEBUG in ('Y', 'C') THEN
       arp_standard.debug( 'arp_distributions_pkg.update_p()+' );
Line: 181

    UPDATE ar_distributions SET
	   source_id = p_dist_rec.source_id,
           source_table = p_dist_rec.source_table,
           source_type = p_dist_rec.source_type,
           source_type_secondary = p_dist_rec.source_type_secondary,
           code_combination_id = p_dist_rec.code_combination_id,
           amount_dr = p_dist_rec.amount_dr,
           amount_cr = p_dist_rec.amount_cr,
           acctd_amount_dr = p_dist_rec.acctd_amount_dr,
           acctd_amount_cr = p_dist_rec.acctd_amount_cr,
           last_updated_by = arp_standard.profile.user_id,
           last_update_date = SYSDATE,
           last_update_login = NVL( arp_standard.profile.last_update_login,
                        	    p_dist_rec.last_update_login ),
           source_id_secondary = p_dist_rec.source_id_secondary,
           source_table_secondary = p_dist_rec.source_table_secondary,
           currency_code = p_dist_rec.currency_code,
           currency_conversion_rate = p_dist_rec.currency_conversion_rate,
           currency_conversion_type = p_dist_rec.currency_conversion_type,
           currency_conversion_date = p_dist_rec.currency_conversion_date,
           third_party_id = p_dist_rec.third_party_id,
           third_party_sub_id = p_dist_rec.third_party_sub_id,
           tax_code_id = p_dist_rec.tax_code_id,
           location_segment_id = p_dist_rec.location_segment_id,
           taxable_entered_dr = p_dist_rec.taxable_entered_dr,
           taxable_entered_cr = p_dist_rec.taxable_entered_cr,
           taxable_accounted_dr = p_dist_rec.taxable_accounted_dr,
           taxable_accounted_cr = p_dist_rec.taxable_accounted_cr,
           tax_link_id = p_dist_rec.tax_link_id,
           reversed_source_id = p_dist_rec.reversed_source_id,
           tax_group_code_id = p_dist_rec.tax_group_code_id,
           --{BUG#2979254
           ref_customer_trx_line_id     = p_dist_rec.ref_customer_trx_line_id,
           ref_cust_trx_line_gl_dist_id = p_dist_rec.ref_cust_trx_line_gl_dist_id,
           ref_line_id                  = p_dist_rec.ref_line_id,
           from_amount_dr               = p_dist_rec.from_amount_dr,
           from_amount_cr               = p_dist_rec.from_amount_cr,
           from_acctd_amount_dr         = p_dist_rec.from_acctd_amount_dr,
           from_acctd_amount_cr         = p_dist_rec.from_acctd_amount_cr,
           ref_account_class                    = p_dist_rec.ref_account_class,
           activity_bucket                       = p_dist_rec.activity_bucket,
           ref_dist_ccid                = p_dist_rec.ref_dist_ccid,
           ref_mf_dist_flag             = p_dist_rec.ref_mf_dist_flag
           --}
    WHERE line_id = p_dist_rec.line_id;
Line: 228

       arp_standard.debug( 'arp_distributions_pkg.update_p()-' );
Line: 233

               arp_standard.debug( 'EXCEPTION: arp_distributions_pkg.update_p' );
Line: 236

END update_p;
Line: 238

PROCEDURE delete_p(
	p_line_id IN ar_distributions.line_id%TYPE ) IS
BEGIN
    IF PG_DEBUG in ('Y', 'C') THEN
       arp_standard.debug( 'arp_distributions_pkg.delete_p()+' );
Line: 245

    DELETE FROM ar_distributions
    WHERE line_id = p_line_id;
Line: 249

       arp_standard.debug( 'arp_distributions_pkg.delete_p()-' );
Line: 254

               arp_standard.debug( 'EXCEPTION: arp_distributions_pkg.delete_p' );
Line: 257

END delete_p;
Line: 266

    SELECT line_id
    INTO   l_line_id
    FROM  ar_distributions
    WHERE line_id = p_line_id
    FOR UPDATE OF line_id;
Line: 290

    SELECT *
    INTO   p_dist_rec
    FROM   ar_distributions
    WHERE  line_id = p_line_id;
Line: 316

    SELECT *
    INTO   p_dist_rec
    FROM   ar_distributions
    WHERE  source_id = p_source_id
      AND  source_table = p_source_table
      AND  source_type = p_source_type;
Line: 344

    SELECT *
    INTO   p_dist_rec
    FROM   ar_distributions
    WHERE  source_id = p_source_id
      AND  source_table = p_source_table
      AND  source_type = p_source_type
    FOR UPDATE OF line_id;
Line: 374

    SELECT *
    INTO   p_dist_rec
    FROM   ar_distributions
    WHERE  source_id = p_source_id
      AND  source_table = p_source_table
      AND  source_type = p_source_type
    FOR UPDATE OF line_id NOWAIT;