DBA Data[Home] [Help]

APPS.IEX_STRY_UTL_PUB SQL Statements

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

Line: 72

  **Appends to a message  the name of the object anf the operation (insert, update ,delete)
*/
PROCEDURE AddfailMsg
  ( p_object	    IN	VARCHAR2,
    p_operation 	IN	VARCHAR2 ) IS

BEGIN
      fnd_message.set_name('IEX', 'IEX_FAILED_OPERATION');
Line: 98

    SELECT strategy_template_id
    FROM   iex_strategies
    WHERE  strategy_id =c_strategy_id;
Line: 105

     select sxref.strategy_temp_id TEMPLATE_ID,
            sxref.work_item_temp_id WORK_ITEM_TEMPLATE_ID,
            sxref.work_item_order ORDER_BY
           ,nvl(swit.status_code,'NOTCREATED') STATUS
           ,swit.work_item_id     WORK_ITEM_ID
           ,swit.strategy_id      STRATEGY_ID
     from iex_strategy_work_temp_xref sxref
          ,iex_strategy_work_items swit
     where sxref.strategy_temp_id =c_template_id
     and   swit.work_item_template_id(+)  =sxref.work_item_temp_id
     and   swit.strategy_id(+) =c_strategy_id
     union all
     select susit.strategy_template_id TEMPLATE_ID,
            susit.work_item_temp_id WORK_ITEM_TEMPLATE_ID,
            susit.work_item_order ORDER_BY
           ,nvl(swit.status_code,'NOTCREATED') STATUS
           ,swit.work_item_id     WORK_ITEM_ID
          ,susit.strategy_id      STRATEGY_ID
     from iex_strategy_user_items susit
          ,iex_strategy_work_items swit
     where susit.strategy_id =c_strategy_id
     and   swit.work_item_template_id(+)  =susit.work_item_temp_id
     and   swit.strategy_id(+) =c_strategy_id
     order by order_by;
Line: 239

   update all the work_items status to  depending on the status passed
   update the stragey status to  depending on the status passed
**/

PROCEDURE CLOSE_STRY_AND_WITEMS
                          (p_api_version   IN  NUMBER,
                           p_commit        IN VARCHAR2          DEFAULT    FND_API.G_TRUE,
                           p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
                           p_strategy_id   IN NUMBER,
                           p_status        IN VARCHAR2,
                           x_return_status OUT NOCOPY VARCHAR2,
                           x_msg_count     OUT NOCOPY NUMBER,
                           x_msg_data      OUT NOCOPY VARCHAR2
                           )IS

  l_api_version      CONSTANT NUMBER   := 1.0;
Line: 267

  SELECT work_item_id, object_version_number
  FROM   iex_strategy_work_items
  WHERE  strategy_id = p_strategy_id
  and    status_code IN ('OPEN','PRE-WAIT');  -- Changed for bug#7703351 by PNAVEENK on 22-1-2009
Line: 338

           iex_debug_pub.logMessage('CLOSE_STRY_AND_WITEMS: ' || 'Before Calling IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items');
Line: 345

        IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items(
              P_Api_Version_Number         =>l_api_version_number,
              P_strategy_work_item_Rec     =>l_strategy_work_item_Rec,
              P_Init_Msg_List             =>FND_API.G_TRUE,
              p_commit                    =>FND_API.G_TRUE,
              p_validation_level          => FND_API.G_VALID_LEVEL_FULL,
              x_msg_count                  => l_msg_count,
              x_msg_data                   => l_msg_data,
              x_return_status              => l_return_status,
              XO_OBJECT_VERSION_NUMBER     =>l_object_version_number );
Line: 357

           iex_debug_pub.logMessage('CLOSE_STRY_AND_WITEMS: ' || 'After Calling IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items '||
                                           'and Status =>'||l_return_status);
Line: 362

                                   p_operation  =>  'UPDATE' );
Line: 371

       IEX_DEBUG_PUB.LogMessage('CLOSE_STRY_AND_WITEMS: ' || 'End of work items update ');
Line: 378

       select object_version_number INTO l_object_version_number
       FROM iex_strategies
       where strategy_id =p_strategy_id;
Line: 400

        iex_debug_pub.logMessage('CLOSE_STRY_AND_WITEMS: ' || 'Before Calling IEX_STRATEGY_PVT.Update_strategy');
