Monday, 2 October 2023

Query to Retrive Purchasing mapping set in oracle fusion

 select
XMST.name,
DeliverLoc.LOCATION_NAME,
gcc.segment1||'.'||
gcc.segment2||'.'||
gcc.segment3||'.'||
gcc.segment4||'.'||
gcc.segment5||'.'||
gcc.segment6||'.'||
gcc.segment7 code_combination,
from XLA_MAPPING_SETS_TL  XMST,
XLA_MAPPING_SET_VALUES xmSV,
gl_code_combinations gcc,
HR_LOCATIONS_ALL DeliverLoc
where XMST.application_id =201  -- Application id for purchasing
and XMST.name ='XX Procure Purchaseing CC MP' -- Name of Mapping Set
and XMST.application_id= xmSV.application_id
and XMST.language ='US'
and xmSV.mapping_set_code=XMST.mapping_set_code
and xmSV.VALUE_CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID
and xmSV.INPUT_VALUE_CONSTANT1=DeliverLoc.location_id