DBA Data[Home] [Help]

APPS.GCS_CONS_ENGINE_PKG SQL Statements

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

Line: 45

    SELECT epb_table_name
    INTO   l_table_name
    FROM   gcs_system_options;
Line: 90

     	SELECT	gcr.child_entity_id,
     		gcr.cons_relationship_id,
     		geca_child.currency_code		child_currency_code,
     		geca_parent.currency_code		parent_currency_code,
     		fea.dim_attribute_varchar_member	entity_type_code
     	FROM    gcs_cons_relationships gcr,
     		fem_entities_attr      fea,
     		gcs_entity_cons_attrs  geca_child,
     		gcs_entity_cons_attrs  geca_parent
     	WHERE   gcr.hierarchy_id		=	p_hierarchy_id
     	AND     gcr.parent_entity_id		=	p_entity_id
     	AND     geca_child.hierarchy_id		=	p_hierarchy_id
     	AND	geca_child.entity_id		=	gcr.child_entity_id
 	AND	gcr.dominant_parent_flag	=	'Y'
     	AND	geca_parent.hierarchy_id	=	p_hierarchy_id
     	AND	geca_parent.entity_id		=	gcr.parent_entity_id
     	AND	p_cal_period_end_date		BETWEEN	gcr.start_date and NVL(end_date,to_date(p_cal_period_end_date,'DD-MM-RR'))
     	AND     gcr.child_entity_id		=	fea.entity_id
     	AND     fea.attribute_id		=	g_entity_type_attr
        AND	fea.version_id			=	g_entity_type_version
     	AND     fea.dim_attribute_varchar_member	IN	('O','X','C');
Line: 115

        SELECT  gcr.child_entity_id,
                gcr.cons_relationship_id,
                geca_child.currency_code                child_currency_code,
                geca_parent.currency_code               parent_currency_code
        FROM    gcs_cons_relationships gcr,
                gcs_entity_cons_attrs  geca_child,
                gcs_entity_cons_attrs  geca_parent,
		fem_entities_attr      fea
        WHERE   gcr.hierarchy_id                =       p_hierarchy_id
        AND     gcr.parent_entity_id            =       p_entity_id
        AND     geca_child.hierarchy_id         =       p_hierarchy_id
        AND     geca_child.entity_id            =       gcr.child_entity_id
        AND     gcr.dominant_parent_flag        =       'Y'
        AND     geca_parent.hierarchy_id        =       p_hierarchy_id
        AND     geca_parent.entity_id           =       gcr.parent_entity_id
	AND	gcr.child_entity_id		=	fea.entity_id
	AND	fea.attribute_id		=	g_entity_type_attr
	AND	fea.version_id			=	g_entity_type_version
	AND	fea.dim_attribute_varchar_member	IN	('O','X')
        AND     p_cal_period_end_date           BETWEEN gcr.start_date and NVL(end_date,to_date(p_cal_period_end_date,'DD-MM-RR'));
Line: 154

    	gcs_cons_eng_run_dtls_pkg.insert_row(p_run_name			=>	cons_entity_wf_info.run_identifier,
    					     p_consolidation_entity_id	=>	cons_entity_wf_info.consolidation_entity,
    					     p_category_code		=>	'DATAPREPARATION',
    					     p_child_entity_id		=>	v_immediate_children.child_entity_id,
    					     p_entry_id			=>	NULL,
    					     p_stat_entry_id		=>	null,
    					     p_cons_relationship_id	=>	v_immediate_children.cons_relationship_id,
    					     p_run_detail_id		=>	l_run_detail_id,
    					     p_request_error_code	=>	'NOT_STARTED',
    					     p_bp_request_error_code	=>	'NOT_STARTED');
Line: 166

          gcs_cons_eng_run_dtls_pkg.insert_row(p_run_name                 =>      cons_entity_wf_info.run_identifier,
                                               p_consolidation_entity_id  =>      cons_entity_wf_info.consolidation_entity,
                                               p_category_code            =>      'TRANSLATION',
                                               p_child_entity_id          =>      v_immediate_children.child_entity_id,
                                               p_entry_id                 =>      NULL,
                                               p_stat_entry_id            =>      null,
                                               p_cons_relationship_id     =>      v_immediate_children.cons_relationship_id,
                                               p_run_detail_id            =>      l_run_detail_id,
                                               p_request_error_code       =>      l_xlate_request_error_code,
                                               p_bp_request_error_code    =>      l_xlate_request_error_code);