Line: 407

     IEX_STRATEGY_PVT.Update_strategy(
              P_Api_Version_Number         =>l_api_version_number,
              P_strategy_Rec               =>l_strategy_Rec,
              P_Init_Msg_List             =>FND_API.G_TRUE,
              p_commit                    =>FND_API.G_TRUE,
              p_validation_level          => FND_API.G_VALID_LEVEL_FULL,
              x_msg_count                  => l_msg_count,
              x_msg_data                   => l_msg_data,
              x_return_status              => l_return_status,
              XO_OBJECT_VERSION_NUMBER     =>l_object_version_number );
Line: 419

           iex_debug_pub.logMessage('CLOSE_STRY_AND_WITEMS: ' || 'After Calling IEX_STRATEGY_PVT.Update_strategy '||
                                           'and Status =>'||l_return_status);
Line: 425

                                   p_operation  =>  'UPDATE' );
Line: 470

   update the stragey status to  depending on the status passed
**/

PROCEDURE CLOSE_STRATEGY
                          (p_api_version   IN  NUMBER,
                           p_commit        IN VARCHAR2  DEFAULT FND_API.G_FALSE,
                           p_init_msg_list IN  VARCHAR2 DEFAULT FND_API.G_FALSE,
                           p_strategy_id   IN NUMBER,
                           p_status        IN VARCHAR2,
                           x_return_status OUT NOCOPY VARCHAR2,
                           x_msg_count     OUT NOCOPY NUMBER,
                           x_msg_data      OUT NOCOPY VARCHAR2
                           )IS

  l_api_version       NUMBER   := 1.0;
Line: 496

  SELECT work_item_id, object_version_number
  FROM   iex_strategy_work_items
  WHERE  strategy_id = p_strategy_id;
Line: 556

       select object_version_number INTO l_object_version_number
       FROM iex_strategies
       where strategy_id =p_strategy_id;
Line: 578

        iex_debug_pub.logMessage('CLOSE_STRATEGY: ' || 'Before Calling IEX_STRATEGY_PVT.Update_strategy');
Line: 585

     IEX_STRATEGY_PVT.Update_strategy(
              P_Api_Version_Number        =>2.0,
              P_Init_Msg_List             =>FND_API.G_TRUE,
              p_commit                    =>FND_API.G_TRUE,
              p_validation_level          => FND_API.G_VALID_LEVEL_FULL,
              P_strategy_Rec              =>l_strategy_Rec,
              x_msg_count                 => l_msg_count,
              x_msg_data                  => l_msg_data,
              x_return_status             => l_return_status,
              XO_OBJECT_VERSION_NUMBER    =>l_object_version_number );
Line: 597

           iex_debug_pub.logMessage('CLOSE_STRATEGY: ' || 'After Calling IEX_STRATEGY_PVT.Update_strategy '||
                                           'and Status =>'||l_return_status);
Line: 603

                                   p_operation  =>  'UPDATE' );
Line: 642

   update all the work_item status to  depending on the status passed

**/

PROCEDURE UPDATE_WORK_ITEM
                          (p_api_version   IN  NUMBER,
                           p_commit        IN VARCHAR2          DEFAULT    FND_API.G_TRUE,
                           p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
                           p_work_item_id  IN NUMBER,
                           p_status        IN VARCHAR2,
                           x_return_status OUT NOCOPY VARCHAR2,
                           x_msg_count     OUT NOCOPY NUMBER,
                           x_msg_data      OUT NOCOPY VARCHAR2
                           )IS

  l_api_version      CONSTANT NUMBER   := 1.0;
Line: 658

  l_api_name VARCHAR2(100) := 'UPDATE_WORK_ITEM';
Line: 669

  SELECT object_version_number
  FROM   iex_strategy_work_items
  WHERE  work_item_id =p_work_item_id;
Line: 677

  SAVEPOINT	UPDATE_WORK_ITEM_PUB;
Line: 693

    IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'after init');
Line: 702

              IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'Required Parameter p_work_item_id is invalid');
Line: 711

        IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'after p_work_item_id check');
Line: 718

              IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'Required Parameter p_status is invalid');
Line: 727

        IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'after p_status check');
Line: 739

           iex_debug_pub.logMessage('UPDATE_WORK_ITEM: ' || 'Before Calling IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items');
Line: 743

           iex_debug_pub.logMessage('UPDATE_WORK_ITEM: ' || '---------------------------------');
Line: 746

        IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items(
              P_Api_Version_Number         =>l_api_version_number,
              P_strategy_work_item_Rec     =>l_strategy_work_item_Rec,
              P_Init_Msg_List             =>FND_API.G_TRUE,
              p_commit                    =>FND_API.G_TRUE,
              p_validation_level          => FND_API.G_VALID_LEVEL_FULL,
              x_msg_count                  => l_msg_count,
              x_msg_data                   => l_msg_data,
              x_return_status              => l_return_status,
              XO_OBJECT_VERSION_NUMBER     =>l_object_version_number );
