DBA Data[Home] [Help]

APPS.JTF_TASK_UTL SQL Statements

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

Line: 25

      SELECT jtf_task_utl.get_owner (esc.owner_type_code, esc.owner_id)
    INTO
	 l_owner
    FROM jtf_tasks_b esc
       WHERE task_id IN (SELECT task_id
	       FROM jtf_task_references_b
	      WHERE object_id = p_task_id
		AND object_type_code = 'TASK'
		AND reference_code = 'ESC')
     AND task_type_id = 22;
Line: 47

      SELECT lookups.meaning
    INTO l_meaning
    FROM jtf_tasks_b, fnd_lookups lookups
       WHERE task_id IN (SELECT task_id
	       FROM jtf_task_references_b
	      WHERE object_id = p_task_id
		AND object_type_code = 'TASK'
		AND reference_code = 'ESC')
     AND task_type_id = 22
     AND lookups.lookup_type = 'JTF_TASK_ESC_LEVEL'
     AND lookups.lookup_code = jtf_tasks_b.escalation_level;
Line: 74

     SELECT hd.hook_package, hd.hook_api, fa.application_id -- Fix bug 2512087
       FROM fnd_application fa
	  , jtf_hooks_data hd
      WHERE hd.package_name = p_package_name
	AND hd.api_name = p_api_name
	AND hd.execute_flag = 'Y'
	AND hd.processing_type = p_processing_type
	and fa.application_short_name = hd.product_code
      ORDER BY execution_order;
Line: 158

		     Select DECODE (
                                p_address_id,
                                fnd_api.g_miss_num,
                                address_id,
                                p_address_id
                               ) address_id,
                        DECODE (
                                p_location_id,
                                fnd_api.g_miss_num,
                                location_id,
                                p_location_id
                               ) location_id
                         From JTF_TASKS_VL
                              Where Task_Id=p_task_id;
Line: 222

      SELECT 1
    INTO x
    FROM jtf_cal_shift_cons_v
       WHERE shift_construct_id = p_shift_construct_id;
Line: 273

      SELECT 1
    INTO x
    FROM fnd_lookups
       WHERE lookup_type = p_lookup_type
     AND lookup_code = p_lookup_code;
Line: 312

      select pc.party_id, pc.subject_party_id
      from jtf_party_all_contacts_v pc,
       jtf_task_contacts tc
      where tc.task_contact_id = p_contact_id
      and  tc.contact_id IN (pc.party_id, pc.subject_party_id);
Line: 327

     SELECT NVL (contact_type_code, 'CUST')
       INTO l_contact_type_code
       FROM jtf_task_contacts
      WHERE task_contact_id = p_contact_id;
Line: 357

	   SELECT 1
	 INTO x
	 FROM jtf_party_cont_points_v
	 WHERE party_id in (l_rel_party_id ,l_person_party_id)
	 AND contact_point_id = p_phone_id
	 AND status = 'A'
	 AND ROWNUM < 2;
Line: 366

	   SELECT 1
	 INTO x
	 FROM jtf_party_cont_points_v
	WHERE party_id = (SELECT customer_id
		    FROM jtf_tasks_b
		   WHERE task_id = p_contact_id)
	  AND contact_point_id = p_phone_id
	  AND status = 'A'
	  AND ROWNUM < 2;
Line: 378

	SELECT 1
	  INTO x
	  FROM per_phones
	 WHERE parent_table = 'PER_ALL_PEOPLE_F'
	   AND parent_id = (SELECT contact_id
		  FROM jtf_task_contacts
		 WHERE task_contact_id = p_contact_id)
	   AND phone_id = p_phone_id;
Line: 410

     SELECT select_id, select_name, from_table, where_clause
       FROM jtf_objects_b
      WHERE object_code = p_object_type_code;
Line: 416

      l_id_column      jtf_objects_b.select_id%TYPE;
Line: 417

      l_name_column    jtf_objects_b.select_name%TYPE;