Line: 191

           gcs_cons_eng_run_dtls_pkg.insert_row(p_run_name                 =>      cons_entity_wf_info.run_identifier,
                                                p_consolidation_entity_id  =>      cons_entity_wf_info.consolidation_entity,
                                                p_category_code            =>      'DATAPREPARATION',
                                                p_child_entity_id          =>      v_oper_entity.child_entity_id,
                                                p_cons_relationship_id     =>      v_oper_entity.cons_relationship_id,
                                                p_run_detail_id            =>      l_run_detail_id,
                                                p_request_error_code       =>      'NOT_STARTED',
                                                p_bp_request_error_code    =>      'NOT_STARTED');
Line: 201

             gcs_cons_eng_run_dtls_pkg.insert_row(p_run_name                 =>      cons_entity_wf_info.run_identifier,
                                                  p_consolidation_entity_id  =>      cons_entity_wf_info.consolidation_entity,
                                                  p_category_code            =>      'TRANSLATION',
                                                  p_child_entity_id          =>      v_oper_entity.child_entity_id,
                                                  p_cons_relationship_id     =>      v_oper_entity.cons_relationship_id,
                                                  p_run_detail_id            =>      l_run_detail_id,
                                                  p_request_error_code       =>      l_xlate_request_error_code,
                                                  p_bp_request_error_code    =>      l_xlate_request_error_code);
Line: 243

     	SELECT	gcerd.child_entity_id,
     		gcerd.cons_relationship_id,
     		gcerd.run_detail_id,
     		fev.entity_name,
		DECODE(geca_parent.currency_code, geca_child.currency_code, 'N', 'Y') translation_required
     	FROM    gcs_cons_eng_run_dtls  	gcerd,
     		fem_entities_attr	fea,
     		fem_entities_vl		fev,
		gcs_entity_cons_attrs	geca_parent,
		gcs_entity_cons_attrs	geca_child,
		gcs_cons_eng_runs	gcer
     	WHERE   gcerd.run_name			=	p_run_name
     	AND	gcerd.consolidation_entity_id	=	p_cons_entity_id
     	AND     gcerd.entry_id			IS NULL
     	AND	gcerd.category_code 		=	'DATAPREPARATION'
     	AND	gcerd.child_entity_id		=	fev.entity_id
     	AND     gcerd.child_entity_id		=	fea.entity_id
     	AND     fea.attribute_id		=	g_entity_type_attr
        AND	fea.version_id			=	g_entity_type_version
     	AND     fea.dim_attribute_varchar_member	IN	('O','X')
	AND	geca_parent.entity_id		=	p_cons_entity_id
	AND	geca_child.entity_id		=	fev.entity_id
	AND	geca_parent.hierarchy_id	=	geca_child.hierarchy_id
	AND	gcer.hierarchy_id		=	geca_child.hierarchy_id
	AND	gcer.run_name			=	gcerd.run_name
	ANd	gcer.run_entity_id		=	gcerd.consolidation_entity_id;
Line: 368

     SELECT entry_id, stat_entry_id
     INTO   l_entry_id, l_stat_entry_id
     FROM   gcs_cons_eng_run_dtls
     WHERE  run_detail_id	=	oper_entity_wf_info.run_detail_id;
Line: 374

     gcs_interco_dynamic_pkg.insert_interco_trx(    p_entry_id		=>	l_entry_id,
	 				            p_stat_entry_id	=>	NVL(l_stat_entry_id, -1),
						    p_hierarchy_id	=>	l_parameter_list.hierarchy_id,
						    p_period_end_date	=>	cons_entity_wf_info.cal_period_end_date,
						    x_errbuf		=>	l_parameter_list.errbuf,
						    x_retcode		=>	l_parameter_list.retcode);
