DBA Data[Home] [Help]

APPS.GMD_OPERATION_ACTIVITIES_PUB SQL Statements

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

Line: 18

  Function  : This package contains public procedures used to create, modify, and delete operation activties
  Pre-reqs  : N/A
  Parameters: Per function

  Current Vers  : 1.0

  Previous Vers : 1.0

  Initial Vers  : 1.0
  Notes
*/

--Bug 3222090, NSRIVAST 20-FEB-2004, BEGIN
--Forward declaration.
   FUNCTION set_debug_flag RETURN VARCHAR2;
Line: 47

     insert_operation_activity
  Description
    This particular procedure is used to insert an
    operation activity Parameters
  ================================================ */
  PROCEDURE insert_operation_activity
  ( p_api_version 	IN              NUMBER
  , p_init_msg_list	IN              BOOLEAN
  , p_commit		IN              BOOLEAN
  , p_oprn_no		IN              gmd_operations.oprn_no%TYPE
  , p_oprn_vers		IN              gmd_operations.oprn_vers%TYPE
  , p_oprn_activity	IN OUT NOCOPY 	gmd_operation_activities%ROWTYPE
  , p_oprn_rsrc_tbl	IN              gmd_operation_resources_pub.gmd_oprn_resources_tbl_type
  , x_message_count 	OUT NOCOPY  	NUMBER
  , x_message_list 	OUT NOCOPY  	VARCHAR2
  , x_return_status	OUT NOCOPY  	VARCHAR2)    IS

    v_activity	        gmd_operation_activities.activity%TYPE;
Line: 77

      SELECT 1
      FROM gmd_operations_b
      WHERE oprn_id = p_oprn_id
       AND delete_mark = 0;
Line: 84

     SELECT oprn_id
     FROM gmd_operations_b
     WHERE oprn_No = p_oprn_no
         AND oprn_vers = p_oprn_vers
         and delete_Mark = 0;
Line: 91

     SELECT 1
     FROM gmd_activities
     WHERE activity = v_activity
     and delete_mark = 0;
Line: 97

      SELECT GEM5_OPRNLINE_ID_S.NEXTVAL
      FROM   FND_DUAL;
Line: 101

   SAVEPOINT insert_oprn_actv;
Line: 109

     gmd_debug.put_line('In insert_operation_activity public.');
Line: 125

                                ,'insert_operation_activity'
                                ,'gmd_operation_activities_pub') THEN
      RAISE invalid_version;
Line: 152

   /* Validation: Check if this users performing update has access to this
      operation owner orgn code */
   IF NOT GMD_API_GRP.Check_orgn_access(Entity     => 'OPERATION'
                                       ,Entity_id  => v_oprn_id) THEN
     RAISE ins_oprn_actv_err;
Line: 216

        gmd_debug.put_line('before PVT insert_oprn_activity routine called');
Line: 219

      /* call insert operation activity routine using oprn_id */
      GMD_OPERATION_ACTIVITIES_PVT.insert_operation_activity(
           	                   p_oprn_id       => v_oprn_id,
           	                   p_oprn_activity => p_oprn_activity,
      		                   x_message_count => x_message_count,
      		                   x_message_list  => x_message_list,
      		                   x_return_status => l_retn_status);
Line: 238

         /* call insert operation resources */
         GMD_OPERATION_RESOURCES_PUB.insert_operation_resources(
                                   p_init_msg_list => FALSE,
		                   p_oprn_line_id  => p_oprn_activity.oprn_line_id,
		                   p_oprn_rsrc_tbl => p_oprn_rsrc_tbl,
            	                   x_message_count => x_message_count,
        	                   x_message_list  => x_message_list,
      		                   x_return_status => l_retn_status);
Line: 260

         ROLLBACK TO SAVEPOINT insert_oprn_actv;
Line: 265

          ROLLBACK TO SAVEPOINT insert_oprn_actv;
Line: 270

          ROLLBACK TO SAVEPOINT insert_oprn_actv;
Line: 277

  END insert_operation_activity;
Line: 281

     update_operation_activity
  Description
    This particular procedure is used to update
    an operation activity Parameters
  ================================================ */
  PROCEDURE update_operation_activity
  ( p_api_version 	IN          NUMBER
  , p_init_msg_list 	IN          BOOLEAN
  , p_commit		IN          BOOLEAN
  , p_oprn_line_id	IN          gmd_operation_activities.oprn_line_id%TYPE
  , p_update_table	IN          gmd_operation_activities_pub.update_tbl_type
  , x_message_count 	OUT NOCOPY  NUMBER
  , x_message_list 	OUT NOCOPY  VARCHAR2
  , x_return_status	OUT NOCOPY  VARCHAR2)    IS

    v_oprn_id           gmd_operations.oprn_id%TYPE;
Line: 305

    SELECT oprn_id
    FROM   gmd_operation_activities
    WHERE  oprn_line_id = p_oprn_line_id
      AND  delete_mark = 0;
Line: 331

                                      ,'update_operation_activity'
                                      ,'gmd_operation_activities_pub') THEN
      RAISE invalid_version;
