DBA Data[Home] [Help]

APPS.CZ_CF_API SQL Statements

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

Line: 56

  ITEM_DELETE_MESSAGE  CONSTANT VARCHAR2(30) := 'CZ_BATCH_VAL_ITEM_DELETED';
Line: 71

   SELECT value INTO l_ret_value FROM cz_db_settings WHERE Upper(section_name)
     = Upper(p_section_name) AND Upper(setting_id) = Upper(p_setting);
Line: 93

                SELECT model_usage_id
                 INTO  v_usage_id
                FROM  CZ_MODEL_USAGES
                WHERE  LTRIM(RTRIM(UPPER(CZ_MODEL_USAGES.name))) = LTRIM(RTRIM(UPPER(p_usage_name)))
            AND   cz_model_usages.in_use = '1';
Line: 117

     SELECT DECODE(ui_type, 'APPLET', UI_STYLE_APPLET, 'DHTML', UI_STYLE_DHTML,
                            'JRAD', UI_STYLE_JRAD, 'WEGA', UI_STYLE_WEGA, NULL)
     INTO  v_ui_style
     FROM  dual;
Line: 130

     SELECT DECODE(ui_style, UI_STYLE_APPLET, 'APPLET', UI_STYLE_DHTML, 'DHTML',
                             UI_STYLE_JRAD, 'JRAD', UI_STYLE_WEGA, 'WEGA', NULL)
     INTO  v_ui_type
     FROM  dual;
Line: 144

        SELECT cz_config_hdrs_s.NEXTVAL
          INTO last_hdr_allocated
          FROM dual;
Line: 162

    SELECT cz_config_messages_s.NEXTVAL INTO last_msg_seq_allocated FROM dual;
Line: 179

    SELECT message
    FROM cz_db_logs
    WHERE run_id = p_run_id
    ORDER BY logtime;
Line: 201

                             handle_deleted_flag IN  VARCHAR2 DEFAULT NULL,
                             new_name            IN  VARCHAR2 DEFAULT NULL)
IS
  l_api_version  CONSTANT NUMBER := 1.0;
Line: 233

                      ,handle_deleted_flag
                      ,new_name
                      );
Line: 270

                             handle_deleted_flag IN  VARCHAR2 DEFAULT NULL,
                             new_name            IN  VARCHAR2 DEFAULT NULL)
IS

PRAGMA AUTONOMOUS_TRANSACTION;
Line: 277

                        out_config_rev_nbr,Error_message,Return_value,handle_deleted_flag, new_name);
Line: 282

PROCEDURE delete_configuration(config_hdr_id  IN       NUMBER,
                               config_rev_nbr IN       NUMBER,
                               usage_exists   IN   OUT NOCOPY NUMBER,
                               Error_message  IN   OUT NOCOPY VARCHAR2,
                               Return_value   IN   OUT NOCOPY NUMBER)
IS
  in_config_hdr_id  NUMBER := config_hdr_id;
Line: 322

    SELECT model_instantiation_type, component_instance_type
      INTO l_model_instantiation_type, l_component_instance_type
    FROM   cz_config_hdrs
    WHERE  config_hdr_id = in_config_hdr_id AND config_rev_nbr = in_config_rev_nbr;
Line: 336

  SELECT instance_hdr_id, instance_rev_nbr, component_instance_type
  BULK COLLECT INTO l_instance_hdr_id_tbl, l_instance_rev_nbr_tbl, l_instance_type_tbl
  FROM cz_config_items
  WHERE config_hdr_id = in_config_hdr_id AND config_rev_nbr = in_config_rev_nbr
    AND deleted_flag = '0'
    AND component_instance_type IN (GENERIC_INSTANCE_ROOT, NETWORK_INSTANCE_ROOT);
Line: 399

    DELETE FROM CZ_CONFIG_ATTRIBUTES
    WHERE CONFIG_HDR_ID=in_config_hdr_id
      AND CONFIG_REV_NBR=in_config_rev_nbr;
Line: 403

    DELETE FROM CZ_CONFIG_ITEMS
    WHERE CONFIG_HDR_ID=in_config_hdr_id
      AND CONFIG_REV_NBR=in_config_rev_nbr;
Line: 407

    DELETE FROM CZ_CONFIG_INPUTS
    WHERE CONFIG_HDR_ID=in_config_hdr_id
    AND CONFIG_REV_NBR=in_config_rev_nbr;
Line: 411

    DELETE FROM CZ_CONFIG_MESSAGES
    WHERE CONFIG_HDR_ID=in_config_hdr_id
    AND CONFIG_REV_NBR=in_config_rev_nbr;