Line: 758

           iex_debug_pub.logMessage('UPDATE_WORK_ITEM: ' || 'After Calling IEX_STRATEGY_WORK_ITEMS_PVT.Update_strategy_work_items '||
                                           'and Status =>'||l_return_status);
Line: 763

                                   p_operation  =>  'UPDATE' );
Line: 772

       IEX_DEBUG_PUB.LogMessage('UPDATE_WORK_ITEM: ' || 'End of work items update ');
Line: 789

	ROLLBACK TO UPDATE_WORK_ITEM_PUB;
Line: 795

	ROLLBACK TO UPDATE_WORK_ITEM_PUB;
Line: 801

	ROLLBACK TO UPDATE_WORK_ITEM_PUB;
Line: 808

END UPDATE_WORK_ITEM;
Line: 810

* update next work item in the strategy table
* when a work item is created
**/
PROCEDURE UPDATE_NEXT_WORK_ITEM
                          (p_api_version   IN  NUMBER,
                           p_commit        IN VARCHAR2          DEFAULT    FND_API.G_FALSE,
                           p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
                           p_work_item_id  IN NUMBER,
                           p_strategy_id   IN NUMBER,
                           x_return_status OUT NOCOPY VARCHAR2,
                           x_msg_count     OUT NOCOPY NUMBER,
                           x_msg_data      OUT NOCOPY VARCHAR2
                           ) IS

  l_api_version       NUMBER   := 1.0;
Line: 825

  l_api_name VARCHAR2(100) := 'UPDATE_NEXT_WORK_ITEM';
Line: 838

    SAVEPOINT	UPDATE_NEXT_WORK_ITEM_PUB;
Line: 859

              IEX_DEBUG_PUB.LogMessage('UPDATE_NEXT_WORK_ITEM: ' || 'Required Parameter p_strategy_id is invalid');
Line: 868

        IEX_DEBUG_PUB.LogMessage('UPDATE_NEXT_WORK_ITEM: ' || 'after p_strategy_id check');
Line: 875

              IEX_DEBUG_PUB.LogMessage('UPDATE_NEXT_WORK_ITEM: ' || 'Required Parameter p_work_item_id is invalid');
Line: 884

        IEX_DEBUG_PUB.LogMessage('UPDATE_NEXT_WORK_ITEM: ' || 'after p_work_item_id check');
Line: 890

       select object_version_number INTO l_object_version_number
       FROM iex_strategies
       where strategy_id =p_strategy_id;
Line: 897

            IEX_DEBUG_PUB.LogMessage('UPDATE_NEXT_WORK_ITEM: ' || 'Required Parameter p_stratgey_id is invalid');
Line: 912

        iex_debug_pub.logMessage('UPDATE_NEXT_WORK_ITEM: ' || 'Before Calling IEX_STRATEGY_PVT.Update_strategy');
Line: 916

        iex_debug_pub.logMessage('UPDATE_NEXT_WORK_ITEM: ' || '---------------------------------');
Line: 919

     IEX_STRATEGY_PVT.Update_strategy(
              P_Api_Version_Number        =>2.0,
              P_Init_Msg_List             =>FND_API.G_TRUE,
              p_commit                    =>FND_API.G_TRUE,
              p_validation_level          => FND_API.G_VALID_LEVEL_FULL,
              P_strategy_Rec              =>l_strategy_Rec,
              x_msg_count                 => l_msg_count,
              x_msg_data                  => l_msg_data,
              x_return_status             => l_return_status,
              XO_OBJECT_VERSION_NUMBER    =>l_object_version_number );
Line: 931

           iex_debug_pub.logMessage('UPDATE_NEXT_WORK_ITEM: ' || 'After Calling IEX_STRATEGY_PVT.Update_strategy '||
                                           'and Status =>'||l_return_status);
Line: 937

                                   p_operation  =>  'UPDATE' );
Line: 955

        ROLLBACK TO UPDATE_NEXT_WORK_ITEM_PUB;
Line: 960

        ROLLBACK TO UPDATE_NEXT_WORK_ITEM_PUB;
Line: 965

        ROLLBACK TO UPDATE_NEXT_WORK_ITEM_PUB;
Line: 972

END UPDATE_NEXT_WORK_ITEM;
Line: 987

   SELECT count(*) into x_work_item_done
          FROM   iex_strategy_work_items
   WHERE  strategy_id = p_strategy_id
          and status_code not in ('CANCELLED','COMPLETE');
Line: 1005

  select sysdate into r_date from dual;  -- default to sysdate;