Line: 394

       SELECT gcia.entry_id,
	      gcia.stat_entry_id
       INTO   l_entry_id,
	      l_stat_entry_id
       FROM   gcs_cons_impact_analyses gcia,
	      gcs_entry_headers	       geh,
	      gcs_data_sub_dtls	       gdsd
       WHERE  gcia.run_name			=	cons_entity_wf_info.prior_run_identifier
       AND    gcia.consolidation_entity_id	=	cons_entity_wf_info.consolidation_entity
       AND    gcia.child_entity_id		=	oper_entity_wf_info.operating_entity
       AND    gdsd.load_id			=	gcia.load_id
       AND    gdsd.most_recent_flag		=	'Y'
       AND    gcia.message_name			IN	('GCS_PRISTINE_DATA_INC_LOAD','GCS_PRISTINE_DATA_FULL_LOAD')
       AND    gcia.entry_id			=	geh.entry_id
       AND    geh.disabled_flag			=	'N';
Line: 412

       gcs_interco_dynamic_pkg.insert_interco_trx(    p_entry_id          =>      l_entry_id,
                                                      p_stat_entry_id     =>      NVL(l_stat_entry_id, -1),
                                                      p_hierarchy_id      =>      l_parameter_list.hierarchy_id,
                                                      p_period_end_date   =>      cons_entity_wf_info.cal_period_end_date,
                                                      x_errbuf            =>      l_parameter_list.errbuf,
                                                      x_retcode           =>      l_parameter_list.retcode);
Line: 419

       gcs_cons_eng_run_dtls_pkg.update_entry_headers_async(	p_run_detail_id			=>	oper_entity_wf_info.run_detail_id,
       								p_entry_id			=>	l_entry_id,
       								p_stat_entry_id			=>	l_stat_entry_id,
       								p_request_error_code		=>	'COMPLETED',
								p_bp_request_error_code		=>	'COMPLETED');
Line: 473

         SELECT   DECODE(gcerd.entry_id, NULL, 'COMPLETE:FULL', -1, 'COMPLETE:FULL', 'COMPLETE:INCREMENTAL'),
		  gcerd.entry_id,
		  gcerd.stat_entry_id,
		  gcerd.request_error_code
         INTO     result,
		  l_entry_id,
		  l_stat_entry_id,
		  l_request_error_code
         FROM     gcs_cons_eng_run_dtls 	gcerd,
     	          gcs_cons_eng_runs		gcer
         WHERE    gcer.run_entity_id		=	cons_entity_wf_info.consolidation_entity
         AND	  gcerd.category_code		=	'DATAPREPARATION'
         AND	  gcer.run_name			=	gcerd.run_name
	 AND	  gcerd.request_error_code	IN	('COMPLETED', 'WARNING')
         AND      gcer.run_name			=	cons_entity_wf_info.prior_run_identifier
         AND      gcer.balance_type_code	=	cons_entity_wf_info.balance_type_code
         AND      gcer.run_entity_id		=	gcerd.consolidation_entity_id
         AND	  gcerd.child_entity_id		=	oper_entity_wf_info.operating_entity;
Line: 498

           SELECT 'COMPLETE:FULL'
           INTO   result
           FROM   gcs_cons_impact_analyses
           WHERE  run_name				=	cons_entity_wf_info.prior_run_identifier
           AND    consolidation_entity_id		=	cons_entity_wf_info.consolidation_entity
           AND    child_entity_id			=	oper_entity_wf_info.operating_entity
	   --Bugfix 4665921: Added GCS_VS_MAP_UPDATED check to support impact for value set assignments
           AND    message_name				IN	('GCS_VS_MAP_UPDATED', 'GCS_PRISTINE_DATA_INC_LOAD', 'GCS_PRISTINE_DATA_FULL_LOAD')
           AND    ROWNUM				< 	2;
Line: 512

           gcs_cons_eng_run_dtls_pkg.update_entry_headers_async(  p_run_detail_id                 =>      oper_entity_wf_info.run_detail_id,
                                                                  p_entry_id                      =>      l_entry_id,
                                                                  p_stat_entry_id                 =>      l_stat_entry_id,
                                                                  p_request_error_code            =>      l_request_error_code,
                                                                  p_bp_request_error_code         =>      l_request_error_code
                                                                );
Line: 556

     SELECT COUNT(entry_id)
     INTO   l_entry_count
     FROM   gcs_cons_eng_run_dtls
     WHERE  run_name			=	l_run_identifier
     AND    NVL(entry_id,-1)		>	0
     AND    consolidation_entity_id	=	l_entity_id
     AND    category_code		<>	'AGGREGATION';
