DBA Data[Home] [Help]

APPS.ARP_TBAT_PKG SQL Statements

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

Line: 5

   |  Dummy constants for use in update and lock operations |
   +--------------------------------------------------------*/

  AR_TEXT_DUMMY   CONSTANT VARCHAR2(10) := '~~!@#$*&^';
Line: 14

   |  Package global variables to hold the parsed update cursors.  |
   |  This allows the cursors to be reused without being reparsed. |
   +---------------------------------------------------------------*/

  pg_cursor1  integer := '';
Line: 37

 |    last_update_date.							     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_batch_rec					     |
 |              OUT:                                                         |
 |		      None						     |
 |          IN/ OUT:							     |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     19-JUL-95  Charlie Tomberg     Created                                |
 |                                                                           |
 | 20-MAR-2000  J Rautiainen    Added BR project related columns             |
 |                              ISSUE_DATE, MATURITY_DATE,                   |
 |                              SPECIAL_INSTRUCTIONS, BATCH_PROCESS_STATUS   |
 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added column 		     |
 |					      purged_children_flag and	     |
 |					      request_id 		     |
 | 				      	      into the table handlers. 	     |
 |                                                                           |
 +===========================================================================*/

PROCEDURE display_batch_rec( p_batch_rec ra_batches%rowtype )
                   IS


BEGIN

   arp_util.debug('arp_tbat_pgk.display_batch_rec()+');
Line: 81

   arp_util.debug('last_updated_by: '    || p_batch_rec.last_updated_by);
Line: 83

   arp_util.debug('last_update_login: '  || p_batch_rec.last_update_login);
Line: 121

   arp_util.debug('selection_criteria_id:  ' || p_batch_rec.selection_criteria_id);
Line: 140

 |    Selects and displays the values of all columns except creation_date    |
 |    and last_update_date.						     |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_batch_id					     |
 |              OUT:                                                         |
 |		      None						     |
 |          IN/ OUT:							     |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     13-JUL-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

PROCEDURE display_batch(  p_batch_id IN ra_batches.batch_id%type)
                   IS

   l_batch_rec ra_batches%rowtype;
Line: 193

 |    in the dynamic SQL update statement.                                   |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    dbms_sql.bind_variable                                                 |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_update_cursor  - ID of the update cursor             |
 |                    p_batch_rec      - ra_batches record                   |
 |              OUT:                                                         |
 |                    None                                                   |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 | 20-MAR-2000  J Rautiainen    Added BR project related columns             |
 |                              ISSUE_DATE, MATURITY_DATE,                   |
 |                              SPECIAL_INSTRUCTIONS, BATCH_PROCESS_STATUS   |
 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added column 		     |
 |					      purged_children_flag and	     |
 |					      request_id 		     |
 | 				      	      into the table handlers. 	     |
 |                                                                           |
 +===========================================================================*/


PROCEDURE bind_batch_variables(p_update_cursor IN integer,
                               p_batch_rec     IN ra_batches%rowtype) IS

BEGIN

   arp_util.debug('arp_tbat_pkg.bind_batch_variables()+');
Line: 238

   dbms_sql.bind_variable(p_update_cursor, ':ar_text_dummy',
                          AR_TEXT_DUMMY);
Line: 240

   dbms_sql.bind_variable(p_update_cursor, ':ar_number_dummy',
                          AR_NUMBER_DUMMY);
Line: 242

   dbms_sql.bind_variable(p_update_cursor, ':ar_date_dummy',
                          AR_DATE_DUMMY);
Line: 244

   dbms_sql.bind_variable(p_update_cursor, ':ar_flag_dummy',
                          AR_FLAG_DUMMY);
Line: 251

   dbms_sql.bind_variable(p_update_cursor, ':pg_user_id',
                          pg_user_id);
Line: 254

   dbms_sql.bind_variable(p_update_cursor, ':pg_login_id',
                          pg_login_id);
Line: 257

   dbms_sql.bind_variable(p_update_cursor, ':pg_conc_login_id',
                          pg_conc_login_id);
Line: 265

   dbms_sql.bind_variable(p_update_cursor, ':batch_id',
                          p_batch_rec.batch_id);
Line: 267

   dbms_sql.bind_variable(p_update_cursor, ':last_update_date',
                          p_batch_rec.last_update_date);
Line: 269

   dbms_sql.bind_variable(p_update_cursor, ':last_updated_by',
                          p_batch_rec.last_updated_by);
Line: 271

   dbms_sql.bind_variable(p_update_cursor, ':creation_date',
                          p_batch_rec.creation_date);
Line: 273

   dbms_sql.bind_variable(p_update_cursor, ':created_by',
                          p_batch_rec.created_by);
Line: 275

   dbms_sql.bind_variable(p_update_cursor, ':last_update_login',
                          p_batch_rec.last_update_login);
Line: 277

   dbms_sql.bind_variable(p_update_cursor, ':program_application_id',
                          p_batch_rec.program_application_id);
Line: 279

   dbms_sql.bind_variable(p_update_cursor, ':program_id',
                          p_batch_rec.program_id);
