DBA Data[Home] [Help]

APPS.CN_COLLECTION_AR_GEN SQL Statements

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

Line: 19

  PROCEDURE insert_trx (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code		IN OUT NOCOPY	cn_utils.code_type,
	x_org_id IN NUMBER) IS

    x_module_type		cn_modules.module_type%TYPE;
Line: 37

      SELECT LOWER(destcol.name) dest_column,
             cm.expression expression
	 FROM cn_table_maps tm,
           cn_column_maps cm,
	      cn_objects destcol
      WHERE tm.mapping_type = 'INV1'
            AND cm.table_map_id = tm.table_map_id
	       AND cm.expression IS NOT NULL
	       AND cm.destination_column_id = destcol.object_id
	       AND lower(destcol.NAME) <> 'sold_to_customer_id'
	       -- Added Last Where Clause For Bug Fix 3681852 Hithanki
	       -- Added for MOAC by Ashley
	       AND tm.org_id = x_org_id
	       AND cm.org_id = tm.org_id
	       AND destcol.org_id = cm.org_id
      ORDER BY destcol.name;
Line: 59

    cn_utils.appendcr(code, '--******** INSERT CN_TRX ********-- ');
Line: 62

    cn_debug.print_msg('insert_trx>>', 1);
Line: 63

    fnd_file.put_line(fnd_file.Log, 'insert_trx>>');
Line: 65

    SELECT module_type	--AE 11-16-95
    INTO x_module_type
    FROM cn_modules
    WHERE module_id = x_module_id
	--Added for MOAC by Ashley
	AND org_id = x_org_id;
Line: 72

    cn_debug.print_msg('insert_trx: x_module_id = ' || x_module_id, 1);
Line: 75

    cn_debug.print_msg('insert_trx: Generating INSERT statement. ', 1);
Line: 76

    fnd_file.put_line(fnd_file.Log, 'insert_trx: Generating INSERT statement. ');
Line: 79

    cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Inserting into CN_TRX.'');');
Line: 80

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Inserting into CN_TRX.'');');
Line: 82

    cn_utils.appindcr(code, 'INSERT INTO cn_trx(');
Line: 129

    cn_utils.appindcr(code, 'SELECT');
Line: 213

      cn_utils.appindcr(code, '      SELECT trx_id');
Line: 235

      cn_utils.appindcr(code, '      SELECT trx_id');
Line: 258

    cn_utils.appindcr(code, 'INSERT INTO cn_trx(');
Line: 287

    cn_utils.appindcr(code, 'SELECT');
Line: 321

    cn_utils.appindcr(code, '      SELECT trx_id');
Line: 342

    cn_debug.print_msg('insert_trx: Generated INSERT statement.', 1);
Line: 343

    fnd_file.put_line(fnd_file.Log, 'insert_trx: Generated INSERT statement.');
Line: 346

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserted '' || trx_count || '' records into cn_trx.'');');
Line: 347

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || procedure_name || ': Inserted '' || trx_count || '' records into cn_trx.'');');
Line: 353

    cn_utils.appindcr(code, 'UPDATE cn_not_trx cnt');
Line: 362

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated collected_flag in cn_not_trx.'');');
Line: 363

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || procedure_name || ': Updated collected_flag in cn_not_trx.'');');
Line: 367

    cn_debug.print_msg('insert_trx<<', 1);
Line: 368

    fnd_file.put_line(fnd_file.Log, 'insert_trx<<');
Line: 372

      cn_debug.print_msg('insert_trx: in exception handler for NO_DATA_FOUND', 1);
Line: 373

      fnd_file.put_line(fnd_file.Log, 'insert_trx: in exception handler for NO_DATA_FOUND');
Line: 375

  END insert_trx;