Line: 417

       SELECT  UPPER(LTRIM(RTRIM(value))) INTO v_table_name FROM cz_db_settings
        WHERE  UPPER(setting_id) = 'CUSTOM_CONFIG_TABLE'
          AND  UPPER(section_name) = 'CONFIGURATION';
Line: 427

          EXECUTE IMMEDIATE ' DELETE FROM '||v_table_name||'  WHERE CONFIG_HDR_ID = :1 AND CONFIG_REV_NBR = :2 '
                              USING in_config_hdr_id, in_config_rev_nbr;
Line: 437

          DELETE FROM CZ_CONFIG_EXT_ATTRIBUTES
          WHERE CONFIG_HDR_ID = l_instance_hdr_id_tbl(i)
          AND CONFIG_REV_NBR = l_instance_rev_nbr_tbl(i);
Line: 449

      DELETE FROM CZ_CONFIG_HDRS
      WHERE CONFIG_HDR_ID = l_instance_hdr_id_tbl(i)
      AND CONFIG_REV_NBR = l_instance_rev_nbr_tbl(i);
Line: 465

    UPDATE cz_config_hdrs
    SET    to_be_deleted_flag = '1'
    WHERE  config_hdr_id=in_config_hdr_id and
           config_rev_nbr = in_config_rev_nbr;
Line: 477

     cz_utils.log_report('CZ_CF_API', 'delete_configuration', l_ndebug, error_message,
                         fnd_log.LEVEL_ERROR);
Line: 484

     cz_utils.log_report('CZ_CF_API', 'delete_configuration', l_ndebug, error_message,
                         fnd_log.LEVEL_ERROR);
Line: 496

     cz_utils.log_report('CZ_CF_API', 'delete_configuration', l_ndebug, error_message, fnd_log.LEVEL_UNEXPECTED);
Line: 497

 END delete_configuration;
Line: 500

PROCEDURE delete_configuration_usage(calling_application_id      IN  NUMBER,
                                     calling_application_ref_key IN  NUMBER,
                                     Error_message               IN OUT NOCOPY VARCHAR2,
                                     Return_value                IN OUT NOCOPY NUMBER)
IS
 in_calling_application_id      NUMBER:=calling_application_id;
Line: 512

  DELETE FROM CZ_CONFIG_USAGES WHERE CALLING_APPLICATION_ID=in_calling_application_id AND
  CALLING_APPLICATION_REF_KEY=in_calling_application_ref_key;
Line: 520

    cz_utils.log_report('CZ_CF_API', 'delete_configuration_usage', 1, error_message,
                         fnd_log.LEVEL_UNEXPECTED);
Line: 522

END delete_configuration_usage;
Line: 524

PROCEDURE update_configuration_usage(calling_application_id      IN  NUMBER,
                                     calling_application_ref_key IN  NUMBER,
                                     config_hdr_id               IN  NUMBER,
                                     config_rev_nbr              IN  NUMBER,
                                     config_item_id              IN  NUMBER,
                                     uom_code                    IN  VARCHAR2,
                                     list_price                  IN  NUMBER,
                                     discounted_price            IN  NUMBER,
                                     auto_discount_id            IN  NUMBER,
                                     auto_discount_line_id       IN  NUMBER,
                                     auto_discount_pct           IN  NUMBER,
                                     manual_discount_id          IN  NUMBER,
                                     manual_discount_line_id     IN  NUMBER,
                                     manual_discount_pct         IN  NUMBER,
                                     Error_message               IN OUT NOCOPY VARCHAR2,
                                     Return_value                IN OUT NOCOPY NUMBER)

IS
  in_calling_application_id      NUMBER:=calling_application_id;
Line: 561

  UPDATE CZ_CONFIG_USAGES SET
     LIST_PRICE=in_list_price,
     AUTO_DISCOUNT_ID=in_auto_discount_id,
     AUTO_DISCOUNT_LINE_ID=in_auto_discount_line_id,
     AUTO_DISCOUNT_PCT=in_auto_discount_pct,
     MANUAL_DISCOUNT_ID=in_manual_discount_id,
     MANUAL_DISCOUNT_LINE_ID=in_manual_discount_line_id,
     MANUAL_DISCOUNT_PCT=in_manual_discount_pct,
     DISCOUNTED_PRICE=in_discounted_price,
     UOM_CODE=in_uom_code
WHERE
     CALLING_APPLICATION_ID=in_calling_application_id AND
     CALLING_APPLICATION_REF_KEY=in_calling_application_ref_key AND
     CONFIG_HDR_ID=in_config_hdr_id AND
     CONFIG_REV_NBR=in_config_rev_nbr AND
     CONFIG_ITEM_ID=in_config_item_id;
