DBA Data[Home] [Help]

APPS.PV_ATTRIBUTE_PVT SQL Statements

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

Line: 51

      SELECT PV_ATTRIBUTES_B_s.NEXTVAL
      FROM dual;
Line: 55

      SELECT 1
      FROM PV_ATTRIBUTES_B
      WHERE ATTRIBUTE_ID = l_id;
Line: 130

           l_attribute_rec.last_update_date      := SYSDATE;
Line: 131

           l_attribute_rec.last_updated_by       := G_USER_ID;
Line: 134

           l_attribute_rec.last_update_login     := G_LOGIN_ID;
Line: 162

			FOR x IN (select meaning from pv_lookups
				    where lookup_type = 'PV_ATTRIBUTE_TYPE'
				    and lookup_code = l_attribute_rec.attribute_type
				   ) LOOP
				l_meaning := x.meaning;
Line: 170

			FOR x IN (select meaning from pv_lookups
				    where lookup_type = 'PV_ATTR_DISPLAY_STYLE'
				    and lookup_code = l_attribute_rec.display_style
				   ) LOOP
				l_meaning := x.meaning;
Line: 194

      PV_ATTRIBUTE_PKG.Insert_Row(
          px_attribute_id           => l_attribute_rec.attribute_id,
          p_last_update_date        => l_attribute_rec.last_update_date,
          p_last_updated_by         => l_attribute_rec.last_updated_by,
          p_creation_date           => l_attribute_rec.creation_date,
          p_created_by              => l_attribute_rec.created_by,
          p_last_update_login       => l_attribute_rec.last_update_login,
          px_object_version_number  => l_attribute_rec.object_version_number,
          --p_security_group_id     => l_attribute_rec.security_group_id,
          p_enabled_flag            => l_attribute_rec.enabled_flag,
          p_attribute_type          => l_attribute_rec.attribute_type,
          p_attribute_category      => l_attribute_rec.attribute_category,
          p_seeded_flag             => l_attribute_rec.seeded_flag,
          p_lov_function_name       => l_attribute_rec.lov_function_name,
          p_return_type             => l_attribute_rec.return_type,
          p_max_value_flag          => l_attribute_rec.max_value_flag,
	  p_name                    => l_attribute_rec.name,
	  p_description             => l_attribute_rec.description,
	  p_short_name              => l_attribute_rec.short_name,

	  p_display_style	    => l_attribute_rec.display_style,
          p_character_width	    => l_attribute_rec.character_width,
          p_decimal_points    	    => l_attribute_rec.decimal_points,
          p_no_of_lines		    => l_attribute_rec.no_of_lines,
          p_expose_to_partner_flag  => l_attribute_rec.expose_to_partner_flag,
          p_value_extn_return_type  => l_attribute_rec.value_extn_return_type,
	  p_enable_matching_flag    => l_attribute_rec.enable_matching_flag,
	  p_performance_flag        => l_attribute_rec.performance_flag,
	  p_additive_flag	    => l_attribute_rec.additive_flag,
	  p_sequence_number	    => l_attribute_rec.sequence_number

	  );
Line: 298

PROCEDURE Update_Attribute(
     p_api_version_number         IN   NUMBER
    ,p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE
    ,p_commit                     IN   VARCHAR2     := FND_API.G_FALSE
    ,p_validation_level           IN  NUMBER        := FND_API.G_VALID_LEVEL_FULL

    ,x_return_status              OUT NOCOPY  VARCHAR2
    ,x_msg_count                  OUT NOCOPY  NUMBER
    ,x_msg_data                   OUT NOCOPY  VARCHAR2

    ,p_attribute_rec              IN    attribute_rec_type
    ,x_object_version_number      OUT NOCOPY  NUMBER

    )

 IS

CURSOR c_get_attribute(cv_attribute_id NUMBER) IS
    SELECT *
    FROM  PV_ATTRIBUTES_B
    where attribute_id = cv_attribute_id;
Line: 320

   L_API_NAME                  CONSTANT VARCHAR2(30) := 'Update_Attribute';