Line: 454

     sql_stmt := ' SELECT ' ||
                 l_name_column ||
                 ' from ' ||
                 l_from_clause ||
                 '  where ' ||
                 l_where_clause ||
                 l_id_column ||
                 ' = :object_id and rownum = 1';
Line: 489

	   SELECT 1
	 INTO x
	 FROM jtf_party_all_contacts_v contacts
	WHERE contacts.object_party_id = (SELECT customer_id
			    FROM jtf_tasks_b
			   WHERE task_id = p_task_id)
	  AND p_contact_id in (contacts.subject_party_id, contacts.party_id)
	  AND ROWNUM < 2;
Line: 500

	   SELECT 1
	 INTO x
	 FROM per_people_f
	WHERE person_id = p_contact_id
	  AND SYSDATE BETWEEN
	     effective_start_date AND effective_end_date;
Line: 529

         Select 'Y' From JTF_TASK_CONTACTS
            Where task_id    = p_task_id
              And contact_id = p_contact_id
              And contact_type_code = p_contact_type_code
              And task_contact_id <> NVL(p_task_contact_id, -99999);
Line: 566

     SELECT task_template_group_id
       FROM jtf_task_temp_groups_b
      WHERE task_template_group_id = p_task_template_group_id
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 574

     SELECT task_template_group_id
       FROM jtf_task_temp_groups_vl
      WHERE template_group_name = p_task_template_group_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 668

     SELECT 1
       FROM fnd_currencies
      WHERE currency_code = p_currency_code;
Line: 707

     SELECT object_code
       FROM jtf_objects_b
      WHERE object_code = p_object_code
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE)
	AND (object_code IN
	   (SELECT object_code
	      FROM jtf_object_usages
	     WHERE object_user_code =
		  NVL (p_object_usage, object_user_code)));
Line: 720

     SELECT object_code
       FROM jtf_objects_vl
      WHERE name = p_object_type_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE)
	AND (object_code IN
	   (SELECT object_code
	      FROM jtf_object_usages
	     WHERE object_user_code =
		  NVL (p_object_usage, object_user_code)));
Line: 777

     SELECT 1
       FROM fnd_lookups
      WHERE lookup_type = 'JTF_TASK_REFERENCE_CODES'
	AND lookup_code = p_reference_code;
Line: 815

     SELECT user_id assigned_by_id
       FROM fnd_user
      WHERE user_id = p_assigned_by_id
	AND NVL (end_date, SYSDATE) >= SYSDATE
	AND NVL (start_date, SYSDATE) <= SYSDATE;
Line: 823

     SELECT user_id assigned_by_id
       FROM fnd_user
      WHERE user_name = p_assigned_by_name
	AND NVL (end_date, SYSDATE) >= SYSDATE
	AND NVL (start_date, SYSDATE) <= SYSDATE;
Line: 872

     SELECT 1
       FROM jtf_task_depends
      WHERE dependency_id = p_dependency_id;
Line: 921

   FUNCTION updated_by
      RETURN NUMBER
   IS
   BEGIN
      RETURN fnd_global.user_id;
Line: 941

     SELECT task_template_group_id
       FROM jtf_task_temp_groups_b
      WHERE task_template_group_id =
	   (SELECT task_group_id
	      FROM jtf_task_templates_b
	     WHERE task_template_id = p_task_template_id);
Line: 1033

     SELECT source_object_type_code
       FROM jtf_tasks_b
      WHERE task_id = p_task_id;
Line: 1039

     SELECT source_object_type_code
       FROM jtf_task_temp_groups_b
      WHERE task_template_group_id = (SELECT task_group_id
			FROM jtf_task_templates_b
		       WHERE task_template_id = p_task_id);
Line: 1085

     SELECT party_site_id
       FROM hz_party_sites
      WHERE party_site_id = p_party_site_id;
Line: 1091

     SELECT party_site_id
       FROM hz_party_sites
      WHERE party_site_number = p_party_site_number;