Line: 583

    cz_utils.log_report('CZ_CF_API', 'update_configuration_usage', 1, error_message,
                         fnd_log.LEVEL_UNEXPECTED);
Line: 585

END update_configuration_usage;
Line: 710

    SELECT  inventory_item_id, instance_nbr
    FROM    cz_config_items
    WHERE   deleted_flag = '0'
    AND     inventory_item_id IS NOT NULL
    AND     config_hdr_id =  p_config_hdr_id
    AND     config_rev_nbr = p_config_rev_nbr
    START WITH config_hdr_id = p_config_hdr_id and config_rev_nbr = p_config_rev_nbr and config_item_id = p_config_item_id
    CONNECT BY PRIOR parent_config_item_id = config_item_id and config_hdr_id = p_config_hdr_id and config_rev_nbr = p_config_rev_nbr
    ORDER BY ROWNUM DESC;
Line: 726

    SELECT decode(l_instance_nbr, -1,1,0,1,l_instance_nbr) into l_instance_nbr from dual;
Line: 853

	SELECT description,concatenated_segments
	INTO   x_description,x_item_name
	FROM   mtl_system_items_kfv
	WHERE  mtl_system_items_kfv.inventory_item_id = p_inventory_item_id
	AND    mtl_system_items_kfv.organization_id = p_organization_id;
Line: 888

	IF ( (p_message_name = ITEM_DELETE_MESSAGE) OR (p_message_name = ITEM_ADD_MESSAGE ) )  THEN
		l_delta_message := CZ_UTILS.GET_TEXT(p_message_name,
							'ITEMNAME',l_new_item_name,
    				 			'QUANTITY',p_current_quantity,
							'COMPONENTCODE',p_component_code,
							'DESCRIPTION',l_description);
Line: 903

      insert into cz_config_messages (config_hdr_id,config_rev_nbr,constraint_type,
						  message,message_seq,deleted_flag)
	values (p_config_hdr,p_config_rev,'ITEM DELTA',l_delta_message,l_msg_seq, '0');
Line: 969

			IS select config_rev_nbr,config_item_id,quantity,
				    component_code,inventory_item_id,organization_id
			   from cz_config_details_v
			   where (config_hdr_id,config_item_id,quantity)
					 IN (
					    (select config_hdr_id,config_item_id,quantity from cz_config_details_v
     						where config_hdr_id = p_old_hdr and config_rev_nbr = p_old_rev
   					     minus
   					    select config_hdr_id,config_item_id,quantity from cz_config_details_v
   					    where config_hdr_id = p_new_hdr and  config_rev_nbr = p_new_rev )
  					    union
   					  (select config_hdr_id,config_item_id,quantity from cz_config_details_v
   					   where  config_hdr_id = p_new_hdr  and config_rev_nbr = p_new_rev
   					   minus
  					   select config_hdr_id,config_item_id,quantity from cz_config_details_v
  					   where config_hdr_id = p_old_hdr  and  config_rev_nbr = p_old_rev )
					   )
			  and config_rev_nbr IN (p_old_rev, p_new_rev)
			  ORDER BY config_item_id,config_hdr_id,config_rev_nbr;
Line: 1058

				--item deleted
				l_delta_exists  := 'YES';
Line: 1068

				     			ITEM_DELETE_MESSAGE);
Line: 1109

	----this block of code process the last record if add or delete item
	IF ( l_qty_changed = FALSE ) THEN
		IF (l_new_rev = v_rev_nbr) THEN
				--item deleted
				l_delta_exists  := 'YES';
Line: 1122

				     			ITEM_DELETE_MESSAGE);
Line: 1152

	   x_config_messages.DELETE;
Line: 1301

procedure delete_bv_records(p_pseudo_hdr_id    IN NUMBER
                           ,p_check_db_setting IN BOOLEAN
                           ,p_delete_ext_attr  IN BOOLEAN)
IS
  l_no_config_del cz_db_settings.value%TYPE;
Line: 1310

      SELECT upper(value) INTO l_no_config_del
      FROM cz_db_settings
      WHERE setting_id = 'BatchValConfigInputDelete';
Line: 1323

  IF p_delete_ext_attr THEN
    DELETE FROM CZ_CONFIG_EXT_ATTRIBUTES
    WHERE config_hdr_id = p_pseudo_hdr_id AND config_rev_nbr = 1;
Line: 1327

  DELETE FROM CZ_CONFIG_ITEMS
  WHERE config_hdr_id = p_pseudo_hdr_id AND config_rev_nbr = 1;
Line: 1329

  DELETE FROM CZ_CONFIG_HDRS
  WHERE config_hdr_id = p_pseudo_hdr_id AND config_rev_nbr = 1;