Line: 570

        GCS_CONS_ENG_RUN_DTLS_PKG.insert_row(p_run_name                   =>      cons_entity_wf_info.run_identifier,
                                             p_consolidation_entity_id    =>      cons_entity_wf_info.consolidation_entity,
                                             p_category_code              =>      'AGGREGATION',
                                             p_child_entity_id            =>      cons_entity_wf_info.consolidation_entity,
                                             p_cons_relationship_id       =>      -1,
                                             p_request_error_code         =>      'NOT_APPLICABLE',
                                             p_run_detail_id              =>      l_run_detail_id);
Line: 615

    SELECT cons_relationship_id
    INTO   l_cons_relationship_id
    FROM   gcs_cons_relationships
    WHERE  child_entity_id	=	cons_entity_wf_info.consolidation_entity
    AND	   dominant_parent_flag	=	'Y'
    AND	   hierarchy_id		=	cons_entity_wf_info.consolidation_hierarchy
    AND    cons_entity_wf_info.cal_period_end_date	BETWEEN start_date 	AND	NVL(end_date, cons_entity_wf_info.cal_period_end_date)
    AND	   ROWNUM		< 	2;
Line: 629

    GCS_CONS_ENG_RUN_DTLS_PKG.insert_row(p_run_name			=>	cons_entity_wf_info.run_identifier,
    					 p_consolidation_entity_id	=>	cons_entity_wf_info.consolidation_entity,
    					 p_category_code		=>	'AGGREGATION',
    					 p_child_entity_id		=>	cons_entity_wf_info.consolidation_entity,
    					 p_cons_relationship_id		=>	l_cons_relationship_id,
    					 p_request_error_code		=>	'IN_PROGRESS',
    					 p_run_detail_id		=>	l_run_detail_id);
Line: 638

    SELECT DECODE(COUNT(*), 0, 'N', 'Y')
    INTO   l_parameter_list.stat_required
    FROM   gcs_cons_eng_run_dtls
    WHERE  run_name				=	cons_entity_wf_info.run_identifier
    AND	   consolidation_entity_id		=	cons_entity_wf_info.consolidation_entity
    AND	   NVL(stat_entry_id,0)			>	0;
Line: 674

  PROCEDURE delete_flattened_relns(cons_entity_wf_info IN gcs_cons_eng_utility_pkg.r_cons_entity_wf_info)

  IS PRAGMA AUTONOMOUS_TRANSACTION;
Line: 681

      FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, g_api || '.DELETE_FLATTENED_RELNS', '<>');
Line: 685

    DELETE FROM gcs_flattened_relns
    WHERE  run_name           =    cons_entity_wf_info.run_identifier;
Line: 691

      FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, g_api || '.DELETE_FLATTENED_RELNS', '<>');
Line: 728

     SELECT 	'Y'
     INTO	l_warning_exists
     FROM	gcs_cons_eng_run_dtls
     WHERE	run_name			=	cons_entity_wf_info.run_identifier
     AND	consolidation_entity_id		=	cons_entity_wf_info.consolidation_entity
     AND	child_entity_id			IS	NULL
     AND	request_error_code 		NOT IN	('COMPLETED', 'NOT_APPLICABLE')
--STK: Added Condition for Excluding Category Code of Aggregation 5/6/03
     AND        category_code			<>	'AGGREGATION'
     AND	ROWNUM				< 	2;
Line: 749

     gcs_cons_eng_runs_pkg.update_status(
                            p_run_name           => cons_entity_wf_info.run_identifier,
                                                        p_most_recent_flag      => 'Y',
                                                        p_status_code           => l_status_code,
                                                        p_run_entity_id         => cons_entity_wf_info.consolidation_entity,
							p_end_time		=> sysdate);
Line: 756

     SELECT	top_entity_id
     INTO	l_top_entity_id
     FROM	gcs_hierarchies_b
     WHERE	hierarchy_id		=	cons_entity_wf_info.consolidation_hierarchy;
Line: 763

      gcs_cons_eng_run_dtls_pkg.update_category_status(
                            p_run_name			        =>	cons_entity_wf_info.run_identifier,
  							p_consolidation_entity_id	=>	cons_entity_wf_info.consolidation_entity,
  							p_category_code			=>	'AGGREGATION',
  							p_status			=>	l_status_code);