Line: 1012

  select conversion_rate into l_conversion from mtl_uom_conversions
    --Use the profile 'unit of measure class' value if it is set at application level, else use it from site level
    /* where UOM_code = l_UOM and uom_class = (select fnd_profile.value('JTF_TIME_UOM_CLASS') from dual) */
    where UOM_code = l_UOM and uom_class = l_jtf_time_uom_class
    --End of Bug 7434190 22-Jan-2009 barathsr
    and inventory_item_id = 0;
Line: 1022

  select p_date + l_conversion * l_unit / 24 into r_date from dual;
Line: 1185

               UPDATE IEX_DLN_UWQ_SUMMARY
                  SET WORK_ITEM_ID = null,
                    SCHEDULE_START = null,
                    SCHEDULE_END = null,
                    WORK_TYPE = null,
                    CATEGORY_TYPE = null,
                    PRIORITY_TYPE = null,
		    WKITEM_RESOURCE_ID = null,
  	    	    STRATEGY_ID = null,
	    	    STRATEGY_TEMPLATE_ID = null,
		    WORK_ITEM_TEMPLATE_ID = null,
	            STATUS_CODE = null,
	            START_TIME = null,
	            END_TIME = null,
	            WORK_ITEM_ORDER = null,
		    WKITEM_ESCALATED_YN = null
                    WHERE PARTY_ID = p_object_id;
Line: 1207

              UPDATE IEX_DLN_UWQ_SUMMARY
                   SET WORK_ITEM_ID = null,
                    SCHEDULE_START = null,
                    SCHEDULE_END = null,
                    WORK_TYPE = null,
                    CATEGORY_TYPE = null,
                    PRIORITY_TYPE = null,
		    WKITEM_RESOURCE_ID = null,
  	    	    STRATEGY_ID = null,
	    	    STRATEGY_TEMPLATE_ID = null,
		    WORK_ITEM_TEMPLATE_ID = null,
	            STATUS_CODE = null,
	            START_TIME = null,
	            END_TIME = null,
	            WORK_ITEM_ORDER = null,
		    WKITEM_ESCALATED_YN = null
                   WHERE CUST_ACCOUNT_ID = p_object_id;
Line: 1229

              UPDATE IEX_DLN_UWQ_SUMMARY
                   SET WORK_ITEM_ID = null,
                    SCHEDULE_START = null,
                    SCHEDULE_END = null,
                    WORK_TYPE = null,
                    CATEGORY_TYPE = null,
                    PRIORITY_TYPE = null,
		    WKITEM_RESOURCE_ID = null,
  	    	    STRATEGY_ID = null,
	    	    STRATEGY_TEMPLATE_ID = null,
		    WORK_ITEM_TEMPLATE_ID = null,
	            STATUS_CODE = null,
	            START_TIME = null,
	            END_TIME = null,
	            WORK_ITEM_ORDER = null,
		    WKITEM_ESCALATED_YN = null
                 WHERE SITE_USE_ID = p_object_id;
Line: 1261

      select strat.jtf_object_id,
        strat.jtf_object_type,
        wkitem.WORK_ITEM_ID,
        wkitem.schedule_start schedule_start,
        wkitem.schedule_end schedule_end,
        stry_temp_wkitem.category_type category,
        stry_temp_wkitem.WORK_TYPE,
        stry_temp_wkitem.PRIORITY_TYPE,
        wkitem.resource_id,
        wkitem.strategy_id,
        strat.strategy_template_id,
        wkitem.work_item_template_id,
        wkitem.status_code workitem_status,
	strat.status_code startegy_status,
        wkitem.creation_date start_time,
        wkitem.execute_end end_time, -- snuthala 28/08/2008 bug #6745580
        wkitem.work_item_order wkitem_order,
	wkitem.escalated_yn escalated_yn
      from iex_strategies strat,
        iex_strategy_work_items wkitem,
        iex_stry_temp_work_items_b stry_temp_wkitem
      where wkitem.work_item_id=p_work_item_id
      AND wkitem.strategy_id = strat.strategy_id
      AND wkitem.work_item_template_id = stry_temp_wkitem.work_item_temp_id;
Line: 1341

                update iex_dln_uwq_summary
                   set work_item_id = l_work_item_id,
                    schedule_start = l_schedule_start,
                    schedule_end = l_schedule_end,
                    work_type = l_work_type,
                    category_type = l_category_type,
                    priority_type = l_priority_type,
		    wkitem_resource_id = l_wkitem_resource_id,
  	    	    strategy_id = l_strategy_id,
	    	    strategy_template_id = l_strategy_template_id,
		    work_item_template_id = l_work_item_template_id,
	            status_code = l_workitem_status,
	            start_time = l_start_time,
	            end_time = l_end_time,
	            work_item_order = l_work_item_order,
		    wkitem_escalated_yn = l_escalated_yn
                   where party_id = l_jtf_object_id;