Line: 281

   dbms_sql.bind_variable(p_update_cursor, ':program_update_date',
                          p_batch_rec.program_update_date);
Line: 283

   dbms_sql.bind_variable(p_update_cursor, ':set_of_books_id',
                          p_batch_rec.set_of_books_id);
Line: 285

   dbms_sql.bind_variable(p_update_cursor, ':name',
                          p_batch_rec.name);
Line: 287

   dbms_sql.bind_variable(p_update_cursor, ':batch_source_id',
                          p_batch_rec.batch_source_id);
Line: 289

   dbms_sql.bind_variable(p_update_cursor, ':batch_date',
                          p_batch_rec.batch_date);
Line: 291

   dbms_sql.bind_variable(p_update_cursor, ':gl_date',
                          p_batch_rec.gl_date);
Line: 293

   dbms_sql.bind_variable(p_update_cursor, ':status',
                          p_batch_rec.status);
Line: 295

   dbms_sql.bind_variable(p_update_cursor, ':type',
                          p_batch_rec.type);
Line: 297

   dbms_sql.bind_variable(p_update_cursor, ':control_count',
                          p_batch_rec.control_count);
Line: 299

   dbms_sql.bind_variable(p_update_cursor, ':control_amount',
                          p_batch_rec.control_amount);
Line: 301

   dbms_sql.bind_variable(p_update_cursor, ':comments',
                          p_batch_rec.comments);
Line: 303

   dbms_sql.bind_variable(p_update_cursor, ':currency_code',
                          p_batch_rec.currency_code);
Line: 305

   dbms_sql.bind_variable(p_update_cursor, ':exchange_rate_type',
                          p_batch_rec.exchange_rate_type);
Line: 307

   dbms_sql.bind_variable(p_update_cursor, ':exchange_date',
                          p_batch_rec.exchange_date);
Line: 309

   dbms_sql.bind_variable(p_update_cursor, ':exchange_rate',
                          p_batch_rec.exchange_rate);
Line: 311

   dbms_sql.bind_variable(p_update_cursor, ':purged_children_flag',
                          p_batch_rec.purged_children_flag);
Line: 313

   dbms_sql.bind_variable(p_update_cursor, ':attribute_category',
                          p_batch_rec.attribute_category);
Line: 315

   dbms_sql.bind_variable(p_update_cursor, ':attribute1',
                          p_batch_rec.attribute1);
Line: 317

   dbms_sql.bind_variable(p_update_cursor, ':attribute2',
                          p_batch_rec.attribute2);
Line: 319

   dbms_sql.bind_variable(p_update_cursor, ':attribute3',
                          p_batch_rec.attribute3);
Line: 321

   dbms_sql.bind_variable(p_update_cursor, ':attribute4',
                          p_batch_rec.attribute4);
Line: 323

   dbms_sql.bind_variable(p_update_cursor, ':attribute5',
                          p_batch_rec.attribute5);
Line: 325

   dbms_sql.bind_variable(p_update_cursor, ':attribute6',
                          p_batch_rec.attribute6);
Line: 327

   dbms_sql.bind_variable(p_update_cursor, ':attribute7',
                          p_batch_rec.attribute7);
Line: 329

   dbms_sql.bind_variable(p_update_cursor, ':attribute8',
                          p_batch_rec.attribute8);
Line: 331

   dbms_sql.bind_variable(p_update_cursor, ':attribute9',
                          p_batch_rec.attribute9);
Line: 333

   dbms_sql.bind_variable(p_update_cursor, ':attribute10',
                          p_batch_rec.attribute10);
Line: 335

   dbms_sql.bind_variable(p_update_cursor, ':attribute11',
                          p_batch_rec.attribute11);
Line: 337

   dbms_sql.bind_variable(p_update_cursor, ':attribute12',
                          p_batch_rec.attribute12);
Line: 339

   dbms_sql.bind_variable(p_update_cursor, ':attribute13',
                          p_batch_rec.attribute13);
Line: 341

   dbms_sql.bind_variable(p_update_cursor, ':attribute14',
                          p_batch_rec.attribute14);
Line: 343

   dbms_sql.bind_variable(p_update_cursor, ':attribute15',
                          p_batch_rec.attribute15);
Line: 346

   dbms_sql.bind_variable(p_update_cursor, ':issue_date',
                          p_batch_rec.issue_date);
Line: 348

   dbms_sql.bind_variable(p_update_cursor, ':maturity_date',
                          p_batch_rec.maturity_date);
Line: 350

   dbms_sql.bind_variable(p_update_cursor, ':special_instructions',
                          p_batch_rec.special_instructions);
Line: 352

   dbms_sql.bind_variable(p_update_cursor, ':batch_process_status',
                          p_batch_rec.batch_process_status);
Line: 354

   dbms_sql.bind_variable(p_update_cursor, ':selection_criteria_id',
                          p_batch_rec.selection_criteria_id);
Line: 356

   dbms_sql.bind_variable(p_update_cursor, ':request_id',
                          p_batch_rec.request_id);
