DBA Data[Home] [Help]

APPS.BIS_RL_PKG SQL Statements

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

Line: 124

    select count(*)
    into   l_security_group_count
    from   fnd_security_groups
    where  security_group_id >= 0;
Line: 142

select  prompt,
        description,
        sub_menu_id,
	entry_sequence
from    fnd_menu_entries_vl
where   menu_id = p_object.parent_menu_id
and	sub_menu_id is not null
and     prompt is not null
order by entry_sequence;
Line: 154

select  prompt, description, sub_menu_id, entry_sequence
from    fnd_menu_entries_vl
where   menu_id = p_object.parent_menu_id
and	sub_menu_id is not null
order by entry_sequence;
Line: 164

select  b.prompt prompt,
        nvl(nvl(b.description,a.description),b.prompt) description,
        b.function_id,
        b.entry_sequence,
	a.type,
        a.web_html_call
from    fnd_form_functions_vl a,
	fnd_menu_entries_vl b
where   b.menu_id = p_object.parent_menu_id
and	a.function_id = b.function_id
--jprabhud - 03/04/03 - Refresh Portal Page - Remove the filter based on the type
--and     a.type in (lWww ,lWwk)
--nbarik - 04/15/03 - Bug Fix 2893197 - Don't show Web Portlet and DB Portlet as links
AND a.type NOT IN ('WEBPORTLET', 'DBPORTLET')
-- jprabhud 05/18/05 - addded decode condition
and     decode(a.web_html_call,null,'NULL',lower(a.web_html_call)) not like lHtmlCall --Fix for 2606104
AND     b.prompt IS NOT NULL  --Bug Fix 2664392 : Don't show the function , if prompt is null
order by entry_sequence;
Line: 185

select  nvl(b.prompt,b.description) prompt,
        nvl(nvl(b.description,a.description),b.prompt) description,
        b.function_id,
        b.entry_sequence,
	a.type,
        a.web_html_call
from    fnd_form_functions_vl a,
	fnd_menu_entries_vl b
where   b.menu_id = p_object.parent_menu_id
and	a.function_id = b.function_id
and a.type in ('WEBPORTLET')
and a.web_html_call like '%BIS_PM_RELATED_LINK_LAYOUT%'
order by entry_sequence;
Line: 205

select  count(*)
into    l_count
from    fnd_menu_entries
where   menu_id = p_object.parent_menu_id
and     sub_menu_id is not null;
Line: 277

  select  count(*)
  into    l_count
  from    fnd_form_functions a,
          fnd_menu_entries b
  where   b.menu_id = p_object.parent_menu_id
  and     a.function_id = b.function_id
  --jprabhud - 03/04/03 - Refresh Portal Page - Remove the filter based on the type
  --and     a.type in ('WWW','WWK')
  --nbarik - 04/15/03 - Bug Fix 2893197 - Don't show Web Portlet and DB Portlet as links
  AND a.type NOT IN ('WEBPORTLET', 'DBPORTLET')
  -- jprabhud 05/18/05 - added decode condition
  and     decode(a.web_html_call,null,'NULL',lower(a.web_html_call)) not like '%window.open%';
Line: 292

select  count(*)
into    l_rl_portlet_count
from    fnd_form_functions_vl a,
	fnd_menu_entries_vl b
where   b.menu_id = p_object.parent_menu_id
and	a.function_id = b.function_id
and a.type in ('WEBPORTLET')
and a.web_html_call like '%BIS_PM_RELATED_LINK_LAYOUT%';
Line: 415

select  prompt,
        description,
        sub_menu_id
into	l_prompt,
	l_description,
	l_sub_menu_id
from    fnd_menu_entries_vl
where   menu_id = p_object.parent_menu_id
and	entry_sequence = p_object.entry_sequence
order by entry_sequence;
Line: 481

select  responsibility_name,
        description,
        menu_id
into    l_responsibility_name,
        l_description,
        l_menu_id
from    fnd_responsibility_vl
where   responsibility_id = p_object.responsibility_id
and application_id = p_object.resp_appl_id
-- remove version check to show all resp
--and     version = 'W'
and     start_date <= sysdate
and     (end_date is null or end_date > sysdate);
Line: 651

        var temp=parent.opener.parent.document.Favorites.C.selectedIndex;
Line: 656

        var temp=parent.opener.parent.document.Favorites.C.selectedIndex;
Line: 709

FUNCTION insert_bis_custom_related_link (
 pdisplay_sequence In NUMBER,
 puser_link_name In VARCHAR2,
 pfunction_id IN NUMBER,
 presponsibility_id In NUMBER,
 psecurity_group_id In NUMBER,
 presponsibility_application_id In NUMBER,
 plinked_function_id In VARCHAR2,
 plink_type IN VARCHAR2,
 puser_url IN VARCHAR2,
 plevel_site_id in NUMBER,
 plevel_responsibility_id in NUMBER,
 plevel_application_id in NUMBER,
 plevel_org_id in NUMBER,
 plevel_function_id in NUMBER,
 plevel_user_id In NUMBER,
 pcreated_by IN NUMBER,
 pcreation_date IN DATE DEFAULT SYSDATE,
 plast_update_date In DATE DEFAULT SYSDATE,
 plast_updated_by IN NUMBER,
 plast_update_login In NUMBER
) RETURN NUMBER
IS
l_related_link_id number;
Line: 735