Line: 1142

     SELECT party_id
       FROM hz_parties
      WHERE party_id = p_party_id;
Line: 1148

     SELECT party_id
       FROM hz_parties
      WHERE party_number = p_party_number;
Line: 1202

     SELECT cust_account_id
       FROM hz_cust_accounts
      WHERE cust_account_id = p_cust_account_id;
Line: 1208

     SELECT cust_account_id
       FROM hz_cust_accounts
      WHERE account_number = p_cust_account_number;
Line: 1335

      SELECT select_id, select_name, from_table, where_clause
        FROM jtf_objects_b
      WHERE object_code = p_object_code
	AND object_code IN (SELECT object_code
		  FROM jtf_object_usages
		 WHERE object_user_code = 'TASK');
Line: 1343

      l_id_column      jtf_objects_b.select_id%TYPE;
Line: 1344

      l_name_column    jtf_objects_b.select_name%TYPE;
Line: 1464

      sql_stmt := ' SELECT ' ||
	  l_name_column ||
	  ' , ' ||
	  l_id_column ||
	  ' from ' ||
	  l_from_clause ||
	  l_where_clause ||
	  l_id_column ||
	  ' = :object_id and rownum = 1';
Line: 1516

     SELECT task_id
       FROM jtf_tasks_b
      WHERE task_id = p_task_id;
Line: 1522

     SELECT task_id
       FROM jtf_tasks_b
      WHERE task_number = p_task_number;
Line: 1573

     SELECT task_template_id task_id
       FROM jtf_task_templates_b
      WHERE task_template_id = p_task_id;
Line: 1579

     SELECT task_template_id task_id
       FROM jtf_task_templates_b
      WHERE task_number = p_task_number;
Line: 1629

     SELECT 1
       FROM fnd_lookup_values
      WHERE lookup_type = 'JTF_TASK_DEPENDENCY_TYPES'
	AND lookup_code = p_dependency_code;
Line: 1659

     SELECT 1
       FROM mtl_units_of_measure
      WHERE uom_class = g_uom_time_class
	AND uom_code = p_uom_code;
Line: 1760

     SELECT task_type_id
       FROM jtf_task_types_b
      WHERE task_type_id = p_task_type_id
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1768

     SELECT task_type_id
       FROM jtf_task_types_vl
      WHERE name = p_task_type_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1821

     SELECT task_status_id
       FROM jtf_task_statuses_b
      WHERE task_status_id = p_task_status_id
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1829

     SELECT task_status_id
       FROM jtf_task_statuses_vl
      WHERE name = p_task_status_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1901

     SELECT task_priority_id
       FROM jtf_task_priorities_b
      WHERE task_priority_id = p_task_priority_id
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1909

     SELECT task_priority_id
       FROM jtf_task_priorities_vl
      WHERE name = p_task_priority_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 1970

     SELECT date_type_id
       FROM jtf_task_date_types_b
      WHERE date_type_id = p_date_type_id;
Line: 1976

     SELECT date_type_id
       FROM jtf_task_date_types_vl
      WHERE date_type = p_date_type;
Line: 2030

     SELECT terr_id
       FROM jtf_terr_all
      WHERE terr_id = p_terr_id
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 2038

     SELECT terr_id
       FROM jtf_terr_all
      WHERE name = p_terr_name
	AND trunc(NVL (end_date_active, SYSDATE)) >= trunc(SYSDATE)
	AND trunc(NVL (start_date_active, SYSDATE)) <= trunc(SYSDATE);
Line: 2098

	SELECT person_id
	  FROM per_all_people_f
	 WHERE person_id = p_owner_id;
Line: 2194

	SELECT object_code
	  FROM jtf_objects_b
	 WHERE object_code = p_object_code;
Line: 2200

	SELECT object_code
	  FROM jtf_objects_vl
	 WHERE name = p_object_type_name;
Line: 2249

      l_id_column     jtf_objects_b.select_id%TYPE;
