DBA Data[Home] [Help]

APPS.OE_PRICING_CONT_PVT SQL Statements

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

Line: 8

FUNCTION Check_Delete_Agreement( p_Price_List_id IN NUMBER)
RETURN BOOLEAN;
Line: 60

    ELSIF (l_Contract_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR    l_Contract_rec.operation = OE_GLOBALS.G_OPR_DELETE )
    THEN

        l_Contract_rec.db_flag := FND_API.G_TRUE;
Line: 93

IF ( l_contract_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR l_contract_rec.operation = OE_GLOBALS.G_OPR_CREATE
    OR l_contract_rec.operation = OE_GLOBALS.G_OPR_DELETE)  THEN

    --  Attribute level validation.

    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_Validate_Contract.Attributes
            (   x_return_status               => l_return_status
            ,   p_Contract_rec                => l_Contract_rec
            ,   p_old_Contract_rec            => l_old_Contract_rec
            );
Line: 172

        IF l_Contract_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

            OE_Validate_Contract.Entity_Delete
            (   x_return_status               => l_return_status
            ,   p_Contract_rec                => l_Contract_rec
            );
Line: 201

        IF l_Contract_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

            OE_Contract_Util.Delete_Row
            (   p_pricing_contract_id         => l_Contract_rec.pricing_contract_id
            );
Line: 211

            l_Contract_rec.last_update_date := SYSDATE;
Line: 212

            l_Contract_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 213

            l_Contract_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 215

            IF l_Contract_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN

                OE_Contract_Util.Update_Row (l_Contract_rec);
Line: 224

                OE_Contract_Util.Insert_Row (l_Contract_rec);
Line: 298

l_Agreement_Delete_Flag  BOOLEAN;
Line: 299

l_Agreement_Lines_Delete_Flag  BOOLEAN;
Line: 354

    ELSIF l_Agreement_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR    l_Agreement_rec.operation = OE_GLOBALS.G_OPR_DELETE
    THEN

        l_Agreement_rec.db_flag := FND_API.G_TRUE;
Line: 390

IF ( l_agreement_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR l_agreement_rec.operation = OE_GLOBALS.G_OPR_CREATE
    OR l_agreement_rec.operation = OE_GLOBALS.G_OPR_DELETE)  THEN

    --  Attribute level validation.

    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_Validate_Agreement.Attributes
            (   x_return_status               => l_return_status
            ,   p_Agreement_rec               => l_Agreement_rec
            ,   p_old_Agreement_rec           => l_old_Agreement_rec
            );
Line: 474

        IF l_Agreement_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

            OE_Validate_Agreement.Entity_Delete
            (   x_return_status               => l_return_status
            ,   p_Agreement_rec               => l_Agreement_rec
            );
Line: 506

        IF l_Agreement_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN


        /* Check the price List associated with an agreement */
      /* Bug 2321498 Commented following code as price List should not be deleted */
   /*
    oe_debug_pub.add('Geresh Before Check Delete Agreement');
Line: 513

		  if NOT ( Check_Delete_Agreement( p_Price_List_id => l_Agreement_rec.price_list_id )) THEN
				l_Price_List_Exists_Flag := FALSE;
Line: 520

     oe_debug_pub.add('Geresh After Check Delete Agreement'); */
Line: 528

			l_Agreement_Delete_Flag := FALSE;
Line: 530

			l_Agreement_Delete_Flag := TRUE;
Line: 535

			l_Agreement_Lines_Delete_Flag := FALSE;
Line: 537

			l_Agreement_Lines_Delete_Flag := TRUE;
Line: 540

            OE_Agreement_Util.Delete_Row
            (         x_return_status              => l_return_status
                  ,   p_agreement_id                => l_Agreement_rec.agreement_id
		  ,   p_Price_List_Exists_Flag     => l_Price_list_Exists_Flag
		  ,   p_Agreement_Delete_Flag      => l_Agreement_Delete_Flag
		  ,   p_Agreement_Lines_Delete_Flag      => l_Agreement_Lines_Delete_Flag
            );
Line: 559

            l_Agreement_rec.last_update_date := SYSDATE;
Line: 560

            l_Agreement_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 561

            l_Agreement_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 563

            IF l_Agreement_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN

                OE_Agreement_Util.Update_Row (l_Agreement_rec);