Line: 386

  PROCEDURE update_trx (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code		IN OUT NOCOPY	cn_utils.code_type,
	x_org_id IN NUMBER) IS



    CURSOR header_direct_maps IS
      SELECT LOWER(destcol.name) dest_column,
             cm.expression expression
	 FROM cn_table_maps tm,
           cn_column_maps cm,
	      cn_objects destcol
      WHERE tm.mapping_type = 'INV1'
            AND cm.table_map_id = tm.table_map_id
	       AND cm.expression IS NOT NULL
	       AND cm.destination_column_id = destcol.object_id
	       -- Added for MOAC by Ashley
	       AND tm.org_id = x_org_id
	       AND cm.org_id = tm.org_id
	       AND destcol.org_id = cm.org_id
      ORDER BY destcol.name;
Line: 416

    cn_utils.appendcr(code, '--******** UPDATE CN_TRX ********-- ');
Line: 419

    cn_debug.print_msg('update_trx>>', 1);
Line: 420

    fnd_file.put_line(fnd_file.Log, 'update_trx>>');
Line: 425

    cn_debug.print_msg('update_trx: x_module_id = ' || x_module_id, 1);
Line: 429

    cn_debug.print_msg('update_trx: Generating UPDATE statement. ', 1);
Line: 430

    fnd_file.put_line(fnd_file.Log, 'update_trx: Generating UPDATE statement. ');
Line: 443

      cn_utils.appindcr(code, 'UPDATE cn_trx ct');
Line: 445

      cn_utils.appindcr(code, '       SELECT rctt.type');
Line: 457

      cn_utils.appindcr(code, 'UPDATE cn_trx ct');
Line: 466

      cn_utils.appindcr(code, 'UPDATE cn_trx ct');
Line: 468

      cn_utils.appindcr(code, '        SELECT rct.trx_date');
Line: 488

      cn_utils.appindcr(code, 'UPDATE cn_trx ct');
Line: 502

      cn_utils.appindcr(code, 'SELECT');
Line: 534

    cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT;');
Line: 536

    cn_debug.print_msg('update_trx: Generated UPDATE statement.', 1);
Line: 537

    fnd_file.put_line(fnd_file.Log, 'update_trx: Generated UPDATE statement.');
Line: 539

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated '' || trx_update_count || '' cn_trx.'');');
Line: 540

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || procedure_name || ': Updated '' || trx_update_count || '' cn_trx.'');');
Line: 543

    cn_debug.print_msg('update_trx<<', 1);
Line: 544

    fnd_file.put_line(fnd_file.Log, 'update_trx<<');
Line: 547

      cn_debug.print_msg('update_trx: in exception handler for NO_DATA_FOUND', 1);
Line: 548

      fnd_file.put_line(fnd_file.Log, 'update_trx: in exception handler for NO_DATA_FOUND');
Line: 550

  END update_trx;
Line: 560

  PROCEDURE insert_lines (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code	IN OUT NOCOPY		cn_utils.code_type,
	x_org_id IN NUMBER) IS


    -- Declare cursor for inserting into the trx lines table
    CURSOR lines_direct_maps IS
      SELECT LOWER(destcol.name) dest_column,
             cm.expression expression
	 FROM cn_table_maps tm,
           cn_column_maps cm,
	      cn_objects destcol
      WHERE tm.mapping_type = 'INV2'
            AND cm.table_map_id = tm.table_map_id
	       AND cm.expression IS NOT NULL
	       AND cm.destination_column_id = destcol.object_id
	       -- Added for MOAC by Ashley
	       AND tm.org_id = x_org_id
	       AND cm.org_id = tm.org_id
	       AND destcol.org_id = cm.org_id
      ORDER BY destcol.name;
Line: 589

    cn_utils.appendcr(code, '--******** INSERT CN_TRX_LINES *********-- ');
Line: 591

    cn_debug.print_msg('insert_lines>>', 1);
Line: 592

    fnd_file.put_line(fnd_file.Log, 'insert_lines>>');
Line: 593

    cn_debug.print_msg('insert_lines: x_module_id = ' || x_module_id, 1);
Line: 596

    cn_debug.print_msg('insert_lines: Generating INSERT statement.', 1);
Line: 597

    fnd_file.put_line(fnd_file.Log, 'insert_lines: Generating INSERT statement.');
Line: 601

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserting into CN_TRX_LINES .'');');
Line: 602

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || procedure_name || ': Inserting into CN_TRX_LINES .'');');
Line: 605

    cn_utils.appindcr(code, 'INSERT INTO cn_trx_lines(');