Line: 371

 |    construct_batch_update_stmt 					     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    Copies the text of the dynamic SQL update statement into the           |
 |    out NOCOPY paramater. The update statement does not contain a where clause    |
 |    since this is the dynamic part that is added later.                    |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    None.                                                  |
 |              OUT:                                                         |
 |                    update_text  - text of the update statement            |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |    This statement only updates columns in the batch record that do not    |
 |    contain the dummy values that indicate that they should not be changed.|
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 | 20-MAR-2000  J Rautiainen    Added BR project related columns             |
 |                              ISSUE_DATE, MATURITY_DATE,                   |
 |                              SPECIAL_INSTRUCTIONS, BATCH_PROCESS_STATUS   |
 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added column 		     |
 |					      purged_children_flag and	     |
 |					      request_id 		     |
 | 				      	      into the table handlers. 	     |
 |                                                                           |
 +===========================================================================*/

PROCEDURE construct_batch_update_stmt( update_text OUT NOCOPY varchar2) IS

BEGIN
   arp_util.debug('arp_tbat_pkg.construct_batch_update_stmt()+');
Line: 414

   update_text :=
 'update ra_batches
   SET    batch_id =
               DECODE(:batch_id,
                      :ar_number_dummy, batch_id,
                                       :batch_id),
          last_update_date =
               DECODE(:last_update_date,
                      :ar_date_dummy, sysdate,
                                     :last_update_date),
          last_updated_by =
               DECODE(:last_updated_by,
                      :ar_number_dummy, :pg_user_id,
                                       :last_updated_by),
          creation_date =
               DECODE(:creation_date,
                      :ar_date_dummy, creation_date,
                                     :creation_date),
          created_by =
               DECODE(:created_by,
                      :ar_number_dummy, created_by,
                                       :created_by),
          last_update_login =
               DECODE(:last_update_login,
                      :ar_number_dummy, nvl(:pg_conc_login_id,
                                            :pg_login_id),
                                       :last_update_login),
          program_application_id =
               DECODE(:program_application_id,
                      :ar_number_dummy, program_application_id,
                                       :program_application_id),
          program_id =
               DECODE(:program_id,
                      :ar_number_dummy, program_id,
                                     :program_id),
          program_update_date =
               DECODE(:program_update_date,
                      :ar_date_dummy, program_update_date,
                                     :program_update_date),
          set_of_books_id =
               DECODE(:set_of_books_id,
                      :ar_number_dummy, set_of_books_id,
                                       :set_of_books_id),
          name =
               DECODE(:name,
                      :ar_text_dummy, name,
                                     :name),
          batch_source_id =
               DECODE(:batch_source_id,
                      :ar_number_dummy, batch_source_id,
                                       :batch_source_id),
          batch_date =
               DECODE(:batch_date,
                      :ar_date_dummy, batch_date,
                                     :batch_date),
          gl_date =
               DECODE(:gl_date,
                      :ar_date_dummy, gl_date,
                                     :gl_date),
          status =
               DECODE(:status,
                      :ar_text_dummy, status,
                                     :status),
          type =
               DECODE(:type,
                      :ar_text_dummy, type,
                                     :type),
          control_count =
               DECODE(:control_count,
                      :ar_number_dummy, control_count,
                                       :control_count),
          control_amount =
               DECODE(:control_amount,
                      :ar_number_dummy, control_amount,
                                       :control_amount),
          comments =
                DECODE(:comments,
                       :ar_text_dummy, comments,
                                      :comments),
          currency_code =
                DECODE(:currency_code,
                       :ar_text_dummy, currency_code,
                                      :currency_code),
          exchange_rate_type =
                DECODE(:exchange_rate_type,
                       :ar_text_dummy, exchange_rate_type,
                                      :exchange_rate_type),
          exchange_date =
                DECODE(:exchange_date,
                       :ar_date_dummy, exchange_date,
                                      :exchange_date),
          exchange_rate =
                DECODE(:exchange_rate,
                       :ar_number_dummy, exchange_rate,
                                        :exchange_rate),
          purged_children_flag =
                DECODE(:purged_children_flag,
                       :ar_flag_dummy, purged_children_flag,
                                        :purged_children_flag),
          attribute_category =
                DECODE(:attribute_category,
                       :ar_text_dummy, attribute_category,
                                      :attribute_category),
          attribute1 =
                DECODE(:attribute1,
                       :ar_text_dummy, attribute1,
                                      :attribute1),
          attribute2 =
                DECODE(:attribute2,
                       :ar_text_dummy, attribute2,
                                      :attribute2),
          attribute3 =
                DECODE(:attribute3,
                       :ar_text_dummy, attribute3,
                                      :attribute3),
          attribute4 =
                DECODE(:attribute4,
                       :ar_text_dummy, attribute4,
                                      :attribute4),
          attribute5 =
                DECODE(:attribute5,
                       :ar_text_dummy, attribute5,
                                      :attribute5),
          attribute6 =
                DECODE(:attribute6,
                       :ar_text_dummy, attribute6,
                                      :attribute6),
          attribute7 =
                DECODE(:attribute7,
                       :ar_text_dummy, attribute7,
                                      :attribute7),
          attribute8 =
                DECODE(:attribute8,
                       :ar_text_dummy, attribute8,
                                      :attribute8),
          attribute9 =
                DECODE(:attribute9,
                       :ar_text_dummy, attribute9,
                                      :attribute9),
          attribute10 =
                 DECODE(:attribute10,
                       :ar_text_dummy, attribute10,
                                      :attribute10),
          attribute11 =
                 DECODE(:attribute11,
                       :ar_text_dummy, attribute11,
                                      :attribute11),
          attribute12 =
                 DECODE(:attribute12,
                       :ar_text_dummy, attribute12,
                                      :attribute12),
          attribute13 =
                 DECODE(:attribute13,
                       :ar_text_dummy, attribute13,
                                      :attribute13),
          attribute14 =
                 DECODE(:attribute14,
                       :ar_text_dummy, attribute14,
                                      :attribute14),
          attribute15 =
                 DECODE(:attribute15,
                       :ar_text_dummy, attribute15,
                                      :attribute15),
          issue_date =
                 DECODE(:issue_date,
                       :ar_date_dummy, issue_date,
                                      :issue_date),
          maturity_date =
                 DECODE(:maturity_date,
                       :ar_date_dummy, maturity_date,
                                      :maturity_date),
          special_instructions =
                 DECODE(:special_instructions,
                       :ar_text_dummy, special_instructions,
                                      :special_instructions),
          batch_process_status =
                 DECODE(:batch_process_status,
                       :ar_text_dummy, batch_process_status,
                                      :batch_process_status),
          selection_criteria_id =
                 DECODE(:selection_criteria_id,
                       :ar_number_dummy, selection_criteria_id,
                                         :selection_criteria_id),
          request_id =
                DECODE(:request_id,
                       :ar_number_dummy, request_id,
                                        :request_id) ';
