DBA Data[Home] [Help]

APPS.QP_VALIDATE_PRICING_ATTR SQL Statements

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

Line: 40

  SELECT *
  FROM   qp_list_lines
  WHERE  list_line_id = a_list_line_id;
Line: 46

  SELECT gsa_indicator
  FROM   qp_list_headers_b
  WHERE  list_header_id = a_list_header_id;
Line: 53

  select to_rltd_modifier_id
  from   qp_rltd_modifiers
  where  to_rltd_modifier_id = a_list_line_id
  and    rltd_modifier_grp_type = a_rltd_modifier_grp_type;
Line: 141

    IF p_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_UPDATE
    THEN

       IF  p_old_PRICING_ATTR_rec.product_attribute IS NOT NULL
       AND p_old_PRICING_ATTR_rec.product_attribute <> FND_API.G_MISS_CHAR
       AND p_old_PRICING_ATTR_rec.product_attribute <> p_PRICING_ATTR_rec.product_attribute        THEN
       DECLARE
       count_attr NUMBER;
Line: 150

       Select count(*) into count_attr
       from qp_pricing_attributes
       where list_line_id = p_PRICING_ATTR_rec.list_line_id;
Line: 156

        FND_MESSAGE.SET_NAME('QP','QP_CANNOT_UPDATE_PROD_ATTR');
Line: 173

	       Select count(*) into count_attr
	       from qp_pricing_attributes
	       where list_line_id = p_PRICING_ATTR_rec.list_line_id;
Line: 179

	        FND_MESSAGE.SET_NAME('QP','QP_CANNOT_UPDATE_PROD_VALUE');
Line: 559

select start_date_active, end_date_active , list_header_id
    into l_start_date_active, l_end_date_active, l_list_header_id
    from qp_list_lines
    where list_line_id = p_PRICING_ATTR_rec.list_line_id;
Line: 566

   oe_debug_pub.add('about to delete a request to check duplicate modifier list lines without product attribute');
Line: 567

QP_delayed_requests_pvt.Delete_Request
(   p_entity_code => QP_GLOBALS.G_ENTITY_ALL
,   p_entity_id    =>  p_PRICING_ATTR_rec.list_line_id
,   p_request_Type =>  QP_GLOBALS.G_DUPLICATE_MODIFIER_LINES
,   x_return_status		=> l_return_status
);
Line: 729

             SELECT h.pte_code, h.source_system_code
             INTO l_pte_code, l_ss_code
             FROM qp_list_headers_b h, qp_list_lines l
             WHERE l.list_line_id = p_PRICING_ATTR_rec.list_line_id
               AND l.list_header_id = h.list_header_id;
Line: 779

     	     select distinct uom_code
     	     into   l_dummy_2
     	     from   mtl_item_uoms_view
     	     where  ( organization_id = l_organization_id
			or       l_organization_id is NULL )
     	     and    uom_code =  p_PRICING_ATTR_rec.product_uom_code
     	     and    inventory_item_id =  to_number(p_PRICING_ATTR_rec.product_attr_value);
Line: 809

           select list_header_id into l_uom_list_header_id
           from qp_list_lines
           where list_line_id = p_PRICING_ATTR_rec.list_line_id;
Line: 831

     	     select distinct uom_code
     	     into   l_dummy_2
     	     from   mtl_units_of_measure_vl
     	     where  uom_code =  p_PRICING_ATTR_rec.product_uom_code;
Line: 958

  	   select count(*)
	   into   l_count
	   from   qp_rltd_modifiers
	   where  to_rltd_modifier_id = p_PRICING_ATTR_rec.list_line_id;
Line: 1045

  /* Select the Primary line type of the current record   */

      BEGIN

	    SELECT LIST_LINE_TYPE_CODE
	    INTO   l_primary_list_line_type_code
	    FROM   QP_LIST_LINES
	    WHERE  LIST_LINE_ID = ( select from_rltd_modifier_id
							 from qp_rltd_modifiers
	                               where to_rltd_modifier_id
							 = p_PRICING_ATTR_rec.list_line_id);
Line: 1284

		 SELECT COUNT(*)
		 INTO   l_no_pricing_attr
		 FROM   QP_PRICING_ATTRIBUTES
		 WHERE  LIST_LINE_ID = p_PRICING_ATTR_rec.list_line_id
		 AND    PRICING_ATTRIBUTE_CONTEXT <> 'VOLUME';
