DBA Data[Home] [Help]

APPS.CN_COLLECTION_GEN SQL Statements

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

Line: 60

    SELECT cs.line_no, cs.text
      FROM cn_source cs
     WHERE cs.object_id = p_object_id
       AND substr(cs.text, 1, 25) = 'CREATE OR REPLACE PACKAGE'
    AND 	org_id = x_org_id
     ORDER BY line_no;
Line: 71

    SELECT cs.line_no, cs.text
      FROM cn_source cs
     WHERE cs.object_id = p_object_id
	AND 	cs.text LIKE 'END%'
	AND 	org_id = x_org_id
     ORDER BY line_no DESC;
Line: 83

    SELECT cs.text
      FROM cn_source cs
     WHERE cs.object_id = p_pks_object_id
	AND 	cs.line_no BETWEEN p_pks_start AND (p_pks_end - 1)
	AND  	org_id = x_org_id
     ORDER BY line_no;
Line: 142

	 SELECT	user
	 INTO	l_applsys_schema
	 FROM	dual;
Line: 152

		  insert_newlines        => 'FALSE',
		  comp_error             => x_comp_error);
Line: 277

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

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

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

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

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

    cn_utils.appindcr(code, 'trx_update_count        NUMBER := 0;');
Line: 549

    cn_utils.appindcr(code, 'trx_line_update_count   NUMBER := 0;');
Line: 550

    cn_utils.appindcr(code, 'trx_sales_line_update_count  NUMBER := 0;');
Line: 552

    cn_utils.appindcr(code, 'comm_lines_api_update_count  NUMBER := 0;');
Line: 568

    cn_utils.appindcr(code, 'x_last_updated_by       NUMBER  := to_number(fnd_global.user_id);');
Line: 569

    cn_utils.appindcr(code, 'x_last_update_date      DATE    := sysdate;');
Line: 570

    cn_utils.appindcr(code, 'x_last_update_login     NUMBER  := to_number(fnd_global.login_id);');
Line: 576

    cn_utils.appindcr(code, '  SELECT DISTINCT adj_batch_id');
Line: 601

    cn_utils.appindcr(code, 'trx_update_count        NUMBER := 0;'); --JC 02-13-97
Line: 602

    cn_utils.appindcr(code, 'trx_line_update_count   NUMBER := 0;');
Line: 603

    cn_utils.appindcr(code, 'trx_sales_line_update_count  NUMBER := 0;');
Line: 605

    cn_utils.appindcr(code, 'comm_lines_api_update_count  NUMBER := 0;');
Line: 621

    cn_utils.appindcr(code, 'x_last_updated_by       NUMBER  := to_number(fnd_global.user_id);');
Line: 622

    cn_utils.appindcr(code, 'x_last_update_date      DATE    := sysdate;');
Line: 623

    cn_utils.appindcr(code, 'x_last_update_login     NUMBER  := to_number(fnd_global.login_id);');
Line: 634

         cn_utils.appindcr(code, '  SELECT DISTINCT batch_id');
Line: 638

      	 cn_utils.appindcr(code, '   AND trunc(processed_date) >= (select start_date from cn_periods where period_name =  x_start_period_name) ' );
Line: 639

         cn_utils.appindcr(code, '   AND trunc(processed_date) <= (select end_date from cn_periods where period_name =  x_end_period_name) ' );
Line: 643

         cn_utils.appindcr(code, '  SELECT DISTINCT batch_id');
Line: 720

    cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
Line: 817

      cn_collection_custom_gen.insert_cn_not_trx (
                             x_table_map_id => x_table_map_id,
                             x_event_id     => x_event_id,
                             code           => body_code,
                             X_ORG_ID       => X_ORG_ID);
Line: 918

        cn_collection_custom_gen.insert_comm_lines_api (x_table_map_id, x_event_id, code,X_org_id);
Line: 923

        cn_collection_oe_gen.insert_comm_lines_api
                  (x_table_map_id, x_package_id, x_procedure_name, x_module_id,
		         x_repository_id, x_event_id, code,X_org_id);
Line: 931

			          p_location_name => 'Pre-Api-Update',
			          code            => code,
                      X_ORG_ID       => X_ORG_ID);
Line: 938

      cn_collection_custom_gen.update_comm_lines_api (x_table_map_id, code,X_org_id, x_event_id, x_generic);
Line: 967

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

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
Line: 969

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
Line: 971

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

      cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
Line: 982

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

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
Line: 984

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
Line: 986

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

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

      cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
Line: 997

      cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
Line: 1005

      cn_collection_ar_gen.insert_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1014

      cn_collection_ar_gen.update_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1017

      cn_collection_ar_gen.insert_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1020

      cn_collection_ar_gen.update_invoice_total(x_procedure_name, code,l_org_id);
Line: 1023

      cn_collection_ar_gen.update_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1029

      cn_collection_ar_gen.insert_sales_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1032

      cn_collection_ar_gen.update_sales_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1035

      cn_collection_ar_gen.insert_comm_lines (x_procedure_name, x_module_id, x_event_id, code,X_org_id);
Line: 1040

			          p_location_name => 'Pre-Api-Update',
			          code            => code,
                      X_ORG_ID       => X_ORG_ID);
Line: 1046

      cn_collection_custom_gen.update_comm_lines_api (x_table_map_id, code,X_org_id, x_event_id, x_generic);
Line: 1506

    SELECT mapping_type, module_id
    INTO   l_mapping_type, l_module_id
    FROM cn_table_maps
    WHERE  table_map_id = x_table_map_id
    AND    org_id = X_ORG_ID;