Line: 785

      SELECT parent_entity_id
      INTO   l_top_entity_id
      FROM   gcs_cons_eng_runs
      WHERE  run_name                    = cons_entity_wf_info.run_identifier
      AND    run_entity_id               = cons_entity_wf_info.consolidation_entity;
Line: 792

        delete_flattened_relns(cons_entity_wf_info);
Line: 795

      SELECT entry_id,
      	     stat_entry_id
      INTO   l_entry_id,
      	     l_stat_entry_id
      FROM   gcs_cons_eng_run_dtls
      WHERE  run_detail_id 		=	cons_entity_wf_info.run_detail_id;
Line: 815

    SELECT gcerd.run_detail_id
    INTO   l_run_detail_id
    FROM   gcs_cons_eng_run_dtls gcerd
    WHERE  gcerd.category_code 		= 'DATAPREPARATION'
    AND    gcerd.child_entity_id	= cons_entity_wf_info.consolidation_entity
    AND    gcerd.run_name		= cons_entity_wf_info.run_identifier;
Line: 822

    gcs_cons_eng_run_dtls_pkg.update_entry_headers_async(	p_run_detail_id		=>	l_run_detail_id,
  								p_entry_id		=>	l_entry_id,
  								p_stat_entry_id		=> 	l_stat_entry_id,
  								p_request_error_code	=>	l_status_code,
  								p_bp_request_error_code	=>	l_status_code);
Line: 857

    INSERT INTO gcs_flattened_relns
    (run_name,
     parent_entity_id,
     child_entity_id,
     creation_date,
     created_by,
     last_update_date,
     last_updated_by,
     last_update_login,
     object_version_number,
     --Bugfix 5091093: Added consolidation type code
     consolidation_type_code
    )
    SELECT     cons_entity_wf_info.run_identifier,
               cons_entity_id,
               gcr.child_entity_id,
               sysdate,
               fnd_global.user_id,
               sysdate,
               fnd_global.user_id,
               fnd_global.login_id,
               1,
    --Bugfix 5091093: Added consolidation type code
               gtb.consolidation_type_code
    FROM        gcs_cons_relationships gcr,
                gcs_treatments_b gtb
    WHERE       gtb.treatment_id(+)         =    gcr.treatment_id
    START WITH  gcr.parent_entity_id        =    cons_entity_id
    AND         gcr.hierarchy_id            =    cons_entity_wf_info.consolidation_hierarchy
    --Bugfix 5192720: Added dominant parent flag join condition
    AND         gcr.dominant_parent_flag    =    'Y'
    AND         cons_entity_wf_info.cal_period_end_date
                BETWEEN gcr.start_date AND NVL(gcr.end_date, cons_entity_wf_info.cal_period_end_date)
    CONNECT BY  PRIOR gcr.child_entity_id   =    gcr.parent_entity_id
    AND         gcr.hierarchy_id            =    cons_entity_wf_info.consolidation_hierarchy
    AND         gcr.dominant_parent_flag    =    'Y'
    AND         cons_entity_wf_info.cal_period_end_date
                BETWEEN gcr.start_date AND NVL(gcr.end_date, cons_entity_wf_info.cal_period_end_date);
Line: 921

     	SELECT	gcerd.child_entity_id,
     		gcerd.cons_relationship_id,
     		gcerd.run_detail_id,
     		fev.entity_name,
		DECODE(geca_parent.currency_code, geca_child.currency_code, 'N', 'Y') translation_required
     	FROM    gcs_cons_eng_run_dtls  	gcerd,
     		fem_entities_attr	fea,
     		fem_entities_vl		fev,
		gcs_entity_cons_attrs	geca_parent,
		gcs_entity_cons_attrs	geca_child,
		gcs_cons_eng_runs	gcer
     	WHERE   gcerd.run_name			=	p_run_name
     	AND	gcerd.consolidation_entity_id	=	p_cons_entity_id
     	AND     gcerd.entry_id			IS NULL
     	AND	category_code 			=	'DATAPREPARATION'
     	AND	gcerd.child_entity_id		=	fev.entity_id
     	AND     gcerd.child_entity_id		=	fea.entity_id
     	AND     fea.attribute_id		=	g_entity_type_attr
        AND	fea.version_id			=	g_entity_type_version
     	AND     fea.dim_attribute_varchar_member	IN	('C')
	AND	geca_parent.entity_id		=	p_cons_entity_id
	AND	geca_child.entity_id		=	fev.entity_id
	AND	geca_parent.hierarchy_id	=	geca_child.hierarchy_id
	AND	gcer.run_name			=	gcerd.run_name
	AND	gcer.run_entity_id		=	gcerd.consolidation_entity_id
	AND	gcer.hierarchy_id		=	geca_child.hierarchy_id;