Line: 2258

      SELECT select_id, from_table, where_clause
        FROM jtf_objects_b
      WHERE object_code = l_owner_type_code;
Line: 2308

      sql_stmt := 'SELECT ' ||
	  l_id_column ||
	  ' from ' ||
	  l_from_clause ||
	  '  where ' ||
	  l_where_clause ||
	  l_id_column ||
	  ' = :owner_id and rownum = 1';
Line: 2372

     SELECT timezone_id
       FROM hz_timezones
      WHERE timezone_id = p_timezone_id;
Line: 2378

     SELECT timezone_id
       FROM hz_timezones
      WHERE global_timezone_name = p_timezone_name;
Line: 2439

      SELECT source_object_type_code, source_object_id
    INTO l_p_source_object_code, l_p_source_object_id
    FROM jtf_tasks_b
       WHERE task_id = p_parent_task_id;
Line: 2465

      SELECT source_object_id
    INTO l_p_source_object_id
    FROM jtf_tasks_b
       WHERE task_id = p_parent_task_id;
Line: 2709

      SELECT description
    INTO l_description
    FROM fnd_lookups
       WHERE lookup_type = p_lookup_type
     AND lookup_code = p_lookup_code;
Line: 2742

      SELECT resource_id
    INTO l_resource_id
    FROM jtf_rs_resource_extns
       WHERE user_id = fnd_global.user_id;
Line: 2812

     SELECT name
       INTO x_owner_type_code_name
       FROM jtf_objects_vl
      WHERE object_code = x_owner_type_code;
Line: 2819

	SELECT resource_id,
	   DECODE (
	      category,
	      'EMPLOYEE', 'RS_EMPLOYEE',
	      'PARTNER', 'RS_PARTNER',
	      'PARTY', 'RS_PARTY',
	      'OTHER', 'RS_OTHER',
	      'SUPPLIER_CONTACT', 'RS_SUPPLIER_CONTACT'
	   )
	  INTO x_owner_id,
	   x_owner_type_code
	  FROM jtf_rs_resource_extns
	 WHERE user_id = fnd_global.user_id;
Line: 2832

	SELECT name
	  INTO x_owner_type_code_name
	  FROM jtf_objects_vl
	 WHERE object_code = x_owner_type_code;
Line: 2876

     SELECT party_name
       INTO l_customer_name
       FROM hz_parties
      WHERE party_id = p_customer_id;
Line: 2909

      SELECT closed_flag, completed_flag, cancelled_flag,
	 rejected_flag
    INTO l_closed_flag, l_completed_flag, l_cancelled_flag,
	 l_rejected_flag
    FROM jtf_task_statuses_vl
       WHERE task_status_id = p_task_status_id;
Line: 3010

      SELECT application_id
    INTO l_application_id
    FROM fnd_application_vl
       WHERE application_id = p_application_id;
Line: 3047

     SELECT user_name
       INTO l_user_name
       FROM fnd_user
      WHERE user_id = p_user_id;
Line: 3065

     SELECT task_number
       INTO l_task_number
       FROM jtf_tasks_b task
      WHERE task_id = p_task_id ;
Line: 3088

     SELECT name
       INTO l_terr_name
       FROM jtf_terr
      WHERE terr_id = p_terr_id;
Line: 3138

	  SELECT resource_id
	  INTO l_resource_id
	  FROM jtf_rs_resource_extns
	  WHERE user_id = fnd_global.user_id;
Line: 3145

	  SELECT perz_data_id into l_category_id
	  FROM jtf_perz_data
	  WHERE profile_id = (SELECT profile_id
		  FROM jtf_perz_profile
		  WHERE  profile_name = l_profile_name)
	  AND perz_data_id = p_category_id;
Line: 3187

       SELECT owner_id, owner_type_code, private_flag
       INTO l_owner_id, l_owner_type_code, l_private_flag
       FROM jtf_tasks_b
       WHERE task_id = p_task_id;