Line: 1332

END delete_bv_records;
Line: 1484

			SELECT model_identifier INTO l_model_identifier FROM cz_config_hdrs
				WHERE config_hdr_id = p_config_header_id AND config_rev_nbr = p_config_rev_nbr AND deleted_flag = 0;
Line: 1496

		SELECT product_key INTO x_product_key FROM cz_model_publications WHERE publication_id = x_publication_id;
Line: 1871

    INSERT INTO CZ_CONFIG_HDRS (config_hdr_id
                               ,config_rev_nbr
                               ,name
                               ,effective_usage_id
                               ,component_instance_type
                               ,model_instantiation_type
                               ,CONFIG_DELTA_SPEC
                               ,deleted_flag
                               ,HAS_FAILURES
                               )
    VALUES (l_pseudo_hdr_id
           ,1
           ,'new batch'
           ,ANY_USAGE_ID
           ,ROOT
           ,BV_MODEL_TYPE
           ,0
           ,'0'
           ,'0'
           );
Line: 1935

        ELSIF p_config_item_tbl(i).operation NOT IN (BV_OPERATION_UPDATE,BV_OPERATION_DELETE) THEN
          IF p_config_item_tbl(i).operation = BV_OPERATION_INSERT THEN
            l_operation_code := 'INSERT';
Line: 1949

        ELSIF p_config_item_tbl(i).operation = BV_OPERATION_UPDATE AND
              p_config_item_tbl(i).instance_name = FND_API.G_MISS_CHAR THEN
          set_message('CZ_BV_NULL_VAL', 'COLUMN', 'INSTANCE_NAME', 'TYPE', 'ITEM',
                      'IDX', i, 'SEQ', p_config_item_tbl(i).sequence_nbr);
Line: 1988

        ELSIF p_config_item_tbl(i).operation = BV_OPERATION_UPDATE THEN
          l_upd_item_map(p_config_item_tbl(i).config_item_id) := p_config_item_tbl(i).config_item_id;
Line: 2013

        INSERT INTO CZ_CONFIG_ITEMS
                (config_hdr_id
                ,config_rev_nbr
                ,config_item_id
                ,sequence_nbr
                ,value_type_code
                ,node_identifier
                ,item_num_val
                ,INSTANCE_HDR_ID
                ,INSTANCE_REV_NBR
                ,COMPONENT_INSTANCE_TYPE
                ,CONFIG_DELTA
                ,name
                ,location_id
                ,location_type_code
               )
        VALUES (l_pseudo_hdr_id
               ,1
               ,l_config_item_tbl(i)
               ,l_seq_nbr_tbl(i)
               ,l_operation_tbl(i)
               ,l_ecc_tbl(i)
               ,l_quantity_tbl(i)
               ,l_pseudo_hdr_id
               ,1
               ,'T'
               ,l_rec_seq_tbl(i)
               ,l_instance_name_tbl(i)
               ,l_loc_id_tbl(i)
               ,l_loc_type_code_tbl(i)
               );
Line: 2048

        SELECT config_item_id BULK COLLECT INTO l_config_item_tbl
        FROM cz_config_items
        WHERE config_hdr_id = l_pseudo_hdr_id AND config_rev_nbr = 1
        ORDER BY sequence_nbr, config_delta;
Line: 2058

          UPDATE cz_config_items
          SET    sequence_nbr = l_seq_nbr_tbl(i)
          WHERE  config_hdr_id = l_pseudo_hdr_id AND config_rev_nbr = 1
          AND    config_item_id = l_config_item_tbl(i);
Line: 2080

      l_config_item_tbl.DELETE;
Line: 2081

      l_ecc_tbl.DELETE;
Line: 2082

      l_seq_nbr_tbl.DELETE;
Line: 2151

          INSERT INTO CZ_CONFIG_ITEMS
                (config_hdr_id
                ,config_rev_nbr
                ,config_item_id
                ,sequence_nbr
                ,value_type_code
                ,node_identifier
                ,INSTANCE_HDR_ID
                ,INSTANCE_REV_NBR
                ,COMPONENT_INSTANCE_TYPE
                ,CONFIG_DELTA
               )
          VALUES (l_pseudo_hdr_id
                 ,1
                 ,p_config_ext_attr_tbl(i).config_item_id
                 ,i -- do not matter for no-op item
                 ,BV_OPERATION_UPDATE
                 ,l_ext_comp_code
                 ,l_pseudo_hdr_id
                 ,1
                 ,'T'
                 ,l_item_depth
                 );