Line: 962

     	SELECT to_char(sysdate,'DD-MM-RR HH:MI:SS')
     	INTO   l_child_key
     	FROM   dual;
Line: 971

  	GCS_CONS_ENG_RUNS_PKG.insert_row
  	(
  	  p_run_name		=>	cons_entity_wf_info.run_identifier,
   	  p_hierarchy_id	=>	cons_entity_wf_info.consolidation_hierarchy,
  	  p_process_method_code	=>	cons_entity_wf_info.process_method,
  	  p_run_entity_id	=>	v_cons_entity.child_entity_id,
  	  p_cal_period_id	=>	cons_entity_wf_info.cal_period_id,
  	  p_balance_type_code	=>	cons_entity_wf_info.balance_type_code,
	  p_parent_entity_id	=>	cons_entity_wf_info.consolidation_entity,
	  p_item_key		=>	l_child_key,
	  p_request_id		=>	cons_entity_wf_info.request_id
        );
Line: 1038

   	        SELECT 	cons_entity_wf_info.run_identifier,
     			cons_entity_wf_info.consolidation_entity,
     			DECODE(category_code, 'DATAPREPARATION', 'IN_PROGRESS', 'NOT_STARTED')	request_error_code,
     			category_code
     		FROM    gcs_categories_b
     		WHERE	category_number	>	0
		AND	enabled_flag	=	'Y';
Line: 1055

      gcs_cons_eng_run_dtls_pkg.insert_row(
                                           p_run_name			=>	cons_entity_wf_info.run_identifier,
                                           p_consolidation_entity_id	=>	cons_entity_wf_info.consolidation_entity,
                                           p_category_code		=>	v_categories_to_process.category_code,
                                           p_request_error_code		=>	v_categories_to_process.request_error_code,
                                           p_run_detail_id		=>	l_run_detail_id);
Line: 1093

     SELECT run_name,
     	    status_code,
	    locked_flag,
	    impacted_flag
     INTO   l_prior_run_name,
     	    l_status_code,
	    l_locked_flag,
	    l_impacted_flag
     FROM   gcs_cons_eng_runs
     WHERE  run_entity_id	=	cons_entity_wf_info.consolidation_entity
--   Bugfix 3659810 : Added condition for hierarchy_id
     AND    hierarchy_id	=	cons_entity_wf_info.consolidation_hierarchy
     AND    most_recent_flag	=	'X'
     AND    cal_period_id	=	cons_entity_wf_info.cal_period_id;
Line: 1112

     gcs_cons_eng_runs_pkg.update_status	(	p_run_name		=> l_prior_run_name,
  							p_most_recent_flag	=> 'N',
  							p_status_code		=> NULL,
  							p_run_entity_id		=> cons_entity_wf_info.consolidation_entity);
Line: 1117

     gcs_cons_eng_runs_pkg.update_status	(	p_run_name		=> cons_entity_wf_info.run_identifier,
  							p_most_recent_flag	=> 'Y',
  							p_status_code		=> 'IN_PROGRESS',
  							p_run_entity_id		=> cons_entity_wf_info.consolidation_entity);
Line: 1136

       gcs_cons_eng_runs_pkg.update_status       (       p_run_name              =>      cons_entity_wf_info.run_identifier,
                                                         p_most_recent_flag      =>      'Y',
                                                         p_status_code           =>      'IN_PROGRESS',
                                                         p_run_entity_id         =>      cons_entity_wf_info.consolidation_entity);
Line: 1143

  PROCEDURE update_run_information(	cons_entity_wf_info	IN gcs_cons_eng_utility_pkg.r_cons_entity_wf_info,
					p_run_detail_id		IN OUT NOCOPY NUMBER)

  IS PRAGMA AUTONOMOUS_TRANSACTION;