Line: 331

   l_delete_flag	    VARCHAR2(1):='Y';
Line: 336

   select  distinct rules.process_rule_name
   from pv_enty_select_criteria criteria,pv_process_rules_vl rules
   where criteria.attribute_id= pc_attribute_id
         and criteria.process_rule_id= rules.process_rule_id;
Line: 342

	select resp.RESPONSIBILITY_NAME
	from pv_attrib_resp_mappings val, FND_RESPONSIBILITY_VL resp
	where
	val.attribute_id= pc_attribute_id and
	resp.application_id = 691 and
	val.entity_type = 'MANUAL_MATCHING' and
	resp.RESPONSIBILITY_ID = val.responsibility_id;
Line: 352

      SAVEPOINT UPDATE_Attribute_PVT;
Line: 380

	  PVX_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
Line: 392

			 FND_MESSAGE.set_token('MODE','Update');
Line: 417

				l_delete_flag := 'N' ;
Line: 422

            if(l_delete_flag = 'N') then

				IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
					FND_MESSAGE.Set_Name('PV', 'PV_ATTR_NOTDISABLED_RULE');
Line: 439

				l_delete_flag := 'N' ;
Line: 444

            if(l_delete_flag = 'N') then

				IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
					FND_MESSAGE.Set_Name('PV', 'PV_ATTR_NOTDISABLED_MATCHING');
Line: 463

				l_delete_flag := 'N' ;
Line: 468

            if(l_delete_flag = 'N') then

				IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
					FND_MESSAGE.Set_Name('PV', 'PV_VALUE_TYPE_REFERENCED_RULE');
Line: 487

				l_delete_flag := 'N' ;
Line: 492

            if(l_delete_flag = 'N') then

				IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
					FND_MESSAGE.Set_Name('PV', 'PV_MATCHING_REFERENCED_RULE');
Line: 507

				l_delete_flag := 'N' ;
Line: 512

            if(l_delete_flag = 'N') then

				IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
					FND_MESSAGE.Set_Name('PV', 'PV_MATCHING_NOTDISABLED');
Line: 543

	--		FOR x IN (select meaning from pv_lookups
	--			where lookup_type = 'PV_ATTRIBUTE_TYPE'
	--			and lookup_code = p_attribute_rec.attribute_type
	--		) LOOP
	--			l_meaning := x.meaning;
Line: 551

	--		FOR x IN (select meaning from pv_lookups
	--			where lookup_type = 'PV_ATTR_DISPLAY_STYLE'
	--			and lookup_code = l_ref_attribute_rec.display_style
	--		) LOOP
	--			l_meaning := x.meaning;
Line: 559

	--		FOR x IN (select meaning from pv_lookups
	--			where lookup_type = 'PV_ATTR_DISPLAY_STYLE'
	--			and lookup_code = p_attribute_rec.display_style
	--		) LOOP
	--			l_meaning := x.meaning;
Line: 606

					FOR x IN (select meaning from pv_lookups
						where lookup_type = 'PV_ATTRIBUTE_TYPE'
						and lookup_code = p_attribute_rec.attribute_type
					) LOOP
						l_meaning := x.meaning;
Line: 614

					FOR x IN (select meaning from pv_lookups
						where lookup_type = 'PV_ATTR_DISPLAY_STYLE'
						and lookup_code = l_ref_attribute_rec.display_style
					) LOOP
						l_meaning := x.meaning;
Line: 622

					FOR x IN (select meaning from pv_lookups
						where lookup_type = 'PV_ATTR_DISPLAY_STYLE'
						and lookup_code = p_attribute_rec.display_style
					) LOOP
						l_meaning := x.meaning;
Line: 653

			   FND_MESSAGE.set_token('COLUMN', TO_CHAR(l_tar_attribute_rec.last_update_date));
Line: 679

            p_validation_mode        => JTF_PLSQL_API.g_update,
            p_attribute_rec          => p_attribute_rec,
            x_return_status          => x_return_status,
            x_msg_count              => x_msg_count,
            x_msg_data               => x_msg_data);