select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 738

insert into bis_custom_related_links
	    (related_link_id,
	     display_sequence,
	     function_id,
	     responsibility_id,
	     security_group_id,
	     responsibility_application_id,
	     linked_function_id,
	     link_type,
	     user_url,
	     level_site_id,
	     level_responsibility_id,
	     level_application_id,
	     level_org_id,
	     level_function_id,
	     level_user_id,
	     created_by,
	     creation_date,
	     last_update_date,
	     last_updated_by,
	     last_update_login
	     ) VALUES (
             l_related_link_id,
	     pdisplay_sequence,
	     pfunction_id,
	     presponsibility_id,
	     psecurity_group_id,
	     presponsibility_application_id,
	     plinked_function_id,
	     plink_type,
	     puser_url,
	     plevel_site_id,
	     plevel_responsibility_id,
	     plevel_application_id,
	     plevel_org_id,
	     plevel_function_id,
	     plevel_user_id,
	     pcreated_by,
	     pcreation_date,
	     plast_update_date,
	     plast_updated_by,
	     plast_update_login
       );
Line: 783

      INSERT INTO bis_custom_related_links_tl
    	    ( related_link_id,
		  user_link_name,
		  language,
		  source_lang,
	          created_by,
	          creation_date,
	          last_update_date,
	          last_updated_by,
	          last_update_login
             )
   	select
	        l_related_link_id,
 	        puser_link_name,
        	language_code,
        	userenv('LANG'),
	     	pcreated_by,
	     	pcreation_date,
	     	plast_update_date,
	     	plast_updated_by,
	     	plast_update_login
		from fnd_languages l
  		where L.INSTALLED_FLAG in ('I', 'B')
		and not exists
			(select null
			from bis_custom_related_links_tl
			where related_link_id = l_related_link_id
			and language = l.language_code);
Line: 815

END insert_bis_custom_related_link;
Line: 819

FUNCTION insert_bis_related_link (
   pUser_id In NUMBER,
   pdisplay_sequence In NUMBER,
	     puser_link_name In VARCHAR2,
	     pfunction_id IN NUMBER,
	     presponsibility_id In NUMBER,
	     psecurity_group_id In NUMBER,
	     presponsibility_application_id In NUMBER,
	     plinked_function_id In VARCHAR2,
	     plink_type IN VARCHAR2,
	     puser_url IN VARCHAR2,
	     pcreated_by IN NUMBER,
	     pcreation_date IN DATE DEFAULT SYSDATE,
	     plast_update_date In DATE DEFAULT SYSDATE,
	     plast_updated_by IN NUMBER,
	     plast_update_login In NUMBER
) RETURN NUMBER
IS
l_related_link_id number;
Line: 840

select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 843

insert into bis_related_links
	    (related_link_id,
	     user_id,
	     display_sequence,
	     -- user_link_name,
	     function_id,
	     responsibility_id,
	     security_group_id,
	     responsibility_application_id,
	     linked_function_id,
	     link_type,
	     user_url,
	     created_by,
	     creation_date,
	     last_update_date,
	     last_updated_by,
	     last_update_login
	     ) VALUES (
             l_related_link_id,
	     puser_id,
	     pdisplay_sequence,
	     -- puser_link_name,
	     pfunction_id,
	     presponsibility_id,
	     psecurity_group_id,
	     presponsibility_application_id,
	     plinked_function_id,
	     plink_type,
	     puser_url,
	     pcreated_by,
	     pcreation_date,
	     plast_update_date,
	     plast_updated_by,
	     plast_update_login
       );
Line: 880

      INSERT INTO bis_related_links_tl
    	    ( related_link_id,
		  user_link_name,
		  language,
		  source_lang,
	          created_by,
	          creation_date,
	          last_update_date,
	          last_updated_by,
	          last_update_login
             )
         select
             	l_related_link_id,
             	puser_link_name,
             	language_code,
             	userenv('LANG'),
	     	pcreated_by,
	     	pcreation_date,
	     	plast_update_date,
	     	plast_updated_by,
	     	plast_update_login
		from fnd_languages l
	  	where L.INSTALLED_FLAG in ('I', 'B')
		and not exists
			(select null
			from bis_related_links_tl
			where related_link_id = l_related_link_id
			and language = l.language_code);
Line: 912

END insert_bis_related_link;
Line: 924

	select function_id into l_function_id
	from fnd_form_functions
	where function_name = pFunction_name;
Line: 967

SELECT parameters INTO l_param
FROM fnd_form_functions
WHERE function_id = pFunctionId;
Line: 977

  SELECT function_id INTO l_func_id
  FROM fnd_form_functions
  WHERE function_name = l_retr_func;
