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: 275

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      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: 887

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

        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: 900

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

      cn_collection_custom_gen.update_comm_lines_api (x_table_map_id, code,X_org_id);
Line: 936

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

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

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

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

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

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

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

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

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

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

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

      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: 974

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

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

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

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

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

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

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

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

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

      cn_collection_custom_gen.update_comm_lines_api (x_table_map_id, code,X_org_id);
Line: 1449

    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: 1464

        (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: 1508

	 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: 1521

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

    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: 1613

      (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: 1671

        (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: 1704

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

        (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: 1752

        (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: 1810

	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: 1824

     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: 1834

     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';