Line: 2187

        INSERT INTO cz_config_ext_attributes(config_hdr_id
                                            ,config_rev_nbr
                                            ,config_item_id
                                            ,attribute_name
                                            ,attribute_group
                                            ,attribute_value
                                            ,sequence_nbr
                                            )
        VALUES(l_pseudo_hdr_id
              ,1
              ,l_config_item_tbl(i)
              ,l_attr_nam_tbl(i)
              ,l_attr_grp_tbl(i)
              ,l_attr_val_tbl(i)
              ,l_seq_nbr_tbl(i)
              );
Line: 2207

        l_config_item_tbl.DELETE;
Line: 2208

        l_seq_nbr_tbl.DELETE;
Line: 2209

        SELECT attr.config_item_id BULK COLLECT INTO l_config_item_tbl
        FROM cz_config_ext_attributes attr, cz_config_items item
        WHERE attr.config_hdr_id = l_pseudo_hdr_id AND attr.config_rev_nbr = 1
        AND attr.config_hdr_id = item.config_hdr_id AND attr.config_rev_nbr = item.config_rev_nbr
        AND attr.config_item_id = item.config_item_id
        ORDER BY nvl(length(translate(item.node_identifier,'-0123456789','A')),0), attr.sequence_nbr;
Line: 2221

          UPDATE cz_config_ext_attributes
          SET    sequence_nbr = l_seq_nbr_tbl(i)
          WHERE  config_hdr_id = l_pseudo_hdr_id AND config_rev_nbr = 1
          AND    config_item_id = l_config_item_tbl(i);
Line: 2265

    FOR i IN (SELECT message FROM cz_config_messages
              WHERE config_hdr_id = l_pseudo_hdr_id AND config_rev_nbr = 1
              ORDER BY message_seq) LOOP
      fnd_msg_pub.Add_Exc_Msg(p_error_text => i.message);
Line: 2281

      FOR i IN (SELECT message FROM cz_config_messages
                WHERE config_hdr_id = l_pseudo_hdr_id AND config_rev_nbr = 1
                ORDER BY message_seq) LOOP
        fnd_msg_pub.Add_Exc_Msg(p_error_text => i.message);
Line: 2291

  delete_bv_records(l_pseudo_hdr_id, TRUE, TRUE);
Line: 2306

    delete_bv_records(l_pseudo_hdr_id, FALSE, TRUE);
Line: 2316

    delete_bv_records(l_pseudo_hdr_id, FALSE, TRUE);
Line: 2412

      INSERT INTO CZ_CONFIG_HDRS (config_hdr_id
                                 ,config_rev_nbr
                                 ,name
                                 ,effective_usage_id
                                 ,deleted_flag
                                 ,CONFIG_DELTA_SPEC
                                 ,COMPONENT_INSTANCE_TYPE
                                 ,MODEL_INSTANTIATION_TYPE
                                 ,HAS_FAILURES)
      VALUES (l_pseudo_hdr_id
             ,1
             ,'old batch'
             ,ANY_USAGE_ID
             ,'0'
             ,0
             ,ROOT
             ,BV_MODEL_TYPE
             ,'0');
Line: 2488

        INSERT INTO CZ_CONFIG_ITEMS(config_hdr_id
                                   ,config_rev_nbr
                                   ,config_item_id
                                   ,sequence_nbr
                                   ,node_identifier
                                   ,item_num_val
                                   ,value_type_code
                                   ,INSTANCE_HDR_ID
                                   ,INSTANCE_REV_NBR
                                   ,COMPONENT_INSTANCE_TYPE
                                   ,CONFIG_DELTA
                                   )
        VALUES (l_pseudo_hdr_id
               ,1
               ,l_item_id_tbl(i)
               ,l_input_seq_tbl(i)
               ,l_ecc_tbl(i)
               ,l_quantity_tbl(i)
               ,BV_OPERATION_OLD
               ,l_pseudo_hdr_id
               ,1
               ,INCLUDED
               ,l_item_depth_tbl(i)
               );
Line: 2519

      l_item_id_tbl.delete;
Line: 2520

      l_input_seq_tbl.delete;
Line: 2521

      SELECT config_item_id BULK COLLECT INTO l_item_id_tbl
      FROM   cz_config_items
      WHERE  config_hdr_id = l_pseudo_hdr_id
      AND    config_rev_nbr = 1
      ORDER BY config_delta, sequence_nbr;
Line: 2532

        UPDATE cz_config_items
        SET    sequence_nbr = l_input_seq_tbl(i)
        WHERE  config_hdr_id = l_pseudo_hdr_id
        AND    config_rev_nbr = 1
        AND    config_item_id = l_item_id_tbl(i);
Line: 2589

  delete_bv_records(l_pseudo_hdr_id, l_check_db_setting, FALSE);