Line: 602

   arp_util.debug('arp_tbat_pkg.construct_batch_update_stmt()-');
Line: 606

      arp_util.debug('EXCEPTION:  arp_tbat_pkg.construct_batch_update_stmt()');
Line: 613

 |    generic_update                                                         |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure Updates records in ra_batches identified by the where   |
 |    clause that is passed in as a parameter. Only those columns in         |
 |    the batch record parameter that do not contain the special dummy values|
 |    are updated.                                                           |
 |                                                                           |
 | SCOPE - PRIVATE                                                           |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |    dbms_sql.open_cursor 						     |
 |    dbms_sql.parse							     |
 |    dbms_sql.execute							     |
 |    dbms_sql.close_cursor						     |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |		      p_update_cursor  - identifies the cursor to use 	     |
 |                    p_where_clause - identifies which rows to update       |
 | 		      p_where1         - value to bind into where clause     |
 |		      p_batch_rec    - contains the new batch values         |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

PROCEDURE generic_update(p_update_cursor IN OUT NOCOPY integer,
                         p_where_clause  IN     varchar2,
			 p_where1        IN     number,
                         p_batch_rec     IN     ra_batches%rowtype) IS

   l_count             number;
Line: 653

   l_update_statement  varchar2(10000);
Line: 658

   arp_util.debug('arp_tbat_pkg.generic_update()+');
Line: 661

   |  If this update statement has not already been parsed, 	  |
   |  construct the statement and parse it.			  |
   |  Otherwise, use the already parsed statement and rebind its  |
   |  variables.						  |
   +--------------------------------------------------------------*/

   IF (p_update_cursor is null)
   THEN

         p_update_cursor := dbms_sql.open_cursor;
Line: 673

          |  Construct the update statement |
          +---------------------------------*/

         arp_tbat_pkg.construct_batch_update_stmt(l_update_statement);
Line: 678

         l_update_statement := l_update_statement || p_where_clause;
Line: 681

         l_update_statement := l_update_statement ||
             ' RETURNING batch_id INTO :ra_batch_key_value ';
Line: 689

         dbms_sql.parse(p_update_cursor,
                        l_update_statement,
                        dbms_sql.v7);
Line: 696

           dbms_sql.bind_array(p_update_cursor,':ra_batch_key_value',
                               ra_batch_array);
Line: 702

   arp_tbat_pkg.bind_batch_variables(p_update_cursor, p_batch_rec);
Line: 708

   dbms_sql.bind_variable(p_update_cursor, ':where_1',
                          p_where1);
Line: 711

   l_count := dbms_sql.execute(p_update_cursor);
Line: 713

   arp_util.debug( to_char(l_count) || ' rows updated');
Line: 719

    dbms_sql.variable_value( p_update_cursor, ':ra_batch_key_value',
                             ra_batch_array);
Line: 724

    |  Raise the NO_DATA_FOUND exception if no rows were updated |
    +------------------------------------------------------------*/

   IF    (l_count = 0)
   THEN  RAISE NO_DATA_FOUND;
Line: 734

        | call mrc engine to update RA_MC_BATCHES     |
        +---------------------------------------------*/