Line: 1026

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_site_id = p_site_id
		AND    function_id = p_function_id;
Line: 1033

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_responsibility_id = p_resp_id
		AND    function_id = p_function_id;
Line: 1040

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_application_id = p_app_id
		AND    function_id = p_function_id;
Line: 1047

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_org_id = p_org_id
		AND    function_id = p_function_id;
Line: 1054

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_function_id = p_level_function_id
		AND    function_id = p_function_id;
Line: 1061

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_custom_related_links_v
		WHERE  level_user_id = p_user_id
		AND    function_id = p_function_id;
Line: 1068

		SELECT max(NVL(display_sequence, 0)) + 1
		FROM	 bis_related_links_v
		WHERE    function_id IN (p_function_id, p_function_id2);
Line: 1074

		SELECT application_id
		FROM fnd_responsibility
		WHERE responsibility_id = p_resp_id;
Line: 1183

			SELECT  b.responsibility_application_id,
							b.security_group_id
			INTO    l_resp_appl_id,
							l_security_group_id
			FROM    fnd_responsibility_vl a,
							FND_USER_RESP_GROUPS b
			WHERE   a.responsibility_id = p_resp_id
			AND     b.user_id = p_user_id
			AND     b.RESPONSIBILITY_id = a.responsibility_id
			AND     b.RESPONSIBILITY_application_id = a.application_id;
Line: 1236

			l_related_link_id := INSERT_BIS_CUSTOM_RELATED_LINK (l_index, p_user_link_name, p_function_id,
											l_resp_id, l_security_group_id, l_resp_appl_id,
											p_linked_function_id, p_link_type, p_url,
											l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id,
											-1,sysdate, sysdate, -1, -1);
Line: 1242

			l_related_link_id := INSERT_BIS_RELATED_LINK (p_user_id, l_index, p_user_link_name, p_function_id,
													l_resp_id, l_security_group_id, l_resp_appl_id,
													p_linked_function_id, p_link_type, p_url, -1,
													sysdate, sysdate, -1, -1);
Line: 1261

	select  LINK_PARAMETERS
	from    BIS_RELATED_LINKS
	where   RELATED_LINK_ID = p_related_link_id;
Line: 1265

 CURSOR updatePreseed is
 	select LINKED_FUNCTION_ID from bis_related_links
 	where RELATED_LINK_ID = p_related_link_id;
Line: 1280

		if updatePreseed%ISOPEN then
			close updatePreseed;
Line: 1283

		open updatePreseed;
Line: 1284

			fetch updatePreseed into l_linked_function_id;
Line: 1285

		close updatePreseed;
Line: 1300

	  select max(NVL(display_sequence,0)) + 1 into l_index
	  from bis_custom_related_links_v
	  where level_user_id = p_user_id
	  and function_id = p_function_id;
Line: 1305

      select  b.responsibility_application_id,
        	  b.security_group_id
	  into    l_resp_appl_id,
	    	  l_security_group_id
	  from    fnd_responsibility_vl a,
        	  FND_USER_RESP_GROUPS b
	  where   a.responsibility_id = p_resp_id
	  and     b.user_id = p_user_id
	  and     b.RESPONSIBILITY_id = a.responsibility_id
	  and     b.RESPONSIBILITY_application_id = a.application_id;
Line: 1316

	--insert a new row into the bis_related_links_table.
     l_related_link_id := insert_bis_related_link (p_user_id,
							      l_index, p_user_link_name, p_function_id,
							      p_resp_id, l_security_group_id,l_resp_appl_id,
							      l_linked_function_id, p_link_type, p_url,
							      -1, sysdate, sysdate, -1, -1);
Line: 1330

    update BIS_RELATED_LINKS set LINK_PARAMETERS=l_link_parameters where RELATED_LINK_ID=p_related_link_id;
Line: 1342

select  a.responsibility_id,
	  a.responsibility_name,
        b.responsibility_application_id,
        b.security_group_id,
        fsg.SECURITY_GROUP_NAME
from    FND_SECURITY_GROUPS_VL fsg,
        fnd_responsibility_vl a,
        FND_USER_RESP_GROUPS b
where   b.user_id = p_user_id
and     b.start_date <= sysdate
and     (b.end_date is null or b.end_date > sysdate)
and     b.RESPONSIBILITY_id = a.responsibility_id
and     b.RESPONSIBILITY_application_id = a.application_id
and     a.version = 'W'
and     a.start_date <= sysdate
and     (a.end_date is null or a.end_date > sysdate)
and     b.SECURITY_GROUP_ID = fsg.SECURITY_GROUP_ID
order by responsibility_name;
Line: 1393

     p_resp_sql := 'select responsibility_id, responsibility_name from fnd_responsibility_vl where responsibility_id in ('
										|| l_resp_criteria || ') order by responsibility_name ';
Line: 1397