Line: 695

      PVX_UTILITY_PVT.debug_message('Private API: '||l_full_name||' - Calling update table handler');
Line: 701

      PV_ATTRIBUTE_PKG.Update_Row(
          p_attribute_id            => p_attribute_rec.attribute_id,
          p_last_update_date        => SYSDATE,
          p_last_updated_by         => G_USER_ID,
          --p_creation_date         => SYSDATE,
          --p_created_by            => G_USER_ID,
          p_last_update_login       => G_LOGIN_ID,
          p_object_version_number   => p_attribute_rec.object_version_number,
          --p_security_group_id     => p_attribute_rec.security_group_id,
          p_enabled_flag            => p_attribute_rec.enabled_flag,
          p_attribute_type          => p_attribute_rec.attribute_type,
          p_attribute_category      => p_attribute_rec.attribute_category,
          p_seeded_flag             => p_attribute_rec.seeded_flag,
          p_lov_function_name       => p_attribute_rec.lov_function_name,
          p_return_type             => p_attribute_rec.return_type,
          p_max_value_flag          => p_attribute_rec.max_value_flag,
          p_name                    => p_attribute_rec.name,
          p_description             => p_attribute_rec.description,
          p_short_name              => p_attribute_rec.short_name,


	      p_display_style	    => p_attribute_rec.display_style,
          p_character_width	    => p_attribute_rec.character_width,
          p_decimal_points    	    => p_attribute_rec.decimal_points,
          p_no_of_lines		    => p_attribute_rec.no_of_lines,
          p_expose_to_partner_flag  => p_attribute_rec.expose_to_partner_flag,
          p_value_extn_return_type  => p_attribute_rec.value_extn_return_type,
	  p_enable_matching_flag    => p_attribute_rec.enable_matching_flag,
	  p_performance_flag	    => p_attribute_rec.performance_flag,
	  p_additive_flag	    => p_attribute_rec.additive_flag,
	  p_sequence_number	    => l_sequence_number

	  );
Line: 767

     ROLLBACK TO UPDATE_Attribute_PVT;
Line: 777

     ROLLBACK TO UPDATE_Attribute_PVT;
Line: 787

     ROLLBACK TO UPDATE_Attribute_PVT;
Line: 799

End Update_Attribute;
Line: 802

PROCEDURE Delete_Attribute(
     p_api_version_number        IN   NUMBER
    ,p_init_msg_list             IN   VARCHAR2     := FND_API.G_FALSE
    ,p_commit                    IN   VARCHAR2     := FND_API.G_FALSE
    ,p_validation_level          IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL
    ,x_return_status             OUT NOCOPY  VARCHAR2
    ,x_msg_count                 OUT NOCOPY  NUMBER
    ,x_msg_data                  OUT NOCOPY  VARCHAR2
    ,p_attribute_id              IN   NUMBER
    ,p_object_version_number     IN   NUMBER
    )

 IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Attribute';
Line: 822

l_delete_flag	            VARCHAR2(1):='Y';
Line: 825

   select name
   from pv_attributes_vl
   where attribute_id = pc_attribute_id;
Line: 830

   select distinct entity
   from pv_enty_attr_values
   where attribute_id = pc_attribute_id;
Line: 835

   select  distinct rules.process_rule_name
   from pv_enty_select_criteria criteria,pv_process_rules_vl rules
   where criteria.attribute_id= pc_attribute_id
         and criteria.process_rule_id= rules.process_rule_id;
Line: 841

	select resp.RESPONSIBILITY_NAME
	from pv_attrib_resp_mappings val, FND_RESPONSIBILITY_VL resp
	where
	val.attribute_id= pc_attribute_id and
	resp.application_id = 691 and
	val.entity_type = 'MANUAL_MATCHING' and
	resp.RESPONSIBILITY_ID = val.responsibility_id;