--       ar_mrc_engine.maintain_mrc_data(
--                        p_event_mode       => 'UPDATE',
--                        p_table_name       => 'RA_BATCHES',
--                        p_mode             => 'SINGLE',
--                        p_key_value        => ra_batch_array(I));
Line: 744

   arp_util.debug('arp_tbat_pkg.generic_update()-');
Line: 748

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.generic_update()');
Line: 749

        arp_util.debug(l_update_statement);
Line: 789

 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added column 		     |
 |					      purged_children_flag and	     |
 |					      request_id 		     |
 | 				      	      into the table handlers. 	     |
 |                                                                           |
 +===========================================================================*/

PROCEDURE set_to_dummy( p_batch_rec OUT NOCOPY ra_batches%rowtype) IS

BEGIN

    arp_util.debug('arp_tbat_pkg.set_to_dummy()+');
Line: 805

    p_batch_rec.last_update_date 	:= AR_DATE_DUMMY;
Line: 806

    p_batch_rec.last_updated_by 	:= AR_NUMBER_DUMMY;
Line: 809

    p_batch_rec.last_update_login 	:= AR_NUMBER_DUMMY;
Line: 812

    p_batch_rec.program_update_date 	:= AR_DATE_DUMMY;
Line: 848

    p_batch_rec.selection_criteria_id   := AR_NUMBER_DUMMY;
Line: 893

    SELECT *
    INTO   p_batch_rec
    FROM   ra_batches
    WHERE  batch_id = p_batch_id;
Line: 940

    SELECT        batch_id
    INTO          l_batch_id
    FROM          ra_batches
    WHERE         batch_id = p_batch_id
    FOR UPDATE OF batch_id NOWAIT;
Line: 988

    SELECT *
    INTO   p_batch_rec
    FROM   ra_batches
    WHERE batch_id = p_batch_id
    FOR UPDATE OF batch_id NOWAIT;
Line: 1009

 |    were first selected in the form.					     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_id	- identifies the row to lock	     |
 | 		      p_batch_rec	- batch record for comparison	     |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 | 20-MAR-2000  J Rautiainen    Added BR project related columns             |
 |                              ISSUE_DATE, MATURITY_DATE,                   |
 |                              SPECIAL_INSTRUCTIONS, BATCH_PROCESS_STATUS   |
 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added columns 		     |
 |					      purged_children_flag and       |
 |					      request_id     		     |
 | 				      	      into the table handlers.       |
 |                                                                           |
 |                                                                           |
 +===========================================================================*/

PROCEDURE lock_compare_p( p_batch_rec IN ra_batches%rowtype,
                          p_batch_id  IN ra_batches.batch_id%type ) IS

    l_new_batch_rec  ra_batches%rowtype;