p_resp_sql := 'select a.responsibility_id, a.responsibility_name from fnd_responsibility_vl a, fnd_user_resp_groups b
  where a.responsibility_id in ('|| l_resp_criteria || ')
  and  b.user_id = '|| p_user_id ||' and  b.RESPONSIBILITY_id = a.responsibility_id and b.responsibility_application_id = a.application_id order by responsibility_name ';
Line: 1404

procedure deleteRelatedLink_Wrapper(p_related_link_id pls_integer, p_isPreseed IN VARCHAR2) is
begin
	if (p_isPreseed = 'N') then
		delete from bis_custom_related_links where related_link_id = p_related_link_id;
Line: 1409

		delete from bis_related_links where related_link_id = p_related_link_id;
Line: 1412

end deleteRelatedLink_Wrapper;
Line: 1417

PROCEDURE UPDATERELATEDLINK_WRAPPER(
 p_related_link_id		IN PLS_INTEGER,
 p_related_link_name	IN VARCHAR2,
 p_user_url			IN VARCHAR2 DEFAULT NULL,
 p_isPreseed 			IN VARCHAR2)
IS

BEGIN

	if (p_isPreseed = 'N') then
		IF (p_user_url = null) THEN
			UPDATE BIS_CUSTOM_RELATED_LINKS_TL SET USER_LINK_NAME=p_related_link_name
			where RELATED_LINK_ID=p_related_link_id and language=userenv('LANG');
Line: 1431

			UPDATE BIS_CUSTOM_RELATED_LINKS SET USER_URL=p_user_url WHERE RELATED_LINK_ID=p_related_link_id;
Line: 1432

			UPDATE BIS_CUSTOM_RELATED_LINKS_TL SET USER_LINK_NAME=p_related_link_name
			WHERE RELATED_LINK_ID=p_related_link_id and language=userenv('LANG');
Line: 1437

			UPDATE BIS_RELATED_LINKS_TL SET USER_LINK_NAME=p_related_link_name
			where RELATED_LINK_ID=p_related_link_id and language=userenv('LANG');
Line: 1440

			UPDATE BIS_RELATED_LINKS SET USER_URL=p_user_url WHERE RELATED_LINK_ID=p_related_link_id;
Line: 1441

			UPDATE BIS_RELATED_LINKS_TL SET USER_LINK_NAME=p_related_link_name
			WHERE RELATED_LINK_ID=p_related_link_id and language=userenv('LANG');
Line: 1446

END UPDATERELATEDLINK_WRAPPER;
Line: 1466

    	update bis_custom_related_links set DISPLAY_SEQUENCE=l_display_sequence where RELATED_LINK_ID=l_id;
Line: 1468

   	update bis_related_links set DISPLAY_SEQUENCE=l_display_sequence where RELATED_LINK_ID=l_id;
Line: 1512

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_related_links_v l
         WHERE l.function_id = p_report_function_id;
Line: 1518

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_custom_related_links_v l
         WHERE l.function_id = p_report_function_id
	 AND   l.level_site_id is not null;
Line: 1525

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_custom_related_links_v l
         WHERE l.function_id = p_report_function_id
	 AND   l.level_responsibility_id is not null;
Line: 1532

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_custom_related_links_v l
         WHERE l.function_id = p_report_function_id
	 AND   l.level_application_id is not null;
Line: 1539

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_custom_related_links_v l
         WHERE l.function_id = p_report_function_id
	 AND   l.level_org_id is not null;
Line: 1546

        SELECT l.display_sequence,l.user_link_name, l.function_id, l.responsibility_id, l.security_group_id,
               l.responsibility_application_id,l.linked_function_id, l.link_type,l.user_url
         FROM bis_custom_related_links_v l
         WHERE l.function_id = p_report_function_id
	 AND   l.level_function_id is not null;
Line: 1620

			select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1621

			insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
							l.responsibility_application_id, l.linked_function_id, l.link_type, l.user_url, l.user_link_name,
							l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1628

				select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1629

				insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
								l.responsibility_application_id, l.linked_function_id, l.link_type, l.user_url, l.user_link_name,
								l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1636

					select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1637

					insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
								l.responsibility_application_id, l.linked_function_id, l.link_type, l.user_url, l.user_link_name,
								l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1644

						select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1645

						insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
								l.responsibility_application_id, l.linked_function_id, l.link_type, l.user_url, l.user_link_name,
								l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1652

							select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1653

							insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
								l.responsibility_application_id, l.linked_function_id, l.link_type, l.user_url, l.user_link_name,
								l_level_site_id, l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1660

								select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 1661

								insertCustomLinks(	l_related_link_id, l.display_sequence, l_function_id, l.responsibility_id, l.security_group_id,
									l.responsibility_application_id, l.linked_function_id, l.link_type,l.user_url,l.user_link_name,l_level_site_id,
 									l_level_resp_id, l_level_app_id, l_level_org_id, l_level_function_id, l_level_user_id, p_user_id);
Line: 1694