Line: 337

      gmd_debug.put_line('Start of update_operation_activity PUB');
Line: 352

         /* Loop thru cols to be updated - verify col and value are present */
    FOR i in 1 .. p_update_table.count LOOP
        /* Col_to_update and value must be passed, otherwise give error */
      IF p_update_table(i).p_col_to_update IS NULL THEN
         IF (l_debug = 'Y') THEN
           gmd_debug.put_line('col_to_update required');
Line: 361

         FND_MESSAGE.SET_TOKEN ('MISSING', 'COL_TO_UPDATE');
Line: 364

      ELSIF p_update_table(i).p_value IS NULL THEN
         IF (l_debug = 'Y') THEN
           gmd_debug.put_line('value required');
Line: 377

       and Operation is not logically deleted */
     OPEN get_oprn_id(p_oprn_line_id);
Line: 387

     /* Validation: Check if this users performing update has access to this
          operation owner orgn code */
     IF NOT GMD_API_GRP.Check_orgn_access(Entity     => 'OPERATION'
                                     ,Entity_id  => v_oprn_id) THEN
       RAISE upd_oprn_actv_err;
Line: 394

     IF NOT GMD_COMMON_VAL.UPDATE_ALLOWED(Entity => 'OPERATION',
                                        Entity_id => v_oprn_id ) THEN
         FND_MESSAGE.SET_NAME('GMD', 'GMD_OPRN_NOT_VALID');
Line: 401

         /* delete_mark validation */
     FOR a IN 1 .. p_update_table.count  LOOP
        /* check activity factor has a value else default */
       IF (UPPER(p_update_table(a).p_col_to_update) = 'ACTIVITY_FACTOR' AND
           p_update_table(a).p_value < 0) THEN
          gmd_api_grp.log_message ('GMD_NEGATIVE_FIELDS',
                                        'FIELD', p_update_table(a).p_col_to_update);
Line: 410

       ELSIF (UPPER(p_update_table(a).p_col_to_update) = 'OFFSET_INTERVAL' AND
          p_update_table(a).p_value < 0) THEN
          gmd_api_grp.log_message ('GMD_NEGATIVE_FIELDS',
                                        'FIELD', p_update_table(a).p_col_to_update);
Line: 415

       ELSIF (UPPER(p_update_table(a).p_col_to_update) = 'SEQUENCE_DEPENDENT_IND' AND
          p_update_table(a).p_value NOT IN (1,0)) THEN
          FND_MESSAGE.SET_NAME('GMD','GMD_INVALID_SEQ_DEP_IND');
Line: 424

        GMD_OPERATION_ACTIVITIES_PVT.update_operation_activity(p_oprn_line_id => p_oprn_line_id
        					, p_update_table	=> p_update_table
        					, x_message_count => x_message_count
        					, x_message_list 	=> x_message_list
        					, x_return_status 	=> l_retn_status);
Line: 469

  END update_operation_activity;
Line: 473

     delete_operation_activity
  Description
    This particular procedure is used to delete an
    operation activity Parameters
  ================================================ */
  PROCEDURE delete_operation_activity
  ( p_api_version 		IN 	NUMBER
  , p_init_msg_list	 	IN 	BOOLEAN
  , p_commit		IN 	BOOLEAN
  , p_oprn_line_id		IN	gmd_operation_activities.oprn_line_id%TYPE
  , x_message_count 		OUT NOCOPY  	NUMBER
  , x_message_list 		OUT NOCOPY  	VARCHAR2
  , x_return_status		OUT NOCOPY  	VARCHAR2)  IS

    v_update_table   		gmd_operation_activities_pub.update_tbl_type;
Line: 498

      SELECT oprn_id
      FROM gmd_operation_activities
      WHERE oprn_line_id = v_oprn_line_id;
Line: 503

      SELECT COUNT(1)
      FROM gmd_operation_activities a
      WHERE a.oprn_id = v_oprn_id;
Line: 508

    SAVEPOINT delete_oprn_actv;
Line: 529

                                       ,'delete_operation_activity'
                                       ,'gmd_operation_activities_pvt') THEN
       RAISE invalid_version;
Line: 535

      gmd_debug.put_line('START of delete_operation_activity PUB');
Line: 569

    /* Validation: Check if this users performing update has access to this
       operation owner orgn code */
    IF NOT GMD_API_GRP.Check_orgn_access(Entity     => 'OPERATION'
                                        ,Entity_id  => l_oprn_id) THEN
      RAISE del_oprn_actv_err;
Line: 577

       gmd_operation_activities_pvt.delete_operation_activity
                                   (p_oprn_line_id  => p_oprn_line_id
                                  , x_message_count => x_message_count
                                  , x_message_list  => x_message_list
                                  , x_return_status => l_retn_status);
Line: 596

         ROLLBACK TO SAVEPOINT delete_oprn_actv;
Line: 601

           ROLLBACK TO SAVEPOINT delete_oprn_actv;
Line: 606

        ROLLBACK TO SAVEPOINT delete_oprn_actv;
Line: 613

  END delete_operation_activity;