Line: 1536

    IF  p_PRICING_ATTR_rec.last_updated_by IS NOT NULL AND
        (   p_PRICING_ATTR_rec.last_updated_by <>
            p_old_PRICING_ATTR_rec.last_updated_by OR
            p_old_PRICING_ATTR_rec.last_updated_by IS NULL )
    THEN
        IF NOT QP_Validate.Last_Updated_By(p_PRICING_ATTR_rec.last_updated_by) THEN
            x_return_status := FND_API.G_RET_STS_ERROR;
Line: 1546

    IF  p_PRICING_ATTR_rec.last_update_date IS NOT NULL AND
        (   p_PRICING_ATTR_rec.last_update_date <>
            p_old_PRICING_ATTR_rec.last_update_date OR
            p_old_PRICING_ATTR_rec.last_update_date IS NULL )
    THEN
        IF NOT QP_Validate.Last_Update_Date(p_PRICING_ATTR_rec.last_update_date) THEN
            x_return_status := FND_API.G_RET_STS_ERROR;
Line: 1556

    IF  p_PRICING_ATTR_rec.last_update_login IS NOT NULL AND
        (   p_PRICING_ATTR_rec.last_update_login <>
            p_old_PRICING_ATTR_rec.last_update_login OR
            p_old_PRICING_ATTR_rec.last_update_login IS NULL )
    THEN
        IF NOT QP_Validate.Last_Update_Login(p_PRICING_ATTR_rec.last_update_login) THEN
            x_return_status := FND_API.G_RET_STS_ERROR;
Line: 1686

    IF  p_PRICING_ATTR_rec.program_update_date IS NOT NULL AND
        (   p_PRICING_ATTR_rec.program_update_date <>
            p_old_PRICING_ATTR_rec.program_update_date OR
            p_old_PRICING_ATTR_rec.program_update_date IS NULL )
    THEN
        IF NOT QP_Validate.Program_Update_Date(p_PRICING_ATTR_rec.program_update_date) THEN
            x_return_status := FND_API.G_RET_STS_ERROR;
Line: 1909

PROCEDURE Entity_Delete
(   x_return_status                 OUT NOCOPY VARCHAR2
,   p_PRICING_ATTR_rec              IN  QP_Modifiers_PUB.Pricing_Attr_Rec_Type
)
IS
l_return_status               VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
Line: 1917

oe_debug_pub.add('BEGIN Entity_Delete in QPXLPRAB');
Line: 1934

oe_debug_pub.add('END Entity_Delete in QPXLPRAB');
Line: 1954

            ,   'Entity_Delete'
            );
Line: 1958

END Entity_Delete;
Line: 1977

select a.list_line_id col1, b.list_line_id col2
from qp_pricing_attributes a, qp_pricing_attributes b, qp_list_lines c,
        qp_list_lines c1
where   a.list_line_id = l_List_Line_ID
and b.list_line_id <> l_List_Line_ID
and b.product_attribute_context = a.product_attribute_context
and b.product_attribute = a.product_attribute
and b.product_attr_value = a.product_attr_value
and b.pricing_attr_value_from Is Null
and a.pricing_attr_value_from Is Null
and nvl(Decode(b.pricing_attribute_context,'VOLUME',null),' ') =
                nvl(Decode(a.pricing_attribute_context,'VOLUME',null),' ')
and (nvl( b.product_uom_code,' ') = nvl(a.product_uom_code,' ')
        Or (a.pricing_attribute_context = 'VOLUME' Or b.pricing_attribute_context = 'VOLUME' ))
and (nvl(b.pricing_attribute,' ') = nvl(a.pricing_attribute,' ')
        Or (a.pricing_attribute_context = 'VOLUME' Or b.pricing_attribute_context = 'VOLUME' ))
and (nvl(b.pricing_attr_value_from,0) = nvl(a.pricing_attr_value_from,0)
        Or (a.pricing_attribute_context = 'VOLUME' Or b.pricing_attribute_context = 'VOLUME' ))