PROCEDURE insertCustomLinks(
 p_related_link_id in number,
 p_display_sequence in number,
 p_function_id in number,
 p_responsibility_id in number,
 p_security_group_id in number,
 p_responsibility_app_id in number,
 p_linked_function_id in number,
 p_link_type in varchar2,
 p_user_url in varchar2,
 p_user_link_name in varchar2,
 p_level_site_id in number,
 p_level_resp_id in number,
 p_level_app_id in number,
 p_level_org_id in number,
 p_level_function_id in number,
 p_level_user_id in number,
 p_user_id in number) IS

BEGIN
      		INSERT INTO bis_custom_related_links
	  	 (related_link_id,
		  display_sequence,
 		  function_id,
		  responsibility_id,
	          security_group_id,
	          responsibility_application_id,
	          linked_function_id,
	          link_type,
	          user_url,
		  level_site_id,
		  level_responsibility_id,
		  level_application_id,
		  level_org_id,
		  level_function_id,
		  level_user_id,
	          created_by,
	          creation_date,
	          last_update_date,
	          last_updated_by,
	          last_update_login
             	)
             	VALUES(p_related_link_id,
               	p_display_sequence,
               	p_function_id,
               	p_responsibility_id,
               	p_security_group_id,
               	p_responsibility_app_id,
               	p_linked_function_id,
               	p_link_type,
               	p_user_url,
      	  	p_level_site_id,
     	        p_level_resp_id,
       	        p_level_app_id,
	        p_level_org_id,
		p_level_function_id,
		p_level_user_id,
               	p_user_id,
               	SYSDATE,
               	SYSDATE,
               	p_user_id,
               	p_user_id);
Line: 1757

		INSERT INTO bis_custom_related_links_tl
    	    	( related_link_id,
		  user_link_name,
		  language,
		  source_lang,
	          created_by,
	          creation_date,
	          last_update_date,
	          last_updated_by,
	          last_update_login
             	)
       		select
	        p_related_link_id,
 	        p_user_link_name,
        	language_code,
        	userenv('LANG'),
       		p_user_id,
       		SYSDATE,
       		SYSDATE,
       		p_user_id,
       		p_user_id
		from fnd_languages l
  		where L.INSTALLED_FLAG in ('I', 'B')
		and not exists
			(select null
			from bis_custom_related_links_tl
			where related_link_id = p_related_link_id
			and language = l.language_code);
Line: 1786

END insertCustomLinks;
Line: 1801

	select 	sum(level_user_id), sum(level_function_id), sum(level_application_id), sum(level_org_id), sum(level_responsibility_id),sum(level_site_id)
	into l_user_level, l_function_level, l_app_level, l_org_level, l_resp_level, l_site_level
	from bis_custom_related_links_vl
	where function_id = p_function_id;
Line: 1892

procedure delete_function_links (
 p_function_id					IN number
,x_return_status                OUT NOCOPY VARCHAR2
,x_msg_count                    OUT NOCOPY NUMBER
,x_msg_data                     OUT NOCOPY VARCHAR2
) is
cursor  cr_seedlinks is
        SELECT related_link_id
        FROM bis_related_links
        WHERE function_id = p_function_id;
Line: 1903

        SELECT related_link_id
        FROM bis_custom_related_links
        WHERE function_id = p_function_id;
Line: 1917

			delete bis_related_links_tl
			where related_link_id = l.related_link_id;