Line: 3194

       SELECT resource_id
       INTO l_rs_id
       FROM jtf_rs_resource_extns
       WHERE user_id = fnd_global.user_id;
Line: 3200

       IF p_session = 'UPDATE'
       THEN
	  BEGIN
       -- check when resource_type_code is a group
	  SELECT group_id
	  INTO l_resource_id
	  FROM jtf_rs_group_members
	  WHERE resource_id = l_rs_id
	  AND group_id IN (SELECT resource_id
		   FROM jtf_task_all_assignments
		   WHERE task_id = p_task_id
		   AND resource_type_code = 'RS_GROUP');
Line: 3215

	    SELECT team_id
	    INTO l_resource_id
	    FROM jtf_rs_team_members
	    WHERE team_resource_id = l_rs_id
	    AND team_id IN (SELECT resource_id
		    FROM jtf_task_all_assignments
		    WHERE task_id = p_task_id
		    AND resource_type_code = 'RS_TEAM');
Line: 3226

	       SELECT resource_id
	       INTO l_resource_id
	       FROM jtf_task_all_assignments
	       WHERE task_id = p_task_id
	       AND resource_id = l_rs_id;
Line: 3239

		 SELECT function_name into l_privilege
		 FROM fnd_form_functions fff, fnd_menu_entries fme
		 WHERE fff.function_id = fme.function_id
		 AND fme.menu_id = (select fm.menu_id from fnd_menus fm, fnd_grants fg
			where  fm.menu_id = fg.menu_id
			and fg.instance_pk1_value = l_owner_id
			and fg.instance_pk2_value = l_owner_type_code
			and fg.grantee_key = TO_CHAR(l_rs_id)
			and fg.object_id = (select object_id from fnd_objects
				    where obj_name = 'JTF_TASK_RESOURCE'
				    )
			)
		 AND function_name = jtf_task_utl.g_tasks_full_privelege;
Line: 3289

    SELECT owner_id, owner_type_code, private_flag
    FROM jtf_tasks_b
    WHERE task_id = p_task_id;
Line: 3297

    SELECT resource_id
      FROM jtf_rs_resource_extns
     WHERE user_id = l_user_id;
Line: 3304

    SELECT group_id
      FROM jtf_rs_group_members
     WHERE resource_id = pc_rs_id
       AND group_id IN (SELECT resource_id
	      FROM jtf_task_all_assignments
	     WHERE task_id = p_task_id
	       AND resource_type_code = 'RS_GROUP');
Line: 3315

    SELECT team_id
      FROM jtf_rs_team_members
     WHERE team_resource_id = pc_rs_id
       AND team_id IN (SELECT resource_id
	     FROM jtf_task_all_assignments
	    WHERE task_id = p_task_id
	      AND resource_type_code = 'RS_TEAM');
Line: 3326

    SELECT resource_id
      FROM jtf_task_all_assignments
     WHERE task_id = p_task_id
       AND resource_id = pc_rs_id;
Line: 3334

    SELECT function_name
      FROM fnd_form_functions fff
     , fnd_menu_entries fme
     WHERE fff.function_id = fme.function_id
       AND fme.menu_id = (SELECT fm.menu_id
		FROM fnd_menus fm
		   , fnd_grants fg
	       WHERE fm.menu_id = fg.menu_id
		 AND fg.instance_pk1_value = pc_pk1_value
		 AND fg.instance_pk2_value = pc_pk2_value
		 AND fg.grantee_key = pc_grantee_key
		 AND fg.object_id =
		    (SELECT object_id
		       FROM fnd_objects
		      WHERE obj_name = 'JTF_TASK_RESOURCE'
		     )
	      )
       AND function_name = jtf_task_utl.g_tasks_full_privelege;
Line: 3384

    IF p_session = 'UPDATE'
    THEN
	-- Check group
	OPEN c_group (rec_resource.resource_id);
Line: 3439

    END IF; -- p_session = UPDATE
Line: 3534

      SELECT 'found'
    FROM hz_party_sites
       WHERE party_site_id = b_site_id
     AND party_id = b_party_id;
