Thursday, 27 March 2025

Query to get Charts Of Accounts structure – Segments and Value Set

select hou.name BU_NAME,
led.NAME Ledger_Name,
Str.STRUCTURE_CODE CHART_OF_ACCOUNTS_Name,
SegInSt.SEGMENT_CODE COA_SEGMENT_NAME,
vs.value_set_code,
vs.description value_set_desc
from hr_operating_units hou,
xla_gl_ledgers led ,
fnd_kf_structures_b Str,
fnd_kf_str_instances_b StrInSt,
fnd_kf_segment_instances SegInSt,
fnd_vs_value_sets vs
where 1=1
and led.ledger_id = hou.set_of_books_id
AND led.CHART_OF_ACCOUNTS_ID = Str.Structure_id
AND Str.KEY_FLEXFIELD_CODE = ‘GL#’
AND Str.Structure_id = StrInSt.Structure_id
and SegInSt.Structure_inStance_id = StrInSt.Structure_inStance_id 
and vs.VALUE_SET_ID = SegInSt.VALUE_SET_ID 

Thursday, 20 February 2025

Query to Get List of Procurement Agents and Access In oracle Fusion

 SELECT

       ppf.display_name
     , pu.username
     , hou.name BU_NAME
     , paa.access_action_code
     , paa.active_flag
     , paa.access_others_level_code
FROM
       po_agent_accesses     paa
     , per_person_names_f_v  ppf
     , per_users             pu
     , hr_organization_units hou
WHERE
       1                       = 1
       AND paa.agent_id        = ppf.person_id
       AND pu.person_id        = ppf.person_id
       AND hou.organization_id = paa.prc_bu_id

Sunday, 5 January 2025

Query to get Logged IN user name in Oracle fuson

  

SELECT  sys_context ('USERENV', 'CLIENT_IDENTIFIER')   FROM    dual

Query to get Chart Of Account Structure Name and Segments in Oracle fusion

select
  b.FORM_LEFT_PROMPT "Chart Of Account Segment Name",
  b.description,
  a.segment_name "CCA_VALUSET",
  c.ID_FLEX_STRUCTURE_NAME "Chart Of Account Structure Name",
  b.application_column_name "Internal Segment"
from
  FND_ID_FLEX_SEGMENTS a,
  FND_ID_FLEX_SEGMENTS_TL b,
  FND_ID_FLEX_STRUCTURES_VL c
where
  b.language = 'US'
  and c.ID_FLEX_NUM = b.ID_FLEX_NUM
  and c.enabled_flag = 'Y'
  and b.application_id = a.application_id
  and b.id_flex_num = a.id_flex_num
  and b.application_column_name = a.application_column_name
  and a.application_id = 101