Line: 1924

	-- mdamle 06/29/2004 - Don't delete customized links
	/*
	for l in cr_customlinks loop
		begin
			delete bis_custom_related_links_tl
			where related_link_id = l.related_link_id;
Line: 1937

		delete bis_related_links
		where function_id = p_function_id;
Line: 1943

	-- mdamle 06/29/2004 - Don't delete customized links
	/*
	begin
		delete bis_custom_related_links
		where function_id = p_function_id;
Line: 1980

END delete_function_links;
Line: 2004

	select bis_related_links_s.nextval into l_related_link_id from dual;
Line: 2005

	INSERT INTO BIS_RELATED_LINKS
	  (RELATED_LINK_ID,
	   CREATION_DATE,
	   CREATED_BY,
	   LAST_UPDATE_DATE,
	   LAST_UPDATED_BY,
	   FUNCTION_ID,
	   LINK_TYPE,
	   LINKED_FUNCTION_ID,
	   USER_ID,
	   USER_URL,
	   LAST_UPDATE_LOGIN,
	   RESPONSIBILITY_ID,
	   SECURITY_GROUP_ID,
	   RESPONSIBILITY_APPLICATION_ID,
	   DISPLAY_SEQUENCE)
	  SELECT
	   l_related_link_id,
	   sysdate,
	   p_user_id,
	   sysdate,
	   p_user_id,
	   p_function_id,
	   p_link_type,
	   p_linked_function_id,
	   p_user_id,
	   p_user_url,
	   p_login_id,
	   p_resp_id,
	   p_sec_grp_id,
	   p_resp_app_id,
	   p_display_sequence
	 FROM DUAL;
Line: 2039

         INSERT INTO bis_related_links_tl
         (related_link_id,
          user_link_name,
          language,
          source_lang,
          created_by,
          creation_date,
          last_update_date,
          last_updated_by,
          last_update_login
         )
        select
        l_related_link_id,
        p_user_link_name,
        language_code,
        userenv('LANG'),
       	p_user_id,
       	SYSDATE,
       	SYSDATE,
       	p_user_id,
       	p_login_id
	from fnd_languages l
  	where L.INSTALLED_FLAG in ('I', 'B')
	and not exists
		(select null
		from bis_related_links_tl
		where related_link_id = l_related_link_id
		and language = l.language_code);
Line: 2107

		select related_link_id into l_related_link_id
		from bis_related_links
		where function_id = p_function_id
		and display_sequence = p_display_sequence;
Line: 2117

			update bis_related_links_tl
			set user_link_name = p_user_link_name,
			last_update_date = sysdate,
			last_updated_by = p_user_id,
			last_update_login = p_login_id,
			source_lang = userenv('LANG')
			where related_link_id = l_related_link_id
			and userenv('LANG') in (LANGUAGE, SOURCE_LANG);
Line: 2162

        SELECT function_id, link_type, linked_function_id, user_url, display_Sequence,
	   responsibility_id, security_group_id, responsibility_application_id,
	   user_link_name
        FROM bis_related_links_vl
        WHERE function_id = p_source_function_id;
Line: 2175

	delete_function_links(
		p_function_id	=> p_dest_function_id,
		x_return_status => x_return_status,
		x_msg_count => x_msg_count,
		x_msg_data => x_msg_data);
Line: 2182

		l_related_link_id := insert_bis_related_link (
		pUser_id => p_user_id,
		pdisplay_sequence => l.display_sequence,
	     	puser_link_name => l.user_link_name,
	    	pfunction_id => p_dest_function_id,
	     	presponsibility_id => l.responsibility_id,
	     	psecurity_group_id => l.security_group_id,
	     	presponsibility_application_id => l.responsibility_application_id,
	     	plinked_function_id => l.linked_function_id,
	     	plink_type => l.link_type,
	     	puser_url => l.user_url,
	     	pcreated_by => p_user_id,
	     	plast_updated_by => p_user_id,
	     	plast_update_login => p_user_id);
Line: 2252

select  a.responsibility_id,
        b.responsibility_application_id,
        b.security_group_id,
        a.menu_id
into    l_object.responsibility_id,
		 	  l_object.resp_appl_id,
		 	  l_object.security_group_id,
		 	  l_menu_id
from    FND_SECURITY_GROUPS_VL fsg,
        fnd_responsibility_vl a,
        FND_USER_RESP_GROUPS b
where   a.responsibility_id = p_resp_id
and     b.user_id = p_user_id
and     b.start_date <= sysdate
and     (b.end_date is null or b.end_date > sysdate)
and     b.RESPONSIBILITY_id = a.responsibility_id
and     b.RESPONSIBILITY_application_id = a.application_id
and     a.version = 'W'
and     a.start_date <= sysdate
and     (a.end_date is null or a.end_date > sysdate)
and     b.SECURITY_GROUP_ID = fsg.SECURITY_GROUP_ID;
Line: 2305

     p_funcn_sql := '	SELECT mev.function_id AS FunctionId,
                       fff.user_function_name AS Prompt,
                       nvl(fff.description, nvl(mev.description, mev.prompt)) AS Description,
                       ''N'' as DummySelect,
                       NULL as ReportUrl
	   	     	       FROM
                       FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
		     	         WHERE
                         mev.function_id=fff.function_id
                   AND   mev.function_id in (';
Line: 2340

  		     	       AND   mev.function_id in (select linked_function_id
		  		    	                         from  bis_custom_related_Links_v rl
				                             where level_user_id = :' || l_bind_count;
Line: 2353

			             SELECT mev.function_id as FunctionId,
                                fff.user_function_name AS Prompt,
                                nvl(fff.description, nvl(mev.description, mev.prompt)) as Description,
                                ''N'' as DummySelect,
                                NULL as ReportUrl
	   	   	             FROM
                                FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
			             where
                                mev.function_id=fff.function_id
                         AND    mev.function_id in (';
Line: 2388

			             AND     mev.function_id not in (select linked_function_id
				    	                               from bis_custom_related_Links_v rl
					                                   where level_user_id = :' || l_bind_count;
Line: 2451

select  a.responsibility_id,
        b.responsibility_application_id,
        b.security_group_id,
        a.menu_id
into    l_object.responsibility_id,
		 	  l_object.resp_appl_id,
		 	  l_object.security_group_id,
		 	  l_menu_id
from    FND_SECURITY_GROUPS_VL fsg,
        fnd_responsibility_vl a,
        FND_USER_RESP_GROUPS b
where   a.responsibility_id = l_id
and     b.user_id = p_user_id
and     b.start_date <= sysdate
and     (b.end_date is null or b.end_date > sysdate)
and     b.RESPONSIBILITY_id = a.responsibility_id
and     b.RESPONSIBILITY_application_id = a.application_id
and     a.version = 'W'
and     a.start_date <= sysdate
and     (a.end_date is null or a.end_date > sysdate)
and     b.SECURITY_GROUP_ID = fsg.SECURITY_GROUP_ID;
Line: 2513

     p_funcn_sql := '	select mev.function_id as FunctionId,
                        fff.user_function_name AS Prompt,
 		     		    nvl(fff.description, nvl(mev.description, mev.prompt)) as Description,
                        ''N'' as DummySelect,
                        null as ReportUrl
	   	     	from FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
		     	where mev.function_id=fff.function_id
                AND mev.function_id in (';
Line: 2547

  		     	and mev.function_id in (select linked_function_id
		  		    	from bis_custom_related_Links_v rl
					where level_user_id = :' || l_bind_count;
Line: 2569

     	                select mev.function_id as FunctionId,
                        fff.user_function_name AS Prompt,
 			    	    nvl(fff.description, nvl(mev.description, mev.prompt)) as Description,
                        ''N'' as DummySelect,
                        null as ReportUrl
	   	   	           from FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
			           where mev.function_id=fff.function_id
                       and mev.function_id in (';
Line: 2603

			and mev.function_id not in (select linked_function_id
				    	from bis_custom_related_Links_v rl
					where level_user_id = :' || l_bind_count;
Line: 2669

select  a.responsibility_id,
        b.responsibility_application_id,
        b.security_group_id,
        a.menu_id
into    l_object.responsibility_id,
		 	  l_object.resp_appl_id,
		 	  l_object.security_group_id,
		 	  l_menu_id
from    FND_SECURITY_GROUPS_VL fsg,
        fnd_responsibility_vl a,
        FND_USER_RESP_GROUPS b
where   a.responsibility_id = p_resp_id
and     b.user_id = p_user_id
and     b.start_date <= sysdate
and     (b.end_date is null or b.end_date > sysdate)
and     b.RESPONSIBILITY_id = a.responsibility_id
and     b.RESPONSIBILITY_application_id = a.application_id
and     a.version = 'W'
and     a.start_date <= sysdate
and     (a.end_date is null or a.end_date > sysdate)
and     b.SECURITY_GROUP_ID = fsg.SECURITY_GROUP_ID;
Line: 2721

     p_funcn_sql := 'SELECT mev.function_id as FunctionId,
                     NVL(mev.prompt, fff.function_name) AS Prompt,
 		     		 nvl(fff.description, nvl(mev.description, mev.prompt)) AS Description,
                     ''N'' AS DummySelect,
                     NULL AS ReportUrl
	   	     	     FROM FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
		     	     WHERE mev.function_id IN (';
Line: 2755

                                SELECT linked_function_id
                                FROM BIS_CUSTOM_RELATED_LINKS_V rl
                                WHERE level_user_id = :';
Line: 2774

			         SELECT mev.function_id AS FunctionId,
                     NVL(mev.prompt, fff.function_name) AS Prompt,
                     nvl(fff.description, nvl(mev.description, mev.prompt)) AS Description,
                     ''N'' AS DummySelect,
                     NULL AS ReportUrl
                     FROM FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
                     WHERE mev.function_id IN (';
Line: 2808

                                SELECT linked_function_id
                                FROM BIS_CUSTOM_RELATED_LINKS_V rl
                                WHERE level_user_id = :';
Line: 2867

select  a.responsibility_id,
        b.responsibility_application_id,
        b.security_group_id,
        a.menu_id
into    l_object.responsibility_id,
		 	  l_object.resp_appl_id,
		 	  l_object.security_group_id,
		 	  l_menu_id
from    FND_SECURITY_GROUPS_VL fsg,
        fnd_responsibility_vl a,
        FND_USER_RESP_GROUPS b
where   a.responsibility_id = p_resp_id
and     b.user_id = p_user_id
and     b.start_date <= sysdate
and     (b.end_date is null or b.end_date > sysdate)
and     b.RESPONSIBILITY_id = a.responsibility_id
and     b.RESPONSIBILITY_application_id = a.application_id
and     a.version = 'W'
and     a.start_date <= sysdate
and     (a.end_date is null or a.end_date > sysdate)
and     b.SECURITY_GROUP_ID = fsg.SECURITY_GROUP_ID;
Line: 2920

     p_funcn_sql := '	select mev.function_id as FunctionId,
                        fff.user_function_name AS Prompt,
 		     		    nvl(fff.description, nvl(mev.description, mev.prompt)) as Description,
                        ''N'' as DummySelect,
                        null as ReportUrl
	   	     	        from FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
		     	        where mev.function_id=fff.function_id
                    and mev.function_id in (';
Line: 2956

  		     	and mev.function_id in (select linked_function_id
		  		    	from bis_custom_related_Links_v rl
					where level_user_id = :';
Line: 2975

    			select mev.function_id as FunctionId,
                fff.user_function_name AS Prompt,
 			    nvl(fff.description, nvl(mev.description, mev.prompt)) as Description,
                ''N'' as DummySelect,
                null as ReportUrl
	   	   	    from FND_MENU_ENTRIES_VL mev, FND_FORM_FUNCTIONS_VL fff
			     where mev.function_id=fff.function_id
                and mev.function_id in (';
Line: 3011

			and mev.function_id not in (select linked_function_id
				    	from bis_custom_related_Links_v rl
					where level_user_id = :';
Line: 3040

    UPDATE BIS_RELATED_LINKS_TL T SET (
        USER_LINK_NAME
    ) = (SELECT
            B.USER_LINK_NAME
         FROM  BIS_RELATED_LINKS_TL B
         WHERE B.RELATED_LINK_ID = T.RELATED_LINK_ID
         AND   B.LANGUAGE     = T.SOURCE_LANG)
         WHERE (
            T.RELATED_LINK_ID,
            T.LANGUAGE
         ) IN (SELECT
                SUBT.RELATED_LINK_ID,
                SUBT.LANGUAGE
                FROM  BIS_RELATED_LINKS_TL SUBB, BIS_RELATED_LINKS_TL SUBT
                WHERE SUBB.RELATED_LINK_ID = SUBT.RELATED_LINK_ID
                AND   SUBB.LANGUAGE     = SUBT.SOURCE_LANG
                AND (SUBB.USER_LINK_NAME <> SUBT.USER_LINK_NAME
                ));
Line: 3059

    INSERT INTO BIS_RELATED_LINKS_TL
    (
      RELATED_LINK_ID,
      LANGUAGE,
      USER_LINK_NAME,
      SOURCE_LANG,
      CREATION_DATE,
      CREATED_BY,
      LAST_UPDATE_DATE,
      LAST_UPDATED_BY,
      LAST_UPDATE_LOGIN
    )
    SELECT
       B.RELATED_LINK_ID,
       L.LANGUAGE_CODE,
       B.USER_LINK_NAME,
       B.SOURCE_LANG,
       B.CREATION_DATE,
       B.CREATED_BY,
       B.LAST_UPDATE_DATE,
       B.LAST_UPDATED_BY,
       B.LAST_UPDATE_LOGIN
   FROM  BIS_RELATED_LINKS_TL B, FND_LANGUAGES L
   WHERE L.INSTALLED_FLAG IN ('I', 'B')
   AND   B.LANGUAGE = USERENV('LANG')
   AND   NOT EXISTS
        (
          SELECT NULL
          FROM   BIS_RELATED_LINKS_TL T
          WHERE  T.RELATED_LINK_ID = B.RELATED_LINK_ID
          AND    T.LANGUAGE     = L.LANGUAGE_CODE
        );
Line: 3092

    UPDATE BIS_CUSTOM_RELATED_LINKS_TL T SET (
        USER_LINK_NAME
    ) = (SELECT
            B.USER_LINK_NAME
         FROM  BIS_CUSTOM_RELATED_LINKS_TL B
         WHERE B.RELATED_LINK_ID = T.RELATED_LINK_ID
         AND   B.LANGUAGE     = T.SOURCE_LANG)
         WHERE (
            T.RELATED_LINK_ID,
            T.LANGUAGE
         ) IN (SELECT
                SUBT.RELATED_LINK_ID,
                SUBT.LANGUAGE
                FROM  BIS_CUSTOM_RELATED_LINKS_TL SUBB, BIS_CUSTOM_RELATED_LINKS_TL SUBT
                WHERE SUBB.RELATED_LINK_ID = SUBT.RELATED_LINK_ID
                AND   SUBB.LANGUAGE     = SUBT.SOURCE_LANG
                AND (SUBB.USER_LINK_NAME <> SUBT.USER_LINK_NAME
                ));
Line: 3111

  INSERT INTO BIS_CUSTOM_RELATED_LINKS_TL
    (
      RELATED_LINK_ID,
      LANGUAGE,
      USER_LINK_NAME,
      SOURCE_LANG,
      CREATION_DATE,
      CREATED_BY,
      LAST_UPDATE_DATE,
      LAST_UPDATED_BY,
      LAST_UPDATE_LOGIN
    )
    SELECT
       B.RELATED_LINK_ID,
       L.LANGUAGE_CODE,
       B.USER_LINK_NAME,
       B.SOURCE_LANG,
       B.CREATION_DATE,
       B.CREATED_BY,
       B.LAST_UPDATE_DATE,
       B.LAST_UPDATED_BY,
       B.LAST_UPDATE_LOGIN
   FROM  BIS_CUSTOM_RELATED_LINKS_TL B, FND_LANGUAGES L
   WHERE L.INSTALLED_FLAG IN ('I', 'B')
   AND   B.LANGUAGE = USERENV('LANG')
   AND   NOT EXISTS
        (
          SELECT NULL
          FROM   BIS_CUSTOM_RELATED_LINKS_TL T
          WHERE  T.RELATED_LINK_ID = B.RELATED_LINK_ID
          AND    T.LANGUAGE     = L.LANGUAGE_CODE
        );