Line: 1155

      FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, g_api || '.UPDATE_RUN_INFORMATION.begin', '<>');
Line: 1158

     UPDATE gcs_cons_eng_runs
     SET    most_recent_flag 	= 	'Y'
     WHERE  run_name		=	cons_entity_wf_info.prior_run_identifier
     AND    run_entity_id	=	cons_entity_wf_info.consolidation_entity
     RETURNING status_code, impacted_flag, locked_flag INTO l_status_code, l_impacted_flag, l_locked_flag;
Line: 1164

     UPDATE gcs_cons_eng_runs
     SET    most_recent_flag 	=	'N',
	    associated_run_name =	cons_entity_wf_info.prior_run_identifier,
	    status_code		=	l_status_code,
	    impacted_flag	=	l_impacted_flag,
	    locked_flag		=	l_locked_flag,
	    end_time		=	sysdate,
	    last_updated_by	=	FND_GLOBAL.USER_ID,
	    last_update_date	=	sysdate,
	    last_update_login	=	FND_GLOBAL.LOGIN_ID
     WHERE  run_name		=	cons_entity_wf_info.run_identifier
     AND    run_entity_id	=	cons_entity_wf_info.consolidation_entity;
Line: 1177

     UPDATE gcs_cons_eng_runs gcer
     SET    gcer.most_recent_flag  =       'Y'
     WHERE  gcer.most_recent_flag  =       'X'
     AND    gcer.hierarchy_id      =       cons_entity_wf_info.consolidation_hierarchy
     AND    gcer.cal_period_id     =       cons_entity_wf_info.cal_period_id
     AND    gcer.balance_type_code =       cons_entity_wf_info.balance_type_code
     AND    EXISTS                         (	SELECT 'X'
                                         	FROM   gcs_cons_relationships gcr
                                         	WHERE  gcr.child_entity_id = gcer.run_entity_id
                                         	START WITH gcr.parent_entity_id = cons_entity_wf_info.consolidation_entity
                                         	AND    gcr.hierarchy_id         = cons_entity_wf_info.consolidation_hierarchy
                                         	AND    cons_entity_wf_info.cal_period_end_date
                                                        BETWEEN gcr.start_date AND     NVL(gcr.end_date,
                                                                			   cons_entity_wf_info.cal_period_end_date)
                                         	CONNECT BY PRIOR gcr.child_entity_id = gcr.parent_entity_id
                                         	AND    gcr.hierarchy_id         = cons_entity_wf_info.consolidation_hierarchy
						AND    gcr.dominant_parent_flag = 'Y'
                                         	AND    cons_entity_wf_info.cal_period_end_date
                                                        BETWEEN gcr.start_date AND     NVL(gcr.end_date,
                                                                			   cons_entity_wf_info.cal_period_end_date));
Line: 1199

     UPDATE gcs_cons_eng_run_dtls gcerd
     SET    (entry_id,
	     stat_entry_id,
	     request_error_code,
	     bp_request_error_code
	     ) =
                                        (SELECT gcerd_inner.entry_id,
						gcerd_inner.stat_entry_id,
						gcerd_inner.request_error_code,
						gcerd_inner.bp_request_error_code
                                         FROM   gcs_cons_eng_run_dtls gcerd_inner
                                         WHERE  gcerd_inner.run_name                    = cons_entity_wf_info.prior_run_identifier
                                         AND    gcerd_inner.consolidation_entity_id     = cons_entity_wf_info.consolidation_entity
                                         AND    gcerd_inner.category_code               = 'AGGREGATION'
                                         AND    gcerd_inner.child_entity_id             = cons_entity_wf_info.consolidation_entity)
     WHERE  gcerd.run_name              =       cons_entity_wf_info.run_identifier
     AND    gcerd.category_code         =       'DATAPREPARATION'
     AND    gcerd.child_entity_id       =       cons_entity_wf_info.consolidation_entity
     RETURN run_detail_id       INTO    p_run_detail_id;
Line: 1222

      FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, g_api || '.UPDATE_RUN_INFORMATION.end', '<>');
Line: 1248

     update_run_information(cons_entity_wf_info,
			    l_run_detail_id);