Архив

Публикации с меткой ‘список’

Список полномочий и групп запросов для отчета

15 Апрель 2016 1 комментарий

Запрос для вывода списка полномочий и групп запросов по коду или имени отчета/параллельной программы:

with params as (
select 'FNDATREP' as short_name
      ,''    as long_name
      ,'RU'  as lang /* RU;US */
from dual
)
select  p1.concurrent_program_name
       ,pt.user_concurrent_program_name
       ,fa.application_short_name as appl_resp
       ,r.responsibility_key
       ,rt.responsibility_name      
       ,fa1.application_short_name as appl_request_group
       ,g.request_group_name
from fnd_request_groups      g,
     fnd_request_group_units u,
     fnd_application    fa,
     fnd_application    fa1,         
     fnd_concurrent_programs_tl pt,
     fnd_concurrent_programs    p1,
     fnd_responsibility    r,
     fnd_responsibility_tl rt,
     params
where 1=1
      and u.application_id = g.application_id
      and u.request_group_id = g.request_group_id
      and (u.request_unit_id = pt.concurrent_program_id
          or u.request_unit_type = 'A')
      and u.unit_application_id = pt.application_id
      and pt.application_id = fa.application_id
      and pt.concurrent_program_id = p1.concurrent_program_id
      and g.application_id = fa1.application_id
      and r.request_group_id = g.request_group_id
      and r.responsibility_id = rt.responsibility_id
      and rt.language = params.lang
      and pt.language  = params.lang
      and (
            (p1.concurrent_program_name like '%'||params.short_name||'%' 
             and params.short_name is not null 
            ) 
            or 
            (pt.user_concurrent_program_name like '%'||params.long_name||'%' 
             and params.long_name is not null and params.short_name is null
            )
          )
order by 1,2;

Список параметров процедуры SQL запросом

20 Март 2013 2 comments

SQL запрос для получения списка параметров процедуры/функции

SELECT A.OBJECT_NAME, A.PACKAGE_NAME, A.ARGUMENT_NAME, A.DATA_TYPE, a.SEQUENCE
FROM USER_ARGUMENTS A
    ,ALL_OBJECTS    O
WHERE A.OBJECT_ID = O.OBJECT_ID
      AND O.OBJECT_NAME = 'FND_GLOBAL'      -- pkg
      AND A.OBJECT_NAME = 'APPS_INITIALIZE' -- procedure
/

OBJECT_NAME       PACKAGE_NAME  ARGUMENT_NAME       DATA_TYPE   SEQUENCE
----------------- ------------- ------------------- ----------- ----------
APPS_INITIALIZE   FND_GLOBAL    USER_ID             NUMBER      1
APPS_INITIALIZE   FND_GLOBAL    RESP_ID             NUMBER      2
APPS_INITIALIZE   FND_GLOBAL    RESP_APPL_ID        NUMBER      3
APPS_INITIALIZE   FND_GLOBAL    SECURITY_GROUP_ID   NUMBER      4
APPS_INITIALIZE   FND_GLOBAL    SERVER_ID           NUMBER      5