Line: 626

    cn_utils.appindcr(code, 'SELECT');
Line: 663

    cn_debug.print_msg('insert_lines: Generated INSERT statement.', 1);
Line: 664

    fnd_file.put_line(fnd_file.Log, 'insert_lines: Generated INSERT statement.');
Line: 665

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserted '' || trx_line_count || '' records into cn_trx_lines.'');');
Line: 666

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || procedure_name || ': Inserted '' || trx_line_count || '' records into cn_trx_lines.'');');
Line: 669

    cn_debug.print_msg('insert_lines<<', 1);
Line: 670

    fnd_file.put_line(fnd_file.Log, 'insert_lines<<');
Line: 673

      cn_debug.print_msg('insert_lines: in exception handler for NO_DATA_FOUND', 1);
Line: 674

      fnd_file.put_line(fnd_file.Log, 'insert_lines: in exception handler for NO_DATA_FOUND');
Line: 676

  END insert_lines;
Line: 687

  PROCEDURE update_lines (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code	IN OUT NOCOPY	cn_utils.code_type,
	x_org_id IN NUMBER) IS


  BEGIN
    l_org_id := x_org_id;
Line: 699

    cn_utils.appendcr(code, '--******** UPDATE CN_TRX_LINES ********-- ');
Line: 701

    cn_debug.print_msg('update_lines>>', 1);
Line: 702

    fnd_file.put_line(fnd_file.Log, 'update_lines>>');
Line: 703

    cn_debug.print_msg('update_lines: x_module_id = ' || x_module_id, 1);
Line: 707

    cn_debug.print_msg('update_lines: Generating UPDATE statement.', 1);
Line: 708

    fnd_file.put_line(fnd_file.Log, 'update_lines: Generating UPDATE statement.');
Line: 717

      cn_utils.appindcr(code, 'UPDATE cn_trx_lines ctl');
Line: 721

	 cn_utils.appindcr(code, '  SELECT ');
Line: 742

      cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT;');
Line: 743

      cn_debug.print_msg('update_lines: Generated UPDATE statement.', 1);
Line: 744

      fnd_file.put_line(fnd_file.Log, 'update_lines: Generated UPDATE statement.');
Line: 745

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated '' || trx_line_update_count || '' cn_trx_lines.'');');
Line: 746

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Updated '' || trx_line_update_count || '' cn_trx_lines.'');');
Line: 749

    cn_debug.print_msg('update_lines<<', 1);
Line: 750

    fnd_file.put_line(fnd_file.Log, 'update_lines<<');
Line: 753

      cn_debug.print_msg('update_lines: in exception handler for NO_DATA_FOUND', 1);
Line: 754

      fnd_file.put_line(fnd_file.Log, 'update_lines: in exception handler for NO_DATA_FOUND');
Line: 756

  END update_lines;
Line: 767

  PROCEDURE insert_sales_lines (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code	IN OUT NOCOPY		cn_utils.code_type,
	x_org_id IN NUMBER) IS


    -- Declare cursor for inserting into the sales_lines table
    CURSOR sales_lines_direct_maps IS
      SELECT LOWER(destcol.name) dest_column,
             cm.expression expression
	 FROM cn_table_maps tm,
           cn_column_maps cm,
	      cn_objects destcol
      WHERE tm.mapping_type = 'INV3'
            AND cm.table_map_id = tm.table_map_id
	        AND cm.expression IS NOT NULL
	        AND cm.destination_column_id = destcol.object_id
	       -- Added for MOAC by Ashley
	        AND tm.org_id = x_org_id
	        AND cm.org_id = tm.org_id
	        AND destcol.org_id = cm.org_id

            AND destcol.name <> 'QUANTITY'         -- Fix bug 2809039
      ORDER BY destcol.name;
Line: 798

    cn_utils.appendcr(code, '--******** INSERT CN_TRX_SALES_LINES ********-- ');
Line: 800

    cn_debug.print_msg('insert_sales_lines>>', 1);
Line: 801

    fnd_file.put_line(fnd_file.Log, 'insert_sales_lines>>');