Line: 1050

    SELECT        *
    INTO          l_new_batch_rec
    FROM          ra_batches tbat
    WHERE         tbat.batch_id = p_batch_id
    AND NOT
       (
           NVL(tbat.name, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.name,
                        AR_TEXT_DUMMY, tbat.name,
                                         p_batch_rec.name),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.batch_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.batch_id,
                        AR_NUMBER_DUMMY, tbat.batch_id,
                                         p_batch_rec.batch_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.last_update_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.last_update_date,
                        AR_DATE_DUMMY, tbat.last_update_date,
                                         p_batch_rec.last_update_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.last_updated_by, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.last_updated_by,
                        AR_NUMBER_DUMMY, tbat.last_updated_by,
                                         p_batch_rec.last_updated_by),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.creation_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.creation_date,
                        AR_DATE_DUMMY, tbat.creation_date,
                                         p_batch_rec.creation_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.created_by, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.created_by,
                        AR_NUMBER_DUMMY, tbat.created_by,
                                         p_batch_rec.created_by),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.last_update_login, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.last_update_login,
                        AR_NUMBER_DUMMY, tbat.last_update_login,
                                         p_batch_rec.last_update_login),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.program_application_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.program_application_id,
                        AR_NUMBER_DUMMY, tbat.program_application_id,
                                         p_batch_rec.program_application_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.program_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.program_id,
                        AR_NUMBER_DUMMY, tbat.program_id,
                                         p_batch_rec.program_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.program_update_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.program_update_date,
                        AR_DATE_DUMMY, tbat.program_update_date,
                                         p_batch_rec.program_update_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.set_of_books_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.set_of_books_id,
                        AR_NUMBER_DUMMY, tbat.set_of_books_id,
                                         p_batch_rec.set_of_books_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.batch_source_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.batch_source_id,
                        AR_NUMBER_DUMMY, tbat.batch_source_id,
                                         p_batch_rec.batch_source_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(trunc(tbat.batch_date), AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.batch_date,
                        AR_DATE_DUMMY, trunc(tbat.batch_date),
                                         p_batch_rec.batch_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(trunc(tbat.gl_date), AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.gl_date,
                        AR_DATE_DUMMY, trunc(tbat.gl_date),
                                         p_batch_rec.gl_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.status, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.status,
                        AR_TEXT_DUMMY, tbat.status,
                                         p_batch_rec.status),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.type, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.type,
                        AR_TEXT_DUMMY, tbat.type,
                                         p_batch_rec.type),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.control_count, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.control_count,
                        AR_NUMBER_DUMMY, tbat.control_count,
                                         p_batch_rec.control_count),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.control_amount, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.control_amount,
                        AR_NUMBER_DUMMY, tbat.control_amount,
                                         p_batch_rec.control_amount),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.comments, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.comments,
                        AR_TEXT_DUMMY, tbat.comments,
                                         p_batch_rec.comments),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.currency_code, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.currency_code,
                        AR_TEXT_DUMMY, tbat.currency_code,
                                         p_batch_rec.currency_code),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.exchange_rate_type, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.exchange_rate_type,
                        AR_TEXT_DUMMY, tbat.exchange_rate_type,
                                         p_batch_rec.exchange_rate_type),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.exchange_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.exchange_date,
                        AR_DATE_DUMMY, tbat.exchange_date,
                                         p_batch_rec.exchange_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.exchange_rate, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.exchange_rate,
                        AR_NUMBER_DUMMY, tbat.exchange_rate,
                                         p_batch_rec.exchange_rate),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.purged_children_flag, AR_FLAG_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.purged_children_flag,
                        AR_FLAG_DUMMY, tbat.purged_children_flag,
                                         p_batch_rec.purged_children_flag),
                 AR_FLAG_DUMMY
              )
         OR
           NVL(tbat.attribute_category, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute_category,
                        AR_TEXT_DUMMY, tbat.attribute_category,
                                         p_batch_rec.attribute_category),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute1, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute1,
                        AR_TEXT_DUMMY, tbat.attribute1,
                                         p_batch_rec.attribute1),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute2, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute2,
                        AR_TEXT_DUMMY, tbat.attribute2,
                                         p_batch_rec.attribute2),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute3, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute3,
                        AR_TEXT_DUMMY, tbat.attribute3,
                                         p_batch_rec.attribute3),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute4, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute4,
                        AR_TEXT_DUMMY, tbat.attribute4,
                                         p_batch_rec.attribute4),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute5, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute5,
                        AR_TEXT_DUMMY, tbat.attribute5,
                                         p_batch_rec.attribute5),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute6, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute6,
                        AR_TEXT_DUMMY, tbat.attribute6,
                                         p_batch_rec.attribute6),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute7, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute7,
                        AR_TEXT_DUMMY, tbat.attribute7,
                                         p_batch_rec.attribute7),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute8, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute8,
                        AR_TEXT_DUMMY, tbat.attribute8,
                                         p_batch_rec.attribute8),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute9, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute9,
                        AR_TEXT_DUMMY, tbat.attribute9,
                                         p_batch_rec.attribute9),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute10, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute10,
                        AR_TEXT_DUMMY, tbat.attribute10,
                                         p_batch_rec.attribute10),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute11, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute11,
                        AR_TEXT_DUMMY, tbat.attribute11,
                                         p_batch_rec.attribute11),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute12, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute12,
                        AR_TEXT_DUMMY, tbat.attribute12,
                                         p_batch_rec.attribute12),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute13, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute13,
                        AR_TEXT_DUMMY, tbat.attribute13,
                                         p_batch_rec.attribute13),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute14, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute14,
                        AR_TEXT_DUMMY, tbat.attribute14,
                                         p_batch_rec.attribute14),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.attribute15, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.attribute15,
                        AR_TEXT_DUMMY, tbat.attribute15,
                                         p_batch_rec.attribute15),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.issue_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.issue_date,
                        AR_DATE_DUMMY, tbat.issue_date,
                                       p_batch_rec.issue_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.maturity_date, AR_DATE_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.maturity_date,
                        AR_DATE_DUMMY, tbat.maturity_date,
                                       p_batch_rec.maturity_date),
                 AR_DATE_DUMMY
              )
         OR
           NVL(tbat.special_instructions, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.special_instructions,
                        AR_TEXT_DUMMY, tbat.special_instructions,
                                       p_batch_rec.special_instructions),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.batch_process_status, AR_TEXT_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.batch_process_status,
                        AR_TEXT_DUMMY, tbat.batch_process_status,
                                       p_batch_rec.batch_process_status),
                 AR_TEXT_DUMMY
              )
         OR
           NVL(tbat.selection_criteria_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.selection_criteria_id,
                        AR_NUMBER_DUMMY, tbat.selection_criteria_id,
                                       p_batch_rec.selection_criteria_id),
                 AR_NUMBER_DUMMY
              )
         OR
           NVL(tbat.request_id, AR_NUMBER_DUMMY) <>
           NVL(
                 DECODE(p_batch_rec.request_id,
                        AR_NUMBER_DUMMY, tbat.request_id,
                                         p_batch_rec.request_id),
                 AR_NUMBER_DUMMY
              )
       )
    FOR UPDATE OF batch_id NOWAIT;
Line: 1603

 |    delete_p								     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure deletes the ra_batches row identified by the p_batch_id |
 |    parameter.							     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_id	- identifies the row to delete	     |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