Line: 851

	select resp.RESPONSIBILITY_NAME, lkp.meaning
	from pv_attrib_resp_mappings val,
	FND_RESPONSIBILITY_VL resp,
	pv_lookups lkp
	where
	val.attribute_id= pc_attribute_id and
	resp.RESPONSIBILITY_ID = val.responsibility_id and
        resp.application_id = 691 and
	val.entity_type = lkp.lookup_code and
	lkp.lookup_type='PV_ATTR_RESP_MAPPING_ENTITIES';
Line: 864

   select  seeded_flag
   from pv_attributes_vl
   where attribute_id = pc_attribute_id;
Line: 869

   select  entity_attr_id
   from pv_entity_attrs
   where attribute_id = pc_attribute_id;
Line: 874

   select  attribute_usage_id
   from pv_attribute_usages
   where attribute_id = pc_attribute_id;
Line: 879

   select attr_code_id
   from PV_ATTRIBUTE_CODES_vl
   where attribute_id = pc_attribute_id;
Line: 888

      SAVEPOINT DELETE_Attribute_PVT;
Line: 930

				l_delete_flag :='N';
Line: 942

      if(l_delete_flag = 'N') then

			IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR))
			THEN
				FND_MESSAGE.Set_Name('PV', 'PV_ATTR_REFERENCED_SEEDED');
Line: 960

        l_delete_flag := 'N';
Line: 962

	FOR y IN (select meaning from pv_lookups
		    where lookup_type = 'PV_VALID_ENTY_VALUE_TYPES'
		    and lookup_code = x.entity
		   ) LOOP
		l_meaning := y.meaning;
Line: 982

      if(l_delete_flag = 'N') then

		  IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR))
	      THEN
              FND_MESSAGE.Set_Name('PV', 'PV_ATTR_REFERENCED_ENTITY');
Line: 1000

		l_delete_flag := 'N' ;
Line: 1005

     if(l_delete_flag = 'N') then

		 IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR))
		 THEN
			FND_MESSAGE.Set_Name('PV', 'PV_ATTR_REFERENCED_RULE');
Line: 1023

		l_delete_flag := 'N' ;
Line: 1028

     if(l_delete_flag = 'N') then

		 IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR))
		 THEN
			FND_MESSAGE.Set_Name('PV', 'PV_ATTR_REFERENCED_MATCHING');
Line: 1046

		l_delete_flag := 'N' ;
Line: 1051

	if(l_delete_flag = 'N') then

		 IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR))
		 THEN
			FND_MESSAGE.Set_Name('PV', 'PV_ATTR_REFERENCED_RESP_MAP');
Line: 1071

      PVX_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Line: 1080

		PVX_UTILITY_PVT.debug_message( 'Calling PV_ATTRIBUTE_CODE_PVT.Delete_Attribute_Code for : ' ||x.attr_code_id );
Line: 1083

	PV_ATTRIBUTE_CODE_PVT.Delete_Attribute_Code(
		 p_api_version_number   =>   p_api_version_number
		,p_init_msg_list	=>   p_init_msg_list
		,p_commit               =>   p_commit
		,p_validation_level     =>   p_validation_level

		,x_return_status        =>   x_return_status
		,x_msg_count            =>   x_msg_count
		,x_msg_data             =>   x_msg_data

		,p_attr_code_id         =>   x.attr_code_id
		,p_object_version_number=>   p_object_version_number
		);
Line: 1104

	PVX_UTILITY_PVT.debug_message( 'Calling PV_Attribute_Usage_PVT.Delete_Attribute_Usage for : ' ||x.attribute_usage_id );
Line: 1105

	PV_Attribute_Usage_PVT.Delete_Attribute_Usage(
		 p_api_version_number   =>   p_api_version_number
		,p_init_msg_list	=>   p_init_msg_list
		,p_commit               =>   p_commit
		,p_validation_level     =>   p_validation_level

		,x_return_status        =>   x_return_status
		,x_msg_count            =>   x_msg_count
		,x_msg_data             =>   x_msg_data

		,p_attribute_usage_id   =>   x.attribute_usage_id
		,p_object_version_number=>   p_object_version_number
		);