Line: 1521

        (SELECT module_id, module_type, collect_flag FROM cn_modules
         WHERE module_type IN ('INV','CBK','PMT','WO','RAM') AND org_id = x_org_id)
      LOOP
        IF rec.module_type = 'INV' THEN
          l_package_name := 'cn_collect_invoices';
Line: 1567

	 SELECT OBJ.name OBJECT_NAME
	 INTO   l_package_name
	 FROM   cn_table_map_objects tmov, cn_objects obj
	 WHERE  tmov.table_map_id = x_table_map_id
	        AND tmov.tm_object_type = 'PKS'
	        and tmov.org_id = obj.org_id
	        and tmov.object_id = obj.object_id
			AND tmov.org_id = X_org_id;
Line: 1580

	  --dbms_output.put_line(' After Select '||l_package_name);
Line: 1652

    SELECT mapping_type, module_id
    INTO   l_mapping_type, l_module_id
    FROM   cn_table_maps
    WHERE  table_map_id = p_table_map_id
    AND    org_id = X_org_id;
Line: 1678

      (SELECT
         UPPER(OBJ.name) NAME ,
         MAX(DECODE(tmov.tm_object_type,'PKS',tmov.object_id,NULL)) spec_id,
         MAX(DECODE(tmov.tm_object_type,'PKB',tmov.object_id,NULL)) body_id
       FROM cn_table_map_objects tmov, cn_objects obj
       WHERE tmov.tm_object_type IN ('PKS','PKB')
       and obj.object_id = tmov.object_id
       and tmov.org_id = obj.org_id
             AND tmov.table_map_id = p_table_map_id
             AND tmov.org_id = X_org_id
       GROUP BY OBJ.name)
    LOOP
      --+
      -- Create the Spec and Body.
      --+
	 install_package_object(
			    p_object_id   => rec.spec_id,
			    p_object_name => rec.name||l_org_append,
			    p_test => p_test,
			    x_comp_error  => l_comp_error,
                x_org_id => X_org_id);
Line: 1736

        (SELECT
           DISTINCT UPPER(OBJ.name) NAME
         FROM cn_table_map_objects tmov, cn_objects obj
         WHERE tm_object_type IN ('PKS','PKB')
               AND tmov.table_map_id = p_table_map_id
               and tmov.object_id = obj.object_id
               and tmov.org_id = obj.org_id
               AND tmov.org_id = X_org_id
         GROUP BY OBJ.name)
      LOOP  <>
        FOR err_rec IN
          (SELECT
           '*** '||TYPE||' '||LOWER(NAME)||' LINE: '||line||'/'||position||
		   fnd_global.local_chr(10)||text||fnd_global.local_chr(10) outstr
           FROM user_errors WHERE NAME = obj_rec.name||l_org_append||l_test_append)
        LOOP  <>
          -- If there is enough space, append this error to the end of the
	     -- Errbuf, otherwise aappend as mauch as possible and then quit
	     -- the loop.
	     IF LENGTHB(x_errbuf) + LENGTHB(err_rec.outstr) <= l_max_len THEN
	       x_errbuf := x_errbuf || err_rec.outstr;
Line: 1769

      cn_modules_pkg.update_row(x_module_id     => l_module_id,
		                      x_module_status => 'GENERATED',
                              x_org_id => X_org_id);
Line: 1773

        (SELECT
           DISTINCT UPPER(OBJ.name) NAME
         FROM cn_table_map_objects tmov, cn_objects obj
         WHERE tm_object_type IN ('PKS','PKB')
               AND tmov.table_map_id = p_table_map_id
               and tmov.object_id = obj.object_id
               and tmov.org_id = obj.org_id
               AND tmov.org_id = X_org_id
         GROUP BY OBJ.name)
      LOOP

      IF(p_table_map_id < 0)
      THEN
        l_pkg_name := pkg_names.NAME||l_org_append;
Line: 1817

        (SELECT
           DISTINCT UPPER(OBJ.name) NAME
         FROM cn_table_map_objects tmov, cn_objects obj
         WHERE tm_object_type IN ('PKS','PKB')
               AND tmov.table_map_id = p_table_map_id
               and tmov.object_id = obj.object_id
               and tmov.org_id = obj.org_id
               AND tmov.org_id = X_org_id
         GROUP BY OBJ.name)
      LOOP

      IF(p_table_map_id < 0)
      THEN
        l_pkg_name := pkg_names.NAME||l_org_append;
Line: 1875

	SELECT tm.table_map_id,
	       tm.org_id,
	       tm.module_id,
	       mo.module_status
	FROM   cn_table_maps_all tm,
	       cn_modules_all_b mo
	WHERE  tm.module_id = mo.module_id
    AND    tm.org_id = mo.org_id
    AND    mo.module_status = 'GENERATED'
    AND    mo.org_id = nvl(p_org_id, mo.org_id)
    AND    mo.org_id <> -3113
	ORDER BY tm.table_map_id, tm.org_id, tm.module_id;
Line: 1889

     SELECT object_name || ' ' ||
     decode(object_type, 'PACKAGE BODY','compile body','PACKAGE','compile') stmt
     FROM user_objects
     WHERE object_name LIKE 'CN_COLLECT%'
     AND substr(object_name, (INSTR(object_name,'_',1,3)+1), 1)IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
     AND object_type LIKE 'PACKAGE%'
     AND status = 'INVALID';
Line: 1899

     SELECT object_name stmt
     FROM user_objects
     WHERE object_name LIKE 'CN_COLLECT%'
     AND substr(object_name, (INSTR(object_name,'_',1,3)+1), 1)IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
     AND object_type LIKE 'PACKAGE%'
     AND status = 'INVALID';