Line: 3542

      SELECT 'found'
    FROM hz_cust_accounts
       WHERE cust_account_id = b_acct_id
     AND party_id = b_party_id;
Line: 3614

    select perz_data_desc
    into l_msg_data
    from jtf_perz_data
    where perz_data_id = p_category_id ;
Line: 3637

  select category_id
  into l_category_id
  from jtf_task_all_assignments
  where task_id = p_task_id
  and resource_id = p_resource_id
  and resource_type_code = p_resource_type_code
  and rownum < 2 ;
Line: 3658

procedure delete_category( p_category_name in varchar2 )
as
begin

   update jtf_cal_addresses
   set category = null
   where category in ( select perz_data_id from jtf_perz_data where perz_data_name = p_category_name )	;
Line: 3667

   update jtf_task_all_assignments
   set category_id = null
   where category_id in ( select perz_data_id from jtf_perz_data where perz_data_name = p_category_name )  ;
Line: 3672

   delete from jtf_perz_data where perz_data_name = p_category_name ;
Line: 3682

       p_date_selected	       IN VARCHAR2,
       p_planned_start_date    IN DATE,
       p_planned_end_date      IN DATE,
       p_scheduled_start_date  IN DATE,
       p_scheduled_end_date    IN DATE,
       p_actual_start_date     IN DATE,
       p_actual_end_date       IN DATE,
       x_show_on_calendar      IN OUT NOCOPY VARCHAR2,-- Fixed from OUT to IN OUT
       x_date_selected	       IN OUT NOCOPY VARCHAR2,-- Fixed from OUT to IN OUT
       x_calendar_start_date   OUT NOCOPY DATE,
       x_calendar_end_date     OUT NOCOPY DATE,
       x_return_status	       OUT NOCOPY VARCHAR2
   )
   is
   begin
       jtf_task_utl_ext.set_calendar_dates (
	   p_show_on_calendar	  => p_show_on_calendar    ,
	   p_date_selected	  => p_date_selected	   ,
	   p_planned_start_date   => p_planned_start_date  ,
	   p_planned_end_date	  => p_planned_end_date    ,
	   p_scheduled_start_date => p_scheduled_start_date,
	   p_scheduled_end_date   => p_scheduled_end_date  ,
	   p_actual_start_date	  => p_actual_start_date   ,
	   p_actual_end_date	  => p_actual_end_date	   ,
	   x_show_on_calendar	  => x_show_on_calendar    ,
	   x_date_selected	  => x_date_selected	   ,
	   x_calendar_start_date  => x_calendar_start_date ,
	   x_calendar_end_date	  => x_calendar_end_date   ,
	   x_return_status	  => x_return_status	   ,
	   p_task_status_id	  => NULL,
	   p_creation_date	  => NULL
       );
Line: 3737

    SELECT task_status_id, task_status_flag, assignment_status_flag, usage
    INTO l_status_id, l_task_status_flag, l_assignment_status_flag, l_usage
    FROM jtf_task_statuses_b
    WHERE task_status_id = p_status_id;
Line: 3779

      select web_html_call into l_jsp_name
      from fnd_form_functions
      where function_name = p_web_function_name ;
Line: 3795

     select OBJECT_PARAMETERS into l_object_parameters
     from jtf_objects_b
     where object_code = p_object_code ;
Line: 3834

    select count(object_id)
    INTO x_count
      FROM JTF_TASK_REFERENCES_b
      WHERE task_id = p_task_id
      AND object_id = p_object_id
      AND object_type_code = p_object_type_code
      AND rownum = 1;
Line: 3855

  FUNCTION check_reference_delete (p_task_id jtf_tasks_b.task_id%type,
		   p_object_id hz_relationships.object_id%type)
  return boolean
     is

     l_delete_status boolean := true;