Line: 2599

    delete_bv_records(l_pseudo_hdr_id, FALSE, FALSE);
Line: 2735

        SELECT 1 INTO l_dummy
        FROM mtl_system_items
        WHERE inventory_item_id = p_inventory_item_id
        AND organization_id = p_organization_id
        AND bom_item_type = BOM_ITEM_TYPE_MODEL;
Line: 2754

    SELECT ui_style INTO l_pub_ui_style
    FROM CZ_MODEL_PUBLICATIONS
    WHERE publication_id = p_publication_id;
Line: 2852

    SELECT look_and_feel INTO look_and_feel FROM cz_ui_defs WHERE ui_def_id = v_ui_def_id;
Line: 2933

    SELECT model_id
    INTO   v_model_id
    FROM   CZ_MODEL_PUBLICATIONS
    WHERE  CZ_MODEL_PUBLICATIONS.publication_id = v_publication_id
    AND    CZ_MODEL_PUBLICATIONS.export_status = 'OK'
    AND    CZ_MODEL_PUBLICATIONS.deleted_flag = '0';
Line: 2957

    SELECT ui_def_id
    INTO   v_ui_def_id
    FROM   CZ_MODEL_PUBLICATIONS
    WHERE  CZ_MODEL_PUBLICATIONS.publication_id = v_publication_id
    AND    CZ_MODEL_PUBLICATIONS.export_status = 'OK'
    AND    CZ_MODEL_PUBLICATIONS.deleted_flag = '0';
Line: 3190

            SELECT publication_id
            FROM   cz_model_applicabilities_v
            WHERE  inventory_item_id     = v_inventory_item_id
            AND    bom_explosion_org_id  = v_organization_id
            AND    UPPER(publication_mode)   = LTRIM(RTRIM(UPPER(v_publication_mode)))
            AND    fnd_application_id    = v_application_id
            AND    usage_id          = v_usage_id
            AND    Source_Target_Flag        = v_source_target_flag
            AND    deleted_flag      = '0'
            AND    language         = v_language
                AND (start_date <= v_config_lookup_date)
                AND (v_config_lookup_date < disable_date)
            ORDER BY start_date DESC;
Line: 3205

            SELECT publication_id
            FROM   cz_model_applicabilities_v
            WHERE  inventory_item_id     = v_inventory_item_id
            AND    bom_explosion_org_id  = v_organization_id
            AND    UPPER(publication_mode) = LTRIM(RTRIM(UPPER(v_publication_mode)))
            AND    usage_id = v_usage_id
            AND    Source_Target_Flag = v_source_target_flag
            AND    deleted_flag = '0'
            AND    language = v_language
            AND    start_date <= v_config_lookup_date
            AND    v_config_lookup_date < disable_date
            ORDER BY start_date DESC;
Line: 3226

        SELECT userenv('LANG') INTO v_language FROM dual;
Line: 3318

      SELECT prj.inventory_item_id, prj.organization_id
      FROM cz_devl_projects prj, cz_model_ref_expls expl
      WHERE expl.model_id = p_model_id
      AND expl.ps_node_type = PS_NODE_TYPE_REFERENCE
      AND expl.deleted_flag = '0'
      AND prj.devl_project_id = expl.component_id
      AND prj.deleted_flag = '0'
      AND prj.inventory_item_id IS NOT NULL
      AND prj.organization_id IS NOT NULL
      ORDER BY expl.node_depth;
Line: 3359

    SELECT component_id, model_identifier
    INTO v_component_id, v_model_identifier
    FROM CZ_CONFIG_HDRS
    WHERE config_hdr_id = v_config_hdr_id AND config_rev_nbr = v_config_rev_nbr;
Line: 3399

      SELECT inventory_item_id, organization_id, product_key
      INTO v_inventory_item_id, v_organization_id, v_product_key
      FROM CZ_DEVL_PROJECTS
      WHERE deleted_flag = '0' AND devl_project_id = v_component_id;
Line: 3407

          SELECT inventory_item_id, organization_id
          INTO v_inventory_item_id, v_organization_id
          FROM cz_config_items
          WHERE config_hdr_id = v_config_hdr_id AND config_rev_nbr = v_config_rev_nbr
          AND deleted_flag = '0' AND inventory_item_id IS NOT NULL
          AND to_char(inventory_item_id) = node_identifier;
Line: 3474

            SELECT publication_id
            FROM   cz_model_applicabilities_v
            WHERE  product_key       = v_product_key
            AND    UPPER(publication_mode)   = LTRIM(RTRIM(UPPER(v_publication_mode)))
            AND    fnd_application_id    = v_application_id
            AND    usage_id          = v_usage_id
            AND    Source_Target_Flag        = v_source_target_flag
            AND    deleted_flag      = '0'
            AND    language = v_language
                AND (start_date <= v_config_lookup_date)
                AND (v_config_lookup_date < disable_date)
            ORDER BY start_date DESC;