Line: 571

		select list_type_code into l_price_list_type_code from
				qp_list_headers_vl where
				list_header_id = l_Agreement_rec.price_list_id;
Line: 584

				oe_debug_pub.add('before update create_agr_qual');
Line: 593

				oe_debug_pub.add('after update create_agr_qual');
Line: 610

                OE_Agreement_Util.Insert_Row (l_Agreement_rec);
Line: 616

				select list_type_code into l_price_list_type_code from
				qp_list_headers_vl where
				list_header_id = l_Agreement_rec.price_list_id;
Line: 630

					oe_debug_pub.add('before insert create_agr_qual');
Line: 638

					oe_debug_pub.add('after insert create_agr_qual');
Line: 655

		select list_type_code into l_price_list_type_code from
				qp_list_headers_vl where
				list_header_id = l_Agreement_rec.price_list_id;
Line: 804

    ELSIF l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR    l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_DELETE
    THEN

        l_Price_LHeader_rec.db_flag := FND_API.G_TRUE;
Line: 840

IF ( l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_CREATE
    OR l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_DELETE)  THEN
    --  Attribute level validation.

    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_Validate_Price_List.Attributes
            (   x_return_status               => l_return_status
            ,   p_Price_LIST_rec           => l_Price_LHeader_rec
            ,   p_old_Price_LIST_rec       => l_old_Price_LHeader_rec
            );
Line: 915

        IF l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

            OE_Validate_Price_List.Entity_Delete
            (   x_return_status               => l_return_status
            ,   p_Price_list_rec           => l_Price_LHeader_rec
            );
Line: 944

        IF l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

            OE_Price_List_Util.Delete_Row
           ( p_name			    => l_Price_LHeader_rec.name,
             p_price_list_id               => l_Price_LHeader_rec.price_list_id
            );
Line: 955

            l_Price_LHeader_rec.last_update_date := SYSDATE;
Line: 956

            l_Price_LHeader_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 957

            l_Price_LHeader_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 959

            IF l_Price_LHeader_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN

                OE_Price_List_Util.Update_Row (l_Price_LHeader_rec);
Line: 968

                OE_Price_List_Util.Insert_Row (l_Price_LHeader_rec);
Line: 1088

        ELSIF l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_UPDATE
        OR    l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_DELETE
        THEN

            l_Price_LLine_rec.db_flag := FND_API.G_TRUE;
Line: 1122

IF ( l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_UPDATE
    OR l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_CREATE
    OR l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_DELETE)  THEN
        --  Attribute level validation.

        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_Validate_Price_List_Line.Attributes
                (   x_return_status               => l_return_status
                ,   p_PRICE_LIST_LINE_rec             => l_Price_LLine_rec
                ,   p_old_PRICE_LIST_LINE_rec         => l_old_Price_LLine_rec
                );
Line: 1198

            IF l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

                OE_Validate_Price_List_Line.Entity_Delete
                (   x_return_status               => l_return_status
                ,   p_PRICE_LIST_LINE_rec             => l_Price_LLine_rec
                );
Line: 1227

            IF l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

                OE_Price_List_Line_Util.Delete_Row
                (   p_price_list_line_id          => l_Price_LLine_rec.price_list_line_id
                );
Line: 1237

                l_Price_LLine_rec.last_update_date := SYSDATE;
Line: 1238

                l_Price_LLine_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 1239

                l_Price_LLine_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1241

                IF l_Price_LLine_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN

                    OE_Price_List_Line_Util.Update_Row (l_Price_LLine_rec);
Line: 1251

                    OE_Price_List_Line_Util.Insert_Row (l_Price_LLine_rec );
Line: 1401

        ELSIF l_Price_Break_rec.operation = OE_GLOBALS.G_OPR_UPDATE
        OR    l_Price_Break_rec.operation = OE_GLOBALS.G_OPR_DELETE
        THEN

            l_Price_Break_rec.db_flag := FND_API.G_TRUE;
Line: 1519

            IF l_Price_Break_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN
/*
                OE_Validate_Price_Break.Entity_Delete
                (   x_return_status               => l_return_status
                ,   p_Price_Break_rec             => l_Price_Break_rec
                );
Line: 1552

            IF l_Price_Break_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

			NULL;
Line: 1555

/*		OE_Price_Break_Util.Delete_Row
	   (   p_discount_line_id     => l_Price_Break_rec.discount_line_id
	      , p_method_type_code     => l_Price_Break_rec.method_type_code
	      ,   p_price_break_high     => l_Price_Break_rec.price_break_high
	      ,   p_price_break_low      => l_Price_Break_rec.price_break_low
	   ) ;
Line: 1569

                l_Price_Break_rec.last_update_date := SYSDATE;
Line: 1570

                l_Price_Break_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 1571

                l_Price_Break_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1573

                IF l_Price_Break_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN

			NULL;
Line: 1577

                  OE_Price_Break_Util.Update_Row (l_Price_Break_rec);
Line: 1584

                    OE_Price_Break_Util.Insert_Row (l_Price_Break_rec);
Line: 1784

NO_UPDATE_PRIVILEGE           EXCEPTION;
Line: 1813

    IF p_Agreement_rec.operation = QP_GLOBALS.G_OPR_UPDATE THEN
       -- Check the security privilege
       IF p_Agreement_rec.price_list_id IS NOT NULL
       THEN
          IF QP_security.check_function( p_function_name => QP_Security.G_FUNCTION_UPDATE,
                                       p_instance_type => QP_Security.G_PRICELIST_OBJECT,
                                       p_instance_pk1  => p_Agreement_rec.price_list_id) = 'F'
          THEN
            fnd_message.set_name('QP', 'QP_NO_PRIVILEGE');
Line: 1825

            RAISE NO_UPDATE_PRIVILEGE;
Line: 2331

    WHEN NO_UPDATE_PRIVILEGE THEN
        x_return_status := FND_API.G_RET_STS_SUCCESS;
Line: 2909

FUNCTION Check_Delete_Agreement( p_Price_List_id IN NUMBER)
RETURN BOOLEAN

IS
 l_price_list_id NUMBER;
Line: 2917

		SELECT count(*)
		into l_count
		from oe_agreements_b
		where price_list_id = p_Price_List_id;
Line: 2922

    oe_debug_pub.add('Geresh In Check Delete Agreement' || p_Price_List_Id);
Line: 2939

    oe_debug_pub.add('Geresh In No Data Found Check Delete Agreement' || p_Price_List_Id);
Line: 2943

    oe_debug_pub.add('Geresh In No Data Found Check Delete Agreement' || p_Price_List_Id);
Line: 2947

END Check_Delete_Agreement;
Line: 2961

   SELECT agreement_id into
   l_agreement_id
   from oe_order_lines
   where agreement_id = p_Agreement_id;
Line: 2974

           Select 'N' into l_exist from dual where
           not exists (select 1 from oe_order_lines
           where agreement_id = p_Agreement_id);
Line: 3009

   SELECT agreement_id into
   l_agreement_id
   from oe_order_headers
   where agreement_id = p_Agreement_id;
Line: 3023

  Select 'N' into l_exist from dual where
           not exists (select 1 from oe_order_headers
           where agreement_id = p_Agreement_id);
Line: 3047

/*procedure added by spgopal 08/14/00 for duplication of qualifier on price list updates*/

/*
PROCEDURE Create_Agreement_Qualifier
			(p_list_header_id IN NUMBER,
			 p_old_list_header_id IN NUMBER,
			 p_Agreement_id IN NUMBER,
			 x_return_status OUT NOCOPY VARCHAR2); -- file.sql.39 change
Line: 3133

	elsif p_operation = OE_GLOBALS.G_OPR_UPDATE then
			oe_debug_pub.add('in if update'||p_operation);
Line: 3139

				delete from qp_qualifiers where
				list_header_id = p_old_list_header_id
				and qualifier_context = 'CUSTOMER'
				and qualifier_attribute = 'QUALIFIER_ATTRIBUTE7'
				and qualifier_attr_value = p_agreement_id;
Line: 3152

			select count(list_header_id) into l_qual_count
			from qp_qualifiers where
			list_header_id = p_list_header_id
			and qualifier_context = 'CUSTOMER'
			and qualifier_attribute = 'QUALIFIER_ATTRIBUTE7'
			and qualifier_attr_value = p_agreement_id;