DBA Data[Home] [Help]

APPS.QP_LIST_HEADERS_PVT SQL Statements

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

Line: 48

    if l_PRICE_LIST_rec.operation in (QP_GLOBALS.G_OPR_CREATE, QP_GLOBALS.G_OPR_UPDATE)
    --and l_control_rec.called_from_ui = 'N' --this is not true for price locking API call
    and l_PRICE_LIST_rec.list_source_code IS NOT NULL
    and l_PRICE_LIST_rec.global_flag = 'N'
    and nvl(QP_SECURITY.security_on, 'N') = 'N' then
      l_PRICE_LIST_rec.global_flag := 'Y';
Line: 68

    ELSIF l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_UPDATE
    OR    l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_DELETE
    THEN

        l_PRICE_LIST_rec.db_flag := FND_API.G_TRUE;
Line: 101

          SELECT pte_code, source_system_code
          INTO   l_saved_pte_code, l_saved_source_system_code
          FROM   qp_list_headers_b
          WHERE  list_header_id = l_PRICE_LIST_rec.list_header_id;
Line: 130

   IF ( l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_UPDATE
      or l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_CREATE
      or l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_DELETE ) THEN

    IF  l_control_rec.default_attributes
    OR  l_control_rec.change_attributes
    THEN

        IF p_validation_level > FND_API.G_VALID_LEVEL_NONE THEN

            QP_Validate_Price_List.Attributes
            (   x_return_status               => l_return_status
            ,   p_PRICE_LIST_rec              => l_PRICE_LIST_rec
            ,   p_old_PRICE_LIST_rec          => l_old_PRICE_LIST_rec
            );
Line: 199

        IF l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

            QP_Validate_Price_List.Entity_Delete
            (   x_return_status               => l_return_status
            ,   p_PRICE_LIST_rec              => l_PRICE_LIST_rec
            );
Line: 229

        IF l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

            FND_MESSAGE.SET_NAME('QP', 'QP_CANNOT_DELETE_PRICE_LIST');
Line: 236

            /*QP_Price_List_Util.Delete_Row
            (   p_list_header_id              => l_PRICE_LIST_rec.list_header_id
            );*/
Line: 244

            l_PRICE_LIST_rec.last_update_date := SYSDATE;
Line: 245

            l_PRICE_LIST_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 246

            l_PRICE_LIST_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 248

            IF l_PRICE_LIST_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN

                QP_Price_List_Util.Update_Row (l_PRICE_LIST_rec);
Line: 257

                QP_Price_List_Util.Insert_Row (l_PRICE_LIST_rec);
Line: 265

   END IF; /* if operation is create, update or delete */
Line: 283

	   qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		(p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST,
	      p_entity_id => l_PRICE_LIST_rec.list_header_id,
	      x_return_status => l_return_status );
Line: 300

	   qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		(p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST,
	      p_entity_id => l_PRICE_LIST_rec.list_header_id,
	      x_return_status => l_return_status );
Line: 325

	   qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		(p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST,
	      p_entity_id => l_PRICE_LIST_rec.list_header_id,
	      x_return_status => l_return_status );
Line: 405

        ELSIF l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        OR    l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_DELETE
        THEN

            l_PRICE_LIST_LINE_rec.db_flag := FND_API.G_TRUE;
Line: 438

              SELECT pte_code, source_system_code
              INTO   l_saved_pte_code, l_saved_source_system_code
              FROM   qp_list_headers_b
              WHERE  list_header_id = l_PRICE_LIST_LINE_rec.list_header_id;
Line: 467

      IF ( l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        or l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_CREATE
        or l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_DELETE ) THEN

        IF  l_control_rec.default_attributes
        OR  l_control_rec.change_attributes
        THEN

            IF p_validation_level > FND_API.G_VALID_LEVEL_NONE THEN

                QP_Validate_Price_List_Line.Attributes
                (   x_return_status               => l_return_status
                ,   p_PRICE_LIST_LINE_rec         => l_PRICE_LIST_LINE_rec
                ,   p_old_PRICE_LIST_LINE_rec     => l_old_PRICE_LIST_LINE_rec
                );
Line: 521

            SELECT pte_code, source_system_code
            INTO   l_saved_pte_code, l_saved_source_system_code
            FROM   qp_list_headers_b
            WHERE  list_header_id = l_PRICE_LIST_LINE_rec.list_header_id;
Line: 565

            IF l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

                QP_Validate_Price_List_Line.Entity_Delete
                (   x_return_status               => l_return_status
                ,   p_PRICE_LIST_LINE_rec         => l_PRICE_LIST_LINE_rec
                );
Line: 594

            IF l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

                QP_Price_List_Line_Util.Delete_Row
                (   p_list_line_id                => l_PRICE_LIST_LINE_rec.list_line_id
                );