procedure delete_p( p_batch_id  IN ra_batches.batch_id%type) IS

   l_count  number;
Line: 1634

   arp_util.debug('arp_tbat_pkg.delete_p()+');
Line: 1638

  |  The procedure only deletes batches that do not 	|
  |  contain any transactions 				|
  +-----------------------------------------------------*/

   SELECT count(*)
   INTO   l_count
   FROM   ra_customer_trx
   WHERE  batch_id = p_batch_id;
Line: 1649

          delete FROM ra_batches
          where       batch_id = p_batch_id;
Line: 1667

   arp_util.debug('arp_tbat_pkg.delete_p()-');
Line: 1671

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.delete_p()');
Line: 1678

 |    delete_f_bs_id							     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure deletes the ra_batches rows identified by the           |
 |    p_batch_source_id parameter.					     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_source_id	- identifies the rows to delete	     |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

procedure delete_f_bs_id( p_batch_source_id IN
                             ra_batches.batch_source_id%type) IS

   l_count  number;
Line: 1710

   arp_util.debug('arp_tbat_pkg.delete_f_bs_id()+');
Line: 1714

  |  The procedure only deletes batches that do not 	|
  |  contain any transactions 				|
  +-----------------------------------------------------*/

   SELECT count(*)
   INTO   l_count
   FROM   ra_customer_trx
   WHERE  batch_source_id = p_batch_source_id;
Line: 1725

          DELETE FROM ra_batches
          WHERE       batch_id = p_batch_source_id;
Line: 1743

   arp_util.debug('arp_tbat_pkg.delete_f_bs_id()-');
Line: 1748

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.delete_f_bs_id()');
Line: 1755

 |    update_p								     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure updates the ra_batches row identified by the p_batch_id |
 |    parameter.							     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_id	- identifies the row to update	     |
 |                    p_batch_rec       - contains the new column values     |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |     set_to_dummy must be called before the values in p_batch_rec are      |
 |     changed and this function is called.				     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

PROCEDURE update_p( p_batch_rec IN ra_batches%rowtype,
                    p_batch_id  IN ra_batches.batch_id%type) IS


BEGIN

   arp_util.debug('arp_tbat_pkg.update_p()+');
Line: 1791

   arp_tbat_pkg.generic_update( pg_cursor1,
                                ' WHERE batch_id = :where_1',
                                p_batch_id,
                                p_batch_rec);
Line: 1796

   arp_util.debug('arp_tbat_pkg.update_p()-');
Line: 1801

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.update_p()');
Line: 1807

 |    update_f_bs_id							     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure updates the ra_batches rows that are contained in a     |
 |    particular batch source.						     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug                                                         |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_source_id	- identifies the rows to delete	     |
 |                    p_batch_rec       - contains the new column values     |
 |              OUT:                                                         |
 |                    None						     |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |     set_to_dummy must be called before the values in p_batch_rec are      |
 |     changed and this function is called.				     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 +===========================================================================*/

PROCEDURE update_f_bs_id( p_batch_rec IN ra_batches%rowtype,
                          p_batch_source_id
                                IN ra_batch_sources.batch_source_id%type) IS


BEGIN

   arp_util.debug('arp_tbat_pkg.update_f_bs_id()+');
Line: 1844

   arp_tbat_pkg.generic_update( pg_cursor2,
                                ' WHERE batch_source_id = :where_1',
                                p_batch_source_id,
                                p_batch_rec);
Line: 1849

   arp_util.debug('arp_tbat_pkg.update_f_bs_id()-');
Line: 1854

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.update_f_bs_id()');
Line: 1860

 |    insert_p								     |
 |                                                                           |
 | DESCRIPTION                                                               |
 |    This procedure inserts a row into ra_batches that contains the column  |
 |    values specified in the p_batch_rec parameter. 			     |
 |                                                                           |
 | SCOPE - PUBLIC                                                            |
 |                                                                           |
 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
 |    arp_util.debug   							     |
 |    arp_global.set_of_books_id					     |
 |                                                                           |
 | ARGUMENTS  : IN:                                                          |
 |                    p_batch_rec       - contains the new column values     |
 |              OUT:                                                         |
 |                    p_batch_id	- unique ID of the new row           |
 |                                                                           |
 | RETURNS    : NONE                                                         |
 |                                                                           |
 | NOTES                                                                     |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |     06-JUN-95  Charlie Tomberg     Created                                |
 |                                                                           |
 | 20-MAR-2000  J Rautiainen    Added BR project related columns             |
 |                              ISSUE_DATE, MATURITY_DATE,                   |
 |                              SPECIAL_INSTRUCTIONS, BATCH_PROCESS_STATUS   |
 |                              and SELECTION_CRITERIA_ID into table handlers|
 |                                                                           |
 | 31-OCT-2000 Y Rakotonirainy  Bug 1243304 : Added column 		     |
 |					      purged_children_flag and	     |
 |					      request_id 		     |
 | 				      	      into the table handlers. 	     |
 |                                                                           |
 +===========================================================================*/