Line: 1363

                update iex_dln_uwq_summary
                   set work_item_id = l_work_item_id,
                    schedule_start = l_schedule_start,
                    schedule_end = l_schedule_end,
                    work_type = l_work_type,
                    category_type = l_category_type,
                    priority_type = l_priority_type,
		    wkitem_resource_id = l_wkitem_resource_id,
  	    	    strategy_id = l_strategy_id,
	    	    strategy_template_id = l_strategy_template_id,
		    work_item_template_id = l_work_item_template_id,
	            status_code = l_workitem_status,
	            start_time = l_start_time,
	            end_time = l_end_time,
	            work_item_order = l_work_item_order,
		    wkitem_escalated_yn = l_escalated_yn
                   where cust_account_id = l_jtf_object_id;
Line: 1385

                update iex_dln_uwq_summary
                   set work_item_id = l_work_item_id,
                    schedule_start = l_schedule_start,
                    schedule_end = l_schedule_end,
                    work_type = l_work_type,
                    category_type = l_category_type,
                    priority_type = l_priority_type,
		    wkitem_resource_id = l_wkitem_resource_id,
  	    	    strategy_id = l_strategy_id,
	    	    strategy_template_id = l_strategy_template_id,
		    work_item_template_id = l_work_item_template_id,
	            status_code = l_workitem_status,
	            start_time = l_start_time,
	            end_time = l_end_time,
	            work_item_order = l_work_item_order,
		    wkitem_escalated_yn = l_escalated_yn
                 where site_use_id = l_jtf_object_id;
Line: 1440

       select status_code
       from iex_strategies
       where strategy_id = p_strategy_id ;
Line: 1445

  select delinquency_id,object_id,object_type
  from iex_strategies
  where strategy_id = p_strategy_id ;
Line: 1533

 /** update work item and call send signal
  * if send signal fails, roolback the work item
  **/

/*
PROCEDURE UPDATE_AND_SENDSIGNAL( P_strategy_work_item_Rec  IN
                                          iex_strategy_work_items_pvt.strategy_work_item_Rec_Type,
                                 p_commit                  IN VARCHAR2  DEFAULT    FND_API.G_FALSE,
                                 x_return_status           OUT NOCOPY VARCHAR2,
                                 x_msg_count               OUT NOCOPY NUMBER,
                                 x_msg_data                OUT NOCOPY VARCHAR2)IS

l_return_status VARCHAR2(1);
Line: 1553

      SAVEPOINT UPDATE_AND_SENDSIGNAL;
Line: 1557

      iex_strategy_work_items_pvt.update_strategy_work_items(
                 p_api_version_number     => 2.0,
                 p_init_msg_list          =>  FND_API.G_TRUE,
                 p_validation_level       =>  FND_API.G_VALID_LEVEL_FULL,
                 p_commit                 =>  p_commit,
                 x_return_status          => l_return_status,
                 x_msg_count              => l_msg_count,
                 x_msg_data               => l_msg_data,
                 p_strategy_work_item_rec => p_strategy_work_item_rec,
                 xo_object_version_number => l_object_version_number);
Line: 1572

           ROLLBACK TO UPDATE_AND_SENDSIGNAL;
Line: 1583

                IEX_DEBUG_PUB.logmessage('UPDATE_AND_SENDSIGNAL: ' || 'AFTER SEND SIGNAL');
Line: 1590

               select  count(*) INTO v_result from iex_strategies
               where strategy_id =p_strategy_work_item_rec.strategy_id
               and next_work_item_id =p_strategy_work_item_rec.work_item_id
               and status_code ='OPEN';
Line: 1598

                     IEX_DEBUG_PUB.logmessage('UPDATE_AND_SENDSIGNAL: ' || 'send signal has failed ');
Line: 1600

                  rollback to  UPDATE_AND_SENDSIGNAL;
Line: 1606

                  IEX_DEBUG_PUB.logmessage('UPDATE_AND_SENDSIGNAL: ' || 'send signal is successful ');
Line: 1618

     ROLLBACK TO UPDATE_AND_SENDSIGNAL;
Line: 1621

        IEX_DEBUG_PUB.logmessage('inexception of UPDATE_AND_SENDSIGNAL '||sqlerrm);
Line: 1624

END UPDATE_AND_SENDSIGNAL;