Line: 3868

  if l_delete_status then

    /* Check if the incoming object is shared by
    ** any of the subject of the Customer
    ** for the incoming task
    */

  begin

  select 'Exists' into l_dummy from hz_relationships
       where party_id in (select customer_id id
	       from jtf_tasks_b
	       where task_id = p_task_id)
       and subject_id = p_object_id;
Line: 3883

  l_delete_status := false;
Line: 3887

	l_delete_status := false;
Line: 3889

	l_delete_status := true;
Line: 3897

  if l_delete_status then

    begin

    /* Check if the incoming object is shared by
    ** any of the subject of the assignment(s)
    ** for the incoming task
    */

  select 'Exists' into l_dummy from hz_relationships
       where party_id in (select resource_id id
	     from jtf_task_assignments
	     where task_id = p_task_id)
  and subject_id = p_object_id;
Line: 3913

  l_delete_status := false;
Line: 3917

	l_delete_status := false;
Line: 3919

	l_delete_status := true;
Line: 3928

  if l_delete_status then

    begin
    /* Check if the incoming object is shared by
    ** any of the subject of the contact(s)
    ** for the incoming task
    */

  select 'Exists' into l_dummy from hz_relationships
     where party_id in (select contact_id id
	     from jtf_task_contacts
	     where task_id = p_task_id)
  and subject_id = p_object_id;
Line: 3943

  l_delete_status := false;
Line: 3947

	l_delete_status := false;
Line: 3949

	l_delete_status := true;
Line: 3957

  if l_delete_status then

    begin

    /* Check if the incoming object is shared by
    ** the Source
    ** for the incoming task
    */

    select 'Exists' into l_dummy from hz_relationships
	where party_id in (select source_object_id
	   from jtf_tasks_b
		   where task_id = p_task_id)
    and subject_id = p_object_id;
Line: 3972

  l_delete_status := false;
Line: 3976

	l_delete_status := false;
Line: 3978

	l_delete_status := true;
Line: 3986

  if l_delete_status then

    begin

    /* Check if the incoming object is shared by
    ** the contact(s)
    ** for the incoming task
    */

    select 'Party exists' into l_dummy from hz_parties
	where party_id in (select contact_id id
	     from jtf_task_contacts
	     where task_id = p_task_id
		     and contact_id = p_object_id);
Line: 4002

  l_delete_status := false;
Line: 4006

	l_delete_status := false;
Line: 4008

	l_delete_status := true;
Line: 4018

  if l_delete_status then

    begin

    /* Check if the incoming object is shared by
    ** the Source
    ** for the incoming task
    */

    select 'Party exists' into l_dummy from hz_parties
	where party_id in (select source_object_id
	   from jtf_tasks_b
		   where task_id = p_task_id
		   and source_object_id = p_object_id);
Line: 4033

  l_delete_status := false;
Line: 4037

	l_delete_status := false;
Line: 4039

	l_delete_status := true;
Line: 4047

  if l_delete_status then

  begin

  select 'party exists' into l_dummy from hz_parties
  where party_id = (select customer_id
	     from jtf_tasks_b
	     where task_id = p_task_id
		     and customer_id = p_object_id);
Line: 4058

  l_delete_status := false;
Line: 4062

	l_delete_status := false;
Line: 4064

	l_delete_status := true;
Line: 4073

  if l_delete_status then

  begin

  select 'party exists' into l_dummy from hz_parties
  where party_id in (select resource_id id
	from jtf_task_assignments
	where task_id = p_task_id
		and resource_id = p_object_id);
Line: 4084

  l_delete_status := false;
Line: 4088

	l_delete_status := false;
Line: 4090

	l_delete_status := true;
Line: 4095

  return l_delete_status;
Line: 4097

  end check_reference_delete;
Line: 4132

   select task_type_id
     from jtf_tasks_b
    where task_id = b_task_id;
Line: 4137

   select party_name,
      party_type
     from hz_parties
    where party_id = b_party_id;
Line: 4143

   select object_id,
      subject_id
     from hz_relationships
    where party_id = b_relation_id
      and directional_flag = 'F' ;