and (nvl(b.pricing_attr_value_to,0) = nvl(a.pricing_attr_value_to,0)
        Or (a.pricing_attribute_context = 'VOLUME' Or b.pricing_attribute_context = 'VOLUME' ))
and (nvl(b.comparison_operator_code,' ') = nvl(a.comparison_operator_code,' ')
        Or (a.pricing_attribute_context = 'VOLUME' Or b.pricing_attribute_context = 'VOLUME' ))
and a.list_line_id = c.list_line_id
and b.list_line_id = c1.list_line_id
and c.modifier_level_code = c1.modifier_level_code
and c.automatic_flag = c1.automatic_flag
and c1.list_header_id = p_List_Header_ID
and c.list_header_id = p_List_Header_ID
group by a.list_line_id, b.list_line_id
having count(b.list_line_id ) = ( select count(*)
                                                        from qp_pricing_attributes
                                                        where list_line_id = l_List_Line_ID)
and count(b.list_line_id) = ( select count(*)
                                             from qp_pricing_attributes
                                                where list_line_id = b.list_line_id)  ;
Line: 2015

select c.list_line_id col1, c1.list_line_id col2
from qp_list_lines c, qp_list_lines c1
where   c.list_line_id = l_List_Line_ID
and c1.list_line_id <> l_List_Line_ID
and c.list_line_type_code = c1.list_line_type_code
and c.modifier_level_code = c1.modifier_level_code
and c.automatic_flag = c1.automatic_flag
and c1.list_header_id = p_List_Header_ID
and c.list_header_id = p_List_Header_ID
and not exists (select list_line_id
                from qp_pricing_attributes
                where list_line_id = c1.list_line_id)
group by c.list_line_id, c1.list_line_id;
Line: 2053

Select count(*) into l_org_line from qp_qualifiers where list_line_id = rec.col1;
Line: 2055

Select count(*) into l_other_line from qp_qualifiers where list_line_id = rec.col2;
Line: 2065

       select qualifier_id qual_id, list_header_id hdr_id from qp_qualifiers
       where list_line_id = l_list_id;
Line: 2073

       Select count(*) into CT_DUPLI_QUAL
       from qp_qualifiers q1, qp_qualifiers q2
       where q1.qualifier_id = rec1.qual_id
         and q2.list_line_id = rec.col2
         and nvl(q1.qualifier_grouping_no, 0) = nvl(q2.qualifier_grouping_no, 0)
         and q1.qualifier_context = q2.qualifier_context
         and q1.qualifier_attribute = q2.qualifier_attribute
         and nvl(q1.qualifier_attr_value,' ') = nvl(q2.qualifier_attr_value,' ')
         and nvl(q1.qualifier_attr_value_to,' ') = nvl(q2.qualifier_attr_value_to,' ')
         and nvl(q1.comparison_operator_code,' ') = nvl(q2.comparison_operator_code,' ');
Line: 2102

            SELECT start_date_active, end_date_active
            into  l_sdate, l_edate
            from qp_list_lines
            where list_line_id = rec.col2;
Line: 2162

Select count(*) into l_org_line from qp_qualifiers where list_line_id = rec.col1;
Line: 2164

Select count(*) into l_other_line from qp_qualifiers where list_line_id = rec.col2;
Line: 2174

       select qualifier_id qual_id, list_header_id hdr_id from qp_qualifiers
       where list_line_id = l_list_id;
Line: 2182

      Select count(*) into CT_DUPLI_QUAL
      from qp_qualifiers q1, qp_qualifiers q2
      where q1.qualifier_id = rec1.qual_id
         and q2.list_line_id = rec.col2
         and nvl(q1.qualifier_grouping_no, 0) = nvl(q2.qualifier_grouping_no, 0)
         and q1.qualifier_context = q2.qualifier_context
         and q1.qualifier_attribute = q2.qualifier_attribute
         and nvl(q1.qualifier_attr_value,' ') = nvl(q2.qualifier_attr_value,' ')
         and nvl(q1.qualifier_attr_value_to,' ') = nvl(q2.qualifier_attr_value_to,' ')
         and nvl(q1.comparison_operator_code,' ') = nvl(q2.comparison_operator_code,' ');
Line: 2212

            SELECT start_date_active, end_date_active
            into  l_sdate, l_edate
            from qp_list_lines
            where list_line_id = rec.col2;