Line: 806

    cn_debug.print_msg('insert_sales_lines: x_module_id = ' || x_module_id, 1);
Line: 807

    cn_debug.print_msg('insert_sales_lines: Updating object dependencies and module object maps.', 1);
Line: 808

    fnd_file.put_line(fnd_file.Log, 'insert_sales_lines: Updating object dependencies and module object maps.');
Line: 811

    cn_debug.print_msg('insert_sales_lines: Generating INSERT statement.', 1);
Line: 812

    fnd_file.put_line(fnd_file.Log, 'insert_sales_lines: Generating INSERT statement.');
Line: 815

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserting into CN_TRX_SALES_LINES .'');');
Line: 816

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Inserting into CN_TRX_SALES_LINES .'');');
Line: 819

    cn_utils.appindcr(code, 'INSERT INTO cn_trx_sales_lines (');
Line: 834

       cn_utils.appindcr(code, 'last_updated_by,');
Line: 835

       cn_utils.appindcr(code, 'last_update_date,');
Line: 836

       cn_utils.appindcr(code, 'last_update_login,');
Line: 851

    cn_utils.appindcr(code, 'SELECT');
Line: 867

       cn_utils.appindcr(code, 'x_last_updated_by,');
Line: 868

       cn_utils.appindcr(code, 'x_last_update_date,');
Line: 869

       cn_utils.appindcr(code, 'x_last_update_login,');
Line: 916

        cn_utils.appindcr(code, '        (SELECT 1 ');
Line: 946

	cn_utils.appindcr(code, '      (select 1');
Line: 972

       cn_utils.appindcr(code, '  (SELECT 1');
Line: 984

    cn_debug.print_msg('insert_sales_lines: Generated INSERT statement.', 1);
Line: 985

    fnd_file.put_line(fnd_file.Log, 'insert_sales_lines: Generated INSERT statement.');
Line: 986

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserted '' || trx_sales_line_count || '' records into cn_trx_sales_lines.'');');
Line: 987

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Inserted '' || trx_sales_line_count || '' records into cn_trx_sales_lines.'');');
Line: 990

    cn_debug.print_msg('insert_sales_lines<<', 1);
Line: 991

    fnd_file.put_line(fnd_file.Log, 'insert_sales_lines<<');
Line: 994

        cn_utils.appindcr(code, 'UPDATE cn_trx_lines');
Line: 1004

        cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated collected_flag in cn_trx_lines.'');');
Line: 1005

        cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Updated collected_flag in cn_trx_lines.'');');
Line: 1010

      cn_debug.print_msg('insert_sales_lines: in exception handler for NO_DATA_FOUND', 1);
Line: 1011

      fnd_file.put_line(fnd_file.Log, 'insert_sales_lines: in exception handler for NO_DATA_FOUND');
Line: 1013

  END insert_sales_lines;
Line: 1024

  PROCEDURE update_sales_lines (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code	IN OUT NOCOPY		cn_utils.code_type,
	x_org_id IN NUMBER) IS



  BEGIN
  	l_org_id := x_org_id;
Line: 1037

    cn_utils.appendcr(code, '--******** UPDATE CN_TRX_SALES_LINES ********-- ');
Line: 1039

    cn_debug.print_msg('update_sales_lines>>', 1);
Line: 1040

    fnd_file.put_line(fnd_file.Log, 'update_sales_lines>>');
Line: 1041

    cn_debug.print_msg('update_sales_lines: x_module_id = ' || x_module_id, 1);
Line: 1043

    cn_debug.print_msg('update_sales_lines: Generating UPDATE statement.', 1);
Line: 1044

    fnd_file.put_line(fnd_file.Log, 'update_sales_lines: Generating UPDATE statement.');
Line: 1052

    cn_utils.appindcr(code, 'UPDATE cn_trx_sales_lines ctsl');
Line: 1061

      cn_utils.appindcr(code, '  SELECT ');
Line: 1074

    cn_utils.appindcr(code, '  SELECT ct.processed_date, ct.rollup_date');
Line: 1083

    cn_utils.appindcr(code, '  SELECT cp.period_id');