Line: 604

                l_PRICE_LIST_LINE_rec.last_update_date := SYSDATE;
Line: 605

                l_PRICE_LIST_LINE_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 606

                l_PRICE_LIST_LINE_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 608

                IF l_PRICE_LIST_LINE_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN

                    QP_Price_List_Line_Util.Update_Row (l_PRICE_LIST_LINE_rec);
Line: 617

                    QP_Price_List_Line_Util.Insert_Row (l_PRICE_LIST_LINE_rec);
Line: 645

				select QP_RLTD_MODIFIERS_S.nextval
				into   l_rltd_modifiers_s from dual;
Line: 648

                                QP_RLTD_MODIFIER_PVT.Insert_Row(
                                l_rltd_modifiers_s
			       , l_PRICE_LIST_LINE_rec.creation_date
                               , l_PRICE_LIST_LINE_rec.created_by
                               , l_price_list_line_rec.last_update_date
                               , l_price_list_line_rec.last_updated_by
                               , l_price_list_line_rec.last_update_login
                               , l_price_list_line_rec.rltd_modifier_group_no
                               , l_price_list_line_rec.from_rltd_modifier_id
                               , l_price_list_line_rec.list_line_id
                               , 'PRICE BREAK'
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               , null
                               );
Line: 682

                 p_request_type =>QP_GLOBALS.G_UPDATE_LINE_QUAL_IND,
                 x_return_status => l_return_status);
Line: 693

       END IF; /* if operation is create, update or delete */
Line: 714

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 719

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 734

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 739

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 764

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 769

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICE_LIST_LINE_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 885

        ELSIF l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        OR    l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_DELETE
        THEN

            l_QUALIFIERS_rec.db_flag := FND_API.G_TRUE;
Line: 918

              SELECT h.pte_code, h.source_system_code, h.list_type_code
              INTO   l_saved_pte_code, l_saved_source_system_code,
                     l_list_type_code
              FROM   qp_list_headers_b h, qp_qualifiers q
              WHERE  h.list_header_id = q.list_header_id
              AND    q.qualifier_id = l_QUALIFIERS_rec.qualifier_id;
Line: 949

      IF ( l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        or l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_CREATE
        or l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_DELETE ) THEN

        IF  l_control_rec.default_attributes
        OR  l_control_rec.change_attributes
        THEN

            IF p_validation_level > FND_API.G_VALID_LEVEL_NONE THEN

                QP_Validate_Qualifiers.Attributes
                (   x_return_status               => l_return_status
                ,   p_QUALIFIERS_rec              => l_QUALIFIERS_rec
                ,   p_old_QUALIFIERS_rec          => l_old_QUALIFIERS_rec
                );
Line: 1005

            SELECT pte_code, source_system_code, list_type_code
            INTO   l_saved_pte_code, l_saved_source_system_code,
                   l_list_type_code
            FROM   qp_list_headers_b
            WHERE  list_header_id = l_QUALIFIERS_rec.list_header_id;
Line: 1052

            IF l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

                QP_Validate_Qualifiers.Entity_Delete
                (   x_return_status               => l_return_status
                ,   p_QUALIFIERS_rec              => l_QUALIFIERS_rec
                );
Line: 1083

			SELECT LIST_TYPE_CODE INTO l_list_type_code
				FROM QP_LIST_HEADERS_B WHERE
				LIST_HEADER_ID = l_QUALIFIERS_rec.LIST_HEADER_ID;
Line: 1100

				SELECT COUNT(*) INTO v_count FROM
				QP_QUALIFIERS WHERE
				LIST_HEADER_ID = l_QUALIFIERS_rec.list_header_id
				AND QUALIFIER_CONTEXT = 'MODLIST'
				AND QUALIFIER_ATTRIBUTE = 'QUALIFIER_ATTRIBUTE4';
Line: 1130

			if l_qualifiers_rec.operation <> QP_GLOBALS.G_OPR_DELETE
			then
				SELECT COUNT(*)
		  		INTO v_count
		  		FROM qp_secondary_price_lists_v
           			WHERE parent_price_list_id =
					l_qualifiers_rec.qualifier_attr_value;
Line: 1168

            IF l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

			IF l_QUALIFIERS_rec.QUALIFIER_CONTEXT = 'MODLIST' AND
				l_QUALIFIERS_rec.QUALIFIER_ATTRIBUTE =
						'QUALIFIER_ATTRIBUTE3' THEN
			--fix for bug 1501138 not allow deletion of coupon qualifiers

				oe_debug_pub.add('1501138 not allow delete qual');
Line: 1176

				FND_MESSAGE.SET_NAME('QP', 'QP_CANNOT_DELETE_THIS_QUAL');
Line: 1181

                QP_Qualifiers_Util.Delete_Row
                (   p_qualifier_id                => l_QUALIFIERS_rec.qualifier_id
                );