Line: 4328

PROCEDURE delete_party_reference (
    p_reference_from	in  varchar2,
    p_task_id	in  number,
    p_party_type_code	in  varchar2,
    p_party_id	in  number,
    x_msg_count OUT NOCOPY number,
    x_msg_data	OUT NOCOPY varchar2,
    x_return_status	OUT NOCOPY varchar2)
   IS

   l_reference_id   jtf_task_references_b.task_reference_id%type;
Line: 4347

   select task_type_id
     from jtf_tasks_b
    where task_id = b_task_id;
Line: 4352

   select party_type
     from hz_parties
    where party_id = b_party_id;
Line: 4357

   select object_id,
      subject_id
     from hz_relationships
    where party_id = b_relation_id
      and directional_flag = 'F' ;
Line: 4365

   select task_reference_id,
      object_version_number
     from jtf_task_references_b
    where task_id = b_task_id
      and object_id = b_party_id;
Line: 4434

	   jtf_task_references_pvt.delete_references (
	  p_api_version => l_api_version,
	  p_init_msg_list => fnd_api.g_false,
	  p_commit => fnd_api.g_false,
	  p_object_version_number => l_object_version,
	  p_task_reference_id => l_reference_id,
	  x_return_status => x_return_status,
	  x_msg_count => x_msg_count,
	  x_msg_data => x_msg_data
	   );
Line: 4495

	  jtf_task_references_pvt.delete_references (
	     p_api_version => l_api_version,
	     p_init_msg_list => fnd_api.g_false,
	     p_commit => fnd_api.g_false,
	     p_object_version_number => l_object_version,
	     p_task_reference_id => l_reference_id,
	     x_return_status => x_return_status,
	     x_msg_count => x_msg_count,
	     x_msg_data => x_msg_data
	  );
Line: 4543

	 jtf_task_references_pvt.delete_references (
	    p_api_version => l_api_version,
	    p_init_msg_list => fnd_api.g_false,
	    p_commit => fnd_api.g_false,
	    p_object_version_number => l_object_version,
	    p_task_reference_id => l_reference_id,
	    x_return_status => x_return_status,
	    x_msg_count => x_msg_count,
	    x_msg_data => x_msg_data
	     );
Line: 4586

    PROCEDURE update_task_category (
    p_api_version	    IN	     NUMBER,
    p_object_version_number IN OUT NOCOPY   NUMBER,
    p_task_assignment_id    IN	     NUMBER,
    p_category_id	    IN	     NUMBER,
    x_return_status	   OUT NOCOPY	    VARCHAR2,
    x_msg_count 	   OUT NOCOPY	    NUMBER,
    x_msg_data		   OUT NOCOPY	    VARCHAR2
    )
    IS

    BEGIN
    jtf_task_assignments_pvt.update_task_assignment (
	p_api_version => p_api_version,
	p_object_version_number => p_object_version_number,
	p_init_msg_list => fnd_api.g_false,
	p_commit => fnd_api.g_false,
	p_task_assignment_id => p_task_assignment_id,
	x_msg_data => x_msg_data,
	x_msg_count => x_msg_count,
	x_return_status => x_return_status,
	P_CATEGORY_ID => p_category_id
      );
Line: 4623

     SELECT select_id, select_details, from_table, where_clause
       FROM jtf_objects_b
      WHERE object_code = p_object_type_code;
Line: 4629

      l_id_column      jtf_objects_b.select_id%TYPE;
Line: 4630

      l_details_column	  jtf_objects_b.select_details%TYPE;
Line: 4659

      sql_stmt := ' SELECT ' ||
	  l_details_column ||
	  ' from ' ||
	  l_from_clause ||
	  '  where ' ||
	  l_where_clause ||
	  l_id_column ||
	  ' = :object_id and rownum = 1';
Line: 4688

      SELECT name
	   INTO  l_status_name
       FROM jtf_task_statuses_vl
      WHERE task_status_id = p_status_id;