Line: 3487

            SELECT publication_id
            FROM   cz_model_applicabilities_v
            WHERE  product_key       = v_product_key
            AND    UPPER(publication_mode)   = LTRIM(RTRIM(UPPER(v_publication_mode)))
            AND    usage_id          = v_usage_id
            AND    Source_Target_Flag        = v_source_target_flag
            AND    deleted_flag      = '0'
            AND    language = v_language
                AND (start_date <= v_config_lookup_date)
                AND (v_config_lookup_date < disable_date)
            ORDER BY start_date DESC;
Line: 3507

        SELECT userenv('LANG') INTO v_language FROM dual;
Line: 3629

    SELECT creation_date, effective_date INTO l_config_creation_date,
      l_config_effective_date FROM CZ_CONFIG_HDRS WHERE config_hdr_id =
      p_config_hdr_id AND config_rev_nbr = p_config_rev_nbr;
Line: 3642

  SELECT NVL(p_creation_date, NVL(l_config_creation_date, SYSDATE)) INTO
    p_creation_date FROM dual;
Line: 3650

      SELECT value
      INTO   l_rest_cfg_lookup_setting
      FROM cz_db_settings WHERE setting_id = 'RestoredConfigDefaultModelLookupDate';
Line: 3665

  	SELECT NVL(p_lookup_date, SYSDATE) INTO p_lookup_date FROM dual;
Line: 3668

  SELECT NVL(p_effective_date, NVL(l_config_effective_date, SYSDATE)) INTO
    p_effective_date FROM dual;
Line: 3721

    select ORGANIZATION_ID, ASSEMBLY_ITEM_ID
    into COMMON_ORGANIZATION_ID, COMMON_INVENTORY_ITEM_ID
    from BOM_BILL_OF_MATERIALS
    where BILL_SEQUENCE_ID in (select SOURCE_BILL_SEQUENCE_ID from BOM_BILL_OF_MATERIALS
                        where ORGANIZATION_ID = in_organization_id
                        and ASSEMBLY_ITEM_ID = in_inventory_item_id);
Line: 3780

                   ,x_last_update_dates OUT NOCOPY  date_tbl_indexby_type
                   ,x_model_type        OUT NOCOPY VARCHAR2
                   )
IS
  TYPE model_type_tbl_type IS TABLE OF cz_devl_projects.model_type%TYPE
           INDEX BY BINARY_INTEGER;
Line: 3788

  SELECT pub.publication_id, pub.model_id, pub.ui_def_id, pub.start_date,
         pub.last_update_date, prj.model_type
  BULK COLLECT INTO x_publication_ids, x_model_ids, x_ui_def_ids,
       x_start_dates, x_last_update_dates, l_model_type_tbl
  FROM cz_model_applicabilities_v pub, cz_devl_projects prj
  WHERE pub.model_id = prj.devl_project_id
   AND prj.deleted_flag ='0' AND pub.deleted_flag = '0'
   AND pub.inventory_item_id = p_inventory_item_id
   AND bom_explosion_org_id = p_organization_id
   AND fnd_application_id = p_application_id
   AND usage_id = p_usage_id AND language = p_language
   AND UPPER(publication_mode) IN ( cz_api_pub.G_PRODUCTION_PUB_MODE , 'T')
   AND source_target_flag = TARGET_PUBLICATION
   AND ui_style = UI_STYLE_DHTML
   AND ( (p_pub_start_date >= start_date AND p_pub_start_date < disable_date) OR
         (P_pub_end_date > start_date AND p_pub_end_date <= disable_date) OR
         (start_date >= p_pub_start_date AND start_date < p_pub_end_date) OR
         (disable_date > p_pub_start_date AND disable_date <= p_pub_end_date) );
Line: 3825

                 ,x_last_update_date_tbl  OUT NOCOPY date_tbl_indexby_type
                 ,x_model_type  OUT NOCOPY VARCHAR2
                 )
IS
  l_usage_name  VARCHAR2(255) := p_usage_name;
Line: 3860

                         ,x_last_update_date_tbl
                         ,x_model_type
                         );
Line: 3878

                             ,x_last_update_date_tbl
                             ,x_model_type
                             );
Line: 3900

                               ,x_last_update_date_tbl
                               ,x_model_type
                               );
Line: 3928

    SELECT product_key
    FROM CZ_DEVL_PROJECTS
    WHERE persistent_project_id = v_persist_comp_id
    AND product_key IS NOT NULL
    AND deleted_flag = '0';