Line: 1128

	  PVX_UTILITY_PVT.debug_message( 'Calling PV_Entity_Attribute_Pvt.Delete_Entity_Attr for : ' ||x.entity_attr_id );
Line: 1130

	PV_Entity_Attribute_Pvt.Delete_Entity_Attr(
		 p_api_version_number   =>   p_api_version_number
		,p_init_msg_list	=>   p_init_msg_list
		,p_commit               =>   p_commit
		,p_validation_level     =>   p_validation_level

		,x_return_status        =>   x_return_status
		,x_msg_count            =>   x_msg_count
		,x_msg_data             =>   x_msg_data

		,p_entity_attr_id	=>   x.entity_attr_id
		,p_object_version_number=>   p_object_version_number
		);
Line: 1147

      PV_ATTRIBUTE_PKG.Delete_Row(
          p_ATTRIBUTE_ID  => p_ATTRIBUTE_ID);
Line: 1180

     ROLLBACK TO DELETE_Attribute_PVT;
Line: 1190

     ROLLBACK TO DELETE_Attribute_PVT;
Line: 1200

     ROLLBACK TO DELETE_Attribute_PVT;
Line: 1212

End Delete_Attribute;
Line: 1237

   SELECT ATTRIBUTE_ID
   FROM PV_ATTRIBUTES_B
   WHERE ATTRIBUTE_ID = p_ATTRIBUTE_ID
   AND object_version_number = p_object_version
   FOR UPDATE NOWAIT;
Line: 1345

   select  name from pv_attributes_tl;
Line: 1443

      IF p_attribute_rec.last_update_date = FND_API.g_miss_date OR p_attribute_rec.last_update_date IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1446

			 FND_MESSAGE.set_token('COLUMN','last_update_date');
Line: 1454

      IF p_attribute_rec.last_updated_by = FND_API.g_miss_num OR p_attribute_rec.last_updated_by IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1457

			 FND_MESSAGE.set_token('COLUMN','last_updated_by');
Line: 1487

      IF p_attribute_rec.last_update_login = FND_API.g_miss_num OR p_attribute_rec.last_update_login IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1490

			 FND_MESSAGE.set_token('COLUMN','last_update_login');
Line: 1543

      IF p_attribute_rec.last_update_date IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1546

			 FND_MESSAGE.set_token('COLUMN','last_update_date');
Line: 1554

      IF p_attribute_rec.last_updated_by IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1557

			 FND_MESSAGE.set_token('COLUMN','last_updated_by');
Line: 1587

      IF p_attribute_rec.last_update_login IS NULL THEN
         IF (FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW)) THEN
			 FND_MESSAGE.set_name('PV', 'PV_API_MISSING_REQ_COLUMN');
Line: 1590

			 FND_MESSAGE.set_token('COLUMN','last_update_login');
Line: 1723

      SELECT *
      FROM pv_attributes_vl
      WHERE attribute_id = p_attribute_rec.attribute_id;
Line: 1742

   IF p_attribute_rec.last_update_date = FND_API.g_miss_date THEN
      x_complete_rec.last_update_date := l_attribute_rec.last_update_date;
Line: 1747

   IF p_attribute_rec.last_updated_by = FND_API.g_miss_num THEN
      x_complete_rec.last_updated_by := l_attribute_rec.last_updated_by;
Line: 1762

   IF p_attribute_rec.last_update_login = FND_API.g_miss_num THEN
      x_complete_rec.last_update_login := l_attribute_rec.last_update_login;
Line: 1892

    ,p_validation_mode           IN   VARCHAR2     := JTF_PLSQL_API.g_update
    ,p_attribute_rec             IN   attribute_rec_type
    ,x_return_status             OUT NOCOPY  VARCHAR2
    ,x_msg_count                 OUT NOCOPY  NUMBER
    ,x_msg_data                  OUT NOCOPY  VARCHAR2

    )
 IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Validate_Attribute';
Line: 2041

    ,p_validation_mode           IN   VARCHAR2     := JTF_PLSQL_API.G_UPDATE
    )
IS
BEGIN

       --DBMS_output.put_line('validate_attribute_rec');