Line: 1190

                l_QUALIFIERS_rec.last_update_date := SYSDATE;
Line: 1191

                l_QUALIFIERS_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 1192

                l_QUALIFIERS_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1194

                IF l_QUALIFIERS_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN

                    QP_Qualifiers_Util.Update_Row (l_QUALIFIERS_rec);
Line: 1200

			QP_Qualifiers_Util.Update_Coupon_Row (l_QUALIFIERS_rec); ---Added for bug 7315016
Line: 1208

                    QP_Qualifiers_Util.Insert_Row (l_QUALIFIERS_rec);
Line: 1216

       END IF; /* if operation is create, update or delete */
Line: 1237

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_header_id,
	          x_return_status => l_return_status );
Line: 1242

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1247

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.qualifier_id,
	          x_return_status => l_return_status );
Line: 1262

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_header_id,
	          x_return_status => l_return_status );
Line: 1267

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1272

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.qualifier_id,
	          x_return_status => l_return_status );
Line: 1297

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_header_id,
	          x_return_status => l_return_status );
Line: 1302

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1307

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_QUALIFIERS_rec.qualifier_id,
	          x_return_status => l_return_status );
Line: 1401

         SELECT RLTD_MODIFIER_GRP_TYPE
         INTO   l_rltd_modifier_grp_type
         FROM   qp_rltd_modifiers rm
         WHERE  rm.TO_RLTD_MODIFIER_ID = l_PRICING_ATTR_rec.list_line_id;
Line: 1453

        ELSIF l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        OR    l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_DELETE
        THEN
          oe_debug_pub.add('operation is update');
Line: 1492

              SELECT h.pte_code, h.source_system_code
              INTO   l_saved_pte_code, l_saved_source_system_code
              FROM   qp_list_headers_b h, qp_list_lines l
              WHERE  h.list_header_id = l.list_header_id
              AND    l.list_line_id = l_PRICING_ATTR_rec.list_line_id;
Line: 1521

      IF ( l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_UPDATE
        or l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_CREATE
        or l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_DELETE ) THEN

        IF  l_control_rec.default_attributes
        OR  l_control_rec.change_attributes
        THEN

            IF p_validation_level > FND_API.G_VALID_LEVEL_NONE THEN

                oe_debug_pub.add('validate the attributes');
Line: 1582

            SELECT h.pte_code, h.source_system_code
            INTO   l_saved_pte_code, l_saved_source_system_code
            FROM   qp_list_headers_b h, qp_list_lines l
            WHERE  h.list_header_id = l.list_header_id
            AND    l.list_line_id = l_PRICING_ATTR_rec.list_line_id;
Line: 1629

            IF l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

                QP_Validate_pll_pricing_attr.Entity_Delete
                (   x_return_status               => l_return_status
                ,   p_PRICING_ATTR_rec            => l_PRICING_ATTR_rec
                );
Line: 1667

            IF l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_DELETE THEN

                Qp_pll_pricing_attr_Util.Delete_Row
                (   p_pricing_attribute_id        => l_PRICING_ATTR_rec.pricing_attribute_id
                );
Line: 1677

                l_PRICING_ATTR_rec.last_update_date := SYSDATE;
Line: 1678

                l_PRICING_ATTR_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 1679

                l_PRICING_ATTR_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1681

                IF l_PRICING_ATTR_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN

                   oe_debug_Pub.add('before update row');
Line: 1684

                    Qp_pll_pricing_attr_Util.Update_Row (l_PRICING_ATTR_rec);
Line: 1691

                   oe_debug_pub.add('before insert row');
Line: 1693

                    Qp_pll_pricing_attr_Util.Insert_Row (l_PRICING_ATTR_rec);
Line: 1701

       END IF; /* if operation is create, update or delete */
Line: 1722

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1727

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1742

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1747

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1772

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_PRICE_LIST_LINE,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1777

 	       qp_delayed_requests_pvt.delete_reqs_for_deleted_entity
		    (p_entity_code => QP_GLOBALS.G_ENTITY_ALL,
	          p_entity_id => l_PRICING_ATTR_rec.list_line_id,
	          x_return_status => l_return_status );
Line: 1977

            ,p_delete        => FND_API.G_TRUE
            ,x_return_status => l_return_status
            );
Line: 2029

            ,p_delete        => FND_API.G_TRUE
            ,x_return_status => l_return_status
            );
Line: 2260

	  select 'Y' into l_qual_exists
	  from qp_qualifiers
	  where list_header_id = x_PRICE_LIST_rec.list_header_id
	   and qualifier_context = 'ORDER'
	   and qualifier_attribute = 'QUALIFIER_ATTRIBUTE5'
	   and qualifier_attr_value = x_PRICE_LIST_rec.orig_system_header_ref;