Line: 3936

    SELECT persistent_component_id, model_identifier
    INTO v_persist_comp_id, v_model_identifier
    FROM CZ_CONFIG_HDRS
    WHERE config_hdr_id = v_config_hdr_id AND config_rev_nbr = v_config_rev_nbr;
Line: 3969

    SELECT pool_identifier INTO v_pool_token FROM cz_model_pool_mappings WHERE model_product_key = p_product_key;
Line: 3974

   SELECT value INTO v_pool_token FROM cz_db_settings WHERE section_name = 'ORAAPPS_INTEGRATE' AND setting_id = 'DefaultPoolIdentifier';
Line: 3992

   SELECT A.ASSEMBLY_ITEM_ID FROM CZ_EXV_BILL_OF_MATERIALS A,CZ_EXV_MTL_SYSTEM_ITEMS B
   WHERE A.ASSEMBLY_ITEM_ID=B.INVENTORY_ITEM_ID
        AND A.ORGANIZATION_ID=B.ORGANIZATION_ID
        AND B.BOM_ITEM_TYPE=1
        AND A.ORGANIZATION_ID= Org_ID
        AND B.CONCATENATED_SEGMENTS = p_inventory_item_id;
Line: 4013

SELECT ORGANIZATION_ID INTO nOrg_ID FROM CZ_EXV_ORGANIZATIONS
WHERE ORGANIZATION_CODE = p_org_id;
Line: 4057

  SELECT COUNT(*)
  INTO v_count
  FROM cz_model_pool_mappings
  WHERE model_product_key = p_model_product_key ;
Line: 4065

    INSERT INTO cz_model_pool_mappings(pool_identifier, model_product_key)
    VALUES(p_pool_identifier, p_model_product_key);
Line: 4095

   SELECT A.ASSEMBLY_ITEM_ID FROM CZ_EXV_BILL_OF_MATERIALS A,CZ_EXV_MTL_SYSTEM_ITEMS B
   WHERE A.ASSEMBLY_ITEM_ID=B.INVENTORY_ITEM_ID
        AND A.ORGANIZATION_ID=B.ORGANIZATION_ID
        AND B.BOM_ITEM_TYPE=1
        AND A.ORGANIZATION_ID= Org_ID
        AND B.CONCATENATED_SEGMENTS = p_inventory_item_id;
Line: 4115

SELECT ORGANIZATION_ID INTO nOrg_ID FROM CZ_EXV_ORGANIZATIONS
WHERE ORGANIZATION_CODE = p_org_id;
Line: 4150

  DELETE FROM cz_model_pool_mappings WHERE pool_identifier = p_pool_identifier
  AND model_product_key = p_model_product_key;
Line: 4190

  DELETE FROM cz_model_pool_mappings WHERE pool_identifier = p_pool_identifier;
Line: 4212

    SELECT orig_sys_ref, NVL(config_engine_type,'L') INTO lOSR, lConfigEngineType
    FROM cz_devl_projects d
    WHERE d.deleted_flag = '0'
    AND d.devl_project_id = inDevlProjectId
    AND EXISTS (SELECT NULL FROM CZ_RP_ENTRIES WHERE deleted_flag = '0'
    AND object_type = 'PRJ' AND object_id = d.devl_project_id)
    AND orig_sys_ref IS NOT NULL;
Line: 4234

    SELECT d.devl_project_id INTO lModelId FROM  cz_devl_projects d
    WHERE d.orig_sys_ref = lOSR
    AND d.deleted_flag = '0'
    AND NVL(d.import_enabled,'0') = '1'
    AND NVL(d.config_engine_type,'L') = lConfigEngineType
    AND EXISTS (SELECT NULL FROM CZ_RP_ENTRIES WHERE deleted_flag = '0'
    AND object_type = 'PRJ' AND object_id = d.devl_project_id) ;
Line: 4253

        UPDATE cz_devl_projects SET import_enabled = '1'
        WHERE deleted_flag = '0'
        AND devl_project_id = inDevlProjectId ;
Line: 4290

    SELECT orig_sys_ref INTO lOSR FROM cz_devl_projects d
    WHERE d.deleted_flag = '0'
    AND d.devl_project_id = inDevlProjectId
    AND EXISTS (SELECT NULL FROM CZ_RP_ENTRIES WHERE deleted_flag = '0'
    AND object_type = 'PRJ' AND object_id = d.devl_project_id)
    AND orig_sys_ref IS NOT NULL ;
Line: 4310

  UPDATE cz_devl_projects SET import_enabled = '0'
  WHERE deleted_flag = '0'
  AND devl_project_id = inDevlProjectId ;