PROCEDURE insert_p(
                    p_batch_rec  IN  ra_batches%rowtype,
                    p_batch_id   OUT NOCOPY ra_batches.batch_id%type,
                    p_name       OUT NOCOPY ra_batches.name%type
                  ) IS


    l_batch_id    ra_batches.batch_id%type;
Line: 1909

    arp_util.debug('arp_tbat_pkg.insert_p()+');
Line: 1917

    SELECT RA_BATCHES_S.NEXTVAL
    INTO   l_batch_id
    FROM   DUAL;
Line: 1927

         SELECT        to_char(last_batch_num + 1)
         INTO          l_batch_name
         FROM          ra_batch_sources
         WHERE         batch_source_id = p_batch_rec.batch_source_id
         AND           auto_batch_numbering_flag = 'Y'
         FOR UPDATE OF last_batch_num NOWAIT;
Line: 1934

         UPDATE ra_batch_sources
         SET    last_batch_num = l_batch_name
         WHERE  batch_source_id = p_batch_rec.batch_source_id;
Line: 1944

     | Insert the record |
     *-------------------*/

   INSERT INTO ra_batches
               (
                 batch_id,
                 last_update_date,
                 last_updated_by,
                 creation_date,
                 created_by,
                 last_update_login,
                 program_application_id,
                 program_id,
                 program_update_date,
                 set_of_books_id,
                 name,
                 batch_source_id,
                 batch_date,
                 gl_date,
                 status,
                 type,
                 control_count,
                 control_amount,
                 comments,
                 currency_code,
                 exchange_rate_type,
                 exchange_date,
                 exchange_rate,
                 purged_children_flag,
                 attribute_category,
                 attribute1,
                 attribute2,
                 attribute3,
                 attribute4,
                 attribute5,
                 attribute6,
                 attribute7,
                 attribute8,
                 attribute9,
                 attribute10,
                 attribute11,
                 attribute12,
                 attribute13,
                 attribute14,
                 attribute15,
                 issue_date,
                 maturity_date,
                 special_instructions,
                 batch_process_status,
                 selection_criteria_id,
                 request_id
                 ,org_id
               )
             VALUES
               (
                 l_batch_id,			/* batch_id */
                 sysdate,			/* last_update_date */
                 pg_user_id,			/* last_updated_by */
                 sysdate,			/* creation_date */
                 pg_user_id,			/* created_by */
                 nvl(pg_conc_login_id,
                     pg_login_id),		/* last_update_login */
                 pg_prog_appl_id,		/* program_application_id */
                 pg_conc_program_id,		/* program_id */
                 sysdate,			/* program_update_date */
                 arp_global.set_of_books_id,	/* set_of_books_id */
                 l_batch_name,			/* name */
                 p_batch_rec.batch_source_id,	/* batch_source_id */
                 p_batch_rec.batch_date,	/* batch_date */
                 p_batch_rec.gl_date,		/* gl_date */
                 p_batch_rec.status,		/* status */
                 p_batch_rec.type,		/* type */
                 p_batch_rec.control_count,	/* control_count */
                 p_batch_rec.control_amount,	/* control_amount */
                 p_batch_rec.comments,		/* comments */
                 p_batch_rec.currency_code,	/* currency_code */
                 p_batch_rec.exchange_rate_type, /* exchange_rate_type */
                 p_batch_rec.exchange_date,	/* exchange_date */
                 p_batch_rec.exchange_rate,	/* exchange_rate */
                 p_batch_rec.purged_children_flag,/*purged_children_flag*/
                 p_batch_rec.attribute_category, /* attribute_category */
                 p_batch_rec.attribute1,	/* attribute1 */
                 p_batch_rec.attribute2,	/* attribute2 */
                 p_batch_rec.attribute3,	/* attribute3 */
                 p_batch_rec.attribute4,	/* attribute4 */
                 p_batch_rec.attribute5,	/* attribute5 */
                 p_batch_rec.attribute6,	/* attribute6 */
                 p_batch_rec.attribute7,	/* attribute7 */
                 p_batch_rec.attribute8,	/* attribute8 */
                 p_batch_rec.attribute9,	/* attribute9 */
                 p_batch_rec.attribute10,	/* attribute10 */
                 p_batch_rec.attribute11,	/* attribute11 */
                 p_batch_rec.attribute12,	/* attribute12 */
                 p_batch_rec.attribute13,	/* attribute13 */
                 p_batch_rec.attribute14,	/* attribute14 */
                 p_batch_rec.attribute15,	/* attribute15 */
                 p_batch_rec.issue_date,
                 p_batch_rec.maturity_date,
                 p_batch_rec.special_instructions,
                 p_batch_rec.batch_process_status,
                 p_batch_rec.selection_criteria_id,
                 p_batch_rec.request_id		/*request_id*/
                 ,arp_standard.sysparm.org_id /* SSA changes anuj */
               );
Line: 2062

   arp_util.debug('arp_tbat_pkg.insert_p()-');
Line: 2066

        arp_util.debug('EXCEPTION:  arp_tbat_pkg.insert_p()');