Line: 1094

    cn_utils.appindcr(code, '  SELECT cp.period_id');
Line: 1117

	 cn_utils.appindcr(code, 'UPDATE cn_trx_sales_lines ctsl');
Line: 1132

    cn_utils.appindcr(code, 'trx_sales_line_update_count := SQL%ROWCOUNT;');
Line: 1133

    cn_debug.print_msg('update_sales_lines: Generated UPDATE statement.', 1);
Line: 1134

    fnd_file.put_line(fnd_file.Log, 'update_sales_lines: Generated UPDATE statement.');
Line: 1135

    cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated '' || trx_sales_line_update_count || '' records in cn_trx_sales_lines.'');');
Line: 1136

    cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Updated '' || trx_sales_line_update_count || '' records in cn_trx_sales_lines.'');');
Line: 1139

    cn_debug.print_msg('update_sales_lines<<', 1);
Line: 1140

    fnd_file.put_line(fnd_file.Log, 'update_sales_lines<<');
Line: 1143

      cn_debug.print_msg('update_sales_lines: in exception handler for NO_DATA_FOUND', 1);
Line: 1144

      fnd_file.put_line(fnd_file.Log, 'update_sales_lines: in exception handler for NO_DATA_FOUND');
Line: 1146

  END update_sales_lines;
Line: 1157

  PROCEDURE update_invoice_total (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	code	IN OUT NOCOPY		cn_utils.code_type,
	x_org_id IN NUMBER) IS


  BEGIN
  	l_org_id := x_org_id;
Line: 1167

    cn_utils.appendcr(code, '--******** UPDATE INVOICE TOTAL ********-- ');
Line: 1172

      cn_debug.print_msg('update_invoice_total: Generating UPDATE statement.', 1);
Line: 1173

      fnd_file.put_line(fnd_file.Log, 'update_invoice_total: Generating UPDATE statement.');
Line: 1178

      cn_utils.appindcr(code, '-- This could not be done when we updated cn_trx earlier ');
Line: 1181

      cn_utils.appindcr(code, 'UPDATE cn_trx ct');
Line: 1183

      cn_utils.appindcr(code, '         SELECT SUM(ctl.extended_amount)');
Line: 1194

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Updated cn_trx invoice_total.'');');
Line: 1195

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Updated cn_trx invoice_total.'');');
Line: 1197

      cn_debug.print_msg('update_invoice_total: Generated UPDATE statement.', 1);
Line: 1198

      fnd_file.put_line(fnd_file.Log, 'update_invoice_total: Generated UPDATE statement.');
Line: 1200

  END update_invoice_total;
Line: 1210

  PROCEDURE insert_comm_lines (
	procedure_name		cn_obj_procedures_v.name%TYPE,
	x_module_id		cn_modules.module_id%TYPE,
	x_event_id		cn_events.event_id%TYPE,
	code	IN OUT NOCOPY		cn_utils.code_type,
	x_org_id IN NUMBER) IS

    x_row_count NUMBER := 0;
Line: 1229

      SELECT LOWER(destcol.name) dest_column,
	        ccm.expression
	 FROM cn_column_maps ccm,
		 cn_table_maps tm,
	      cn_objects destcol
      WHERE tm.mapping_type = 'AR'
		  AND ccm.table_map_id = tm.table_map_id
		  AND (ccm.column_map_id > 0     -- New mappings to Attribute columns
			  OR ccm.modified = 'Y')    -- User has modified a seeded mapping
	       AND ccm.expression IS NOT NULL
	       AND ccm.calc_ext_table_id IS NULL  -- Not a foreign-key indirect mapping
	       AND ccm.update_clause IS NULL      -- Not a free-form indirect mapping
	       AND destcol.object_id = ccm.destination_column_id
	       AND destcol.table_id = -1008       -- cn_comm_lines_api (exclude any old mappings to cn_trx etc.)
	       -- Added for MOAC by Ashley
	        AND tm.org_id = x_org_id
	        AND ccm.org_id = tm.org_id
	        AND destcol.org_id = ccm.org_id
      ORDER BY destcol.name;
Line: 1253

    cn_utils.appendcr(code, '--******** INSERT CN_COMM_LINES_API ********-- ');
Line: 1255

    cn_debug.print_msg('insert_comm_lines_api>>', 1);
Line: 1256

    fnd_file.put_line(fnd_file.Log, 'insert_comm_lines_api>>');
Line: 1260

      cn_debug.print_msg('insert_sales_lines: Generating INSERT statement.', 1);
Line: 1261

      fnd_file.put_line(fnd_file.Log, 'insert_sales_lines: Generating INSERT statement.');
Line: 1264

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserting into CN_COMM_LINES_API .'');');
Line: 1265

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Inserting into CN_COMM_LINES_API .'');');
Line: 1267

      cn_utils.appindcr(code, 'INSERT INTO  cn_comm_lines_api (');
Line: 1303

      cn_utils.appindcr(code, 'last_updated_by,');
Line: 1304

      cn_utils.appindcr(code, 'last_update_date,');
Line: 1305

      cn_utils.appindcr(code, 'last_update_login,');
Line: 1317

          cn_utils.appindcr(code, 'SELECT /*+ ordered index(CTSL CN_TRX_SALES_LINES_N3) index(CTL CN_TRX_LINES_N4) */');
Line: 1319

         cn_utils.appindcr(code, 'SELECT /*+ ordered index(CTSL CN_TRX_SALES_LINES_N2) index(CTL CN_TRX_LINES_N3) */');
Line: 1358

      cn_utils.appindcr(code, 'x_last_updated_by,');
Line: 1359

      cn_utils.appindcr(code, 'x_last_update_date,');
Line: 1360

      cn_utils.appindcr(code, 'x_last_update_login,');
Line: 1403

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': Inserted '' || comm_lines_api_count || '' records into CN_COMM_LINES_API.'');');
Line: 1404

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': Inserted '' || comm_lines_api_count || '' records into CN_COMM_LINES_API.'');');
Line: 1412

      cn_utils.appindcr(code, '--*** Update columns populated by user-defined DIRECT mappings');
Line: 1427

	     SELECT LOWER(NVL(alias,name)) INTO x_cnt_alias
		 	FROM cn_obj_tables_v
			WHERE name = 'CN_NOT_TRX' AND org_id = x_org_id; --Added for MOAC by Ashley
Line: 1431

		 SELECT LOWER(NVL(alias,name)) INTO x_rct_alias
		 	FROM cn_obj_tables_v
		 	WHERE name = 'RA_CUSTOMER_TRX' AND org_id = x_org_id; --Added for MOAC by Ashley
Line: 1435

	     SELECT LOWER(NVL(alias,name)) INTO x_rctl_alias
		 	FROM cn_obj_tables_v
		 	WHERE name = 'RA_CUSTOMER_TRX_LINES' AND org_id = x_org_id; --Added for MOAC by Ashley
Line: 1439

	     SELECT LOWER(NVL(alias,name)) INTO x_rctls_alias
		 	FROM cn_obj_tables_v
		 	WHERE name = 'RA_CUST_TRX_LINE_SALESREPS' AND org_id = x_org_id; --Added for MOAC by Ashley
Line: 1443

          cn_utils.appindcr(code, 'UPDATE cn_comm_lines_api api');
Line: 1455

	     cn_utils.appindcr(code, 'SELECT');
Line: 1485

          cn_utils.appindcr(code, 'comm_lines_api_update_count := SQL%ROWCOUNT;');
Line: 1487

          cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || procedure_name || ': For user DIRECT mappings, updated '' || comm_lines_api_update_count || '' records in CN_COMM_LINES_API.'');');
Line: 1488

          cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || procedure_name || ': For user DIRECT mappings, updated '' || comm_lines_api_update_count || '' records in CN_COMM_LINES_API.'');');
Line: 1494

      cn_debug.print_msg('insert_comm_lines: in exception handler for NO_DATA_FOUND', 1);
Line: 1495

      fnd_file.put_line(fnd_file.Log, 'insert_comm_lines: in exception handler for NO_DATA_FOUND');
Line: 1497

  END insert_comm_lines;