---key flexfield tables and links
select *from FND_ID_FLEXS
application_id = 800
id_flex_code = pos
id_flex_name = position flexfield
select *From FND_ID_FLEX_STRUCTURES_VL where application_id=800 and id_flex_code ='POS'
select *from per_position_definitions where position_definition_id = 65889
id_flex_num
position_definition_id = 65887
select *from hr_positions_f where trunc(creation_date)=trunc(sysdate)
position_id
position_definition_id = 65887
select *from FND_ID_FLEXS where id_flex_code='POS'
application_id
id_flex_code
id_flex_name
select *From FND_ID_FLEX_SEGMENTS where application_id=800 and id_flex_num=101
select *From FND_ID_FLEX_STRUCTURES where id_flex_code='POS' and id_flex_structure_code like 'INDIA_POSITIONS'
ID_FLEX_CODE = POS
ID_FLEX_NUM = 101
APPLICATION_ID = 800
id_flex_structure_code = POSITION_FLEXFIELD
select *from FND_FLEX_VALUES where trunc(creation_date)=trunc(sysdate)
select *From FND_FLEX_VALUE_HIERARCHIES
========================================
select fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fifs.id_flex_num,
fis.id_flex_num,
ppd.SEGMENT1,
ppd.segment3,
hpf.position_id
from
fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fis,
per_position_definitions ppd,
hr_positions_f hpf
where hpf.position_definition_id=ppd.position_definition_id
and ppd.id_flex_num=fis.id_flex_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
and fifs.id_flex_code=fif.id_flex_code
and fifs.id_flex_num=fis.id_flex_num
and ppd.position_definition_id = 65887
select fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fifs.id_flex_num,
fis.id_flex_num
from
fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fis
where
and fifs.id_flex_code=fif.id_flex_code
and fifs.id_flex_num=fis.ID_FLEX_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
select fif.application_id,
fif.id_flex_code,
fifs.id_flex_num,
fifs.id_flex_structure_code,
hpf.position_id,
fis.application_column_name,
ppd.position_definition_id
select *FROM
fnd_id_flex_segments fis,
fnd_id_flex_structures fifs,
fnd_id_flexs fif,
per_position_definitions ppd,
hr_positions_f hpf
where fis.id_flex_code=fifs.id_flex_code
and fis.id_flex_num=fifs.id_flex_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
and fif.id_flex_code=fis.id_flex_code
and ppd.position_definition_id=hpf.position_definition_id
and fifs.id_flex_num=ppd.id_flex_num
and hpf.position_id=64472
select *from fnd_id_flexs where application_id=800 and id_flex_code='POS'
select *From fnd_id_flex_structures where id_flex_code='POS' and id_flex_structure_code='POSITION_FLEXFIELD'
SELECT *fROM FND_ID_FLEX_SEGMENTS WHERE ID_FLEX_CODE='POS' AND ID_FLEX_NUM=101
==================================
---descriptive flexfield tables and links
select *from apps.FND_DESCRIPTIVE_FLEXS where application_id=201
descriptive_flexfield_name = PO_REQUISITION_LINES
APPLICATION_ID = 201
APPLICATION_TABLE_NAME = PO_REQUISITION_LINES_ALL
select *from apps.FND_DESCR_FLEX_CONTEXTS where descriptive_flexfield_name='PO_REQUISITION_LINES'
DESCRIPTIVE_FLEXFIELD_NAME = PO_REQUISITION_LINES
APPLICATION_ID = 201
SELECT *FROM apps.FND_DESCR_FLEX_COLUMN_USAGES WHERE DESCRIPTIVE_FLEXFIELD_NAME='PO_REQUISITION_LINES'
APPLICATION_COLUMN_NAME
END_USER_COLUMN_NAME
DESCRIPTIVE_FLEX_CONTEXT_CODE
DESCRIPTIVE_FLEXFIELD_NAME
SELECT *FROM apps.FND_APPLICATION_TL
APPLICATION_ID
APPLICATION_NAME
SELECT FAT.APPLICATION_ID,FAT.APPLICATION_NAME,FDF.DESCRIPTIVE_FLEXFIELD_NAME,FDFC.DESCRIPTIVE_FLEX_CONTEXT_CODE
,FDFCU.APPLICATION_COLUMN_NAME ,
FDFCU.END_USER_COLUMN_NAME
FROM
FND_APPLICATION_TL FAT,
FND_DESCRIPTIVE_FLEXS FDF,
FND_DESCR_FLEX_CONTEXTS FDFC,
FND_DESCR_FLEX_COLUMN_USAGES FDFCU
WHERE FAT.APPLICATION_ID=FDF.APPLICATION_ID
AND FAT.APPLICATION_NAME='Purchasing'
AND FDF.DESCRIPTIVE_FLEXFIELD_NAME='PO_REQUISITION_LINES'
AND FDFC.DESCRIPTIVE_FLEXFIELD_NAME=FDF.DESCRIPTIVE_FLEXFIELD_NAME
AND FDFCU.DESCRIPTIVE_FLEX_CONTEXT_CODE=FDFC.DESCRIPTIVE_FLEX_CONTEXT_CODE
AND FDFCU.DESCRIPTIVE_FLEXFIELD_NAME=FDFC.DESCRIPTIVE_FLEXFIELD_NAME
select *from FND_ID_FLEXS
application_id = 800
id_flex_code = pos
id_flex_name = position flexfield
select *From FND_ID_FLEX_STRUCTURES_VL where application_id=800 and id_flex_code ='POS'
select *from per_position_definitions where position_definition_id = 65889
id_flex_num
position_definition_id = 65887
select *from hr_positions_f where trunc(creation_date)=trunc(sysdate)
position_id
position_definition_id = 65887
select *from FND_ID_FLEXS where id_flex_code='POS'
application_id
id_flex_code
id_flex_name
select *From FND_ID_FLEX_SEGMENTS where application_id=800 and id_flex_num=101
select *From FND_ID_FLEX_STRUCTURES where id_flex_code='POS' and id_flex_structure_code like 'INDIA_POSITIONS'
ID_FLEX_CODE = POS
ID_FLEX_NUM = 101
APPLICATION_ID = 800
id_flex_structure_code = POSITION_FLEXFIELD
select *from FND_FLEX_VALUES where trunc(creation_date)=trunc(sysdate)
select *From FND_FLEX_VALUE_HIERARCHIES
========================================
select fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fifs.id_flex_num,
fis.id_flex_num,
ppd.SEGMENT1,
ppd.segment3,
hpf.position_id
from
fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fis,
per_position_definitions ppd,
hr_positions_f hpf
where hpf.position_definition_id=ppd.position_definition_id
and ppd.id_flex_num=fis.id_flex_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
and fifs.id_flex_code=fif.id_flex_code
and fifs.id_flex_num=fis.id_flex_num
and ppd.position_definition_id = 65887
select fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fifs.id_flex_num,
fis.id_flex_num
from
fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fis
where
and fifs.id_flex_code=fif.id_flex_code
and fifs.id_flex_num=fis.ID_FLEX_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
select fif.application_id,
fif.id_flex_code,
fifs.id_flex_num,
fifs.id_flex_structure_code,
hpf.position_id,
fis.application_column_name,
ppd.position_definition_id
select *FROM
fnd_id_flex_segments fis,
fnd_id_flex_structures fifs,
fnd_id_flexs fif,
per_position_definitions ppd,
hr_positions_f hpf
where fis.id_flex_code=fifs.id_flex_code
and fis.id_flex_num=fifs.id_flex_num
and fifs.id_flex_structure_code='POSITION_FLEXFIELD'
and fif.id_flex_code=fis.id_flex_code
and ppd.position_definition_id=hpf.position_definition_id
and fifs.id_flex_num=ppd.id_flex_num
and hpf.position_id=64472
select *from fnd_id_flexs where application_id=800 and id_flex_code='POS'
select *From fnd_id_flex_structures where id_flex_code='POS' and id_flex_structure_code='POSITION_FLEXFIELD'
SELECT *fROM FND_ID_FLEX_SEGMENTS WHERE ID_FLEX_CODE='POS' AND ID_FLEX_NUM=101
==================================
---descriptive flexfield tables and links
select *from apps.FND_DESCRIPTIVE_FLEXS where application_id=201
descriptive_flexfield_name = PO_REQUISITION_LINES
APPLICATION_ID = 201
APPLICATION_TABLE_NAME = PO_REQUISITION_LINES_ALL
select *from apps.FND_DESCR_FLEX_CONTEXTS where descriptive_flexfield_name='PO_REQUISITION_LINES'
DESCRIPTIVE_FLEXFIELD_NAME = PO_REQUISITION_LINES
APPLICATION_ID = 201
SELECT *FROM apps.FND_DESCR_FLEX_COLUMN_USAGES WHERE DESCRIPTIVE_FLEXFIELD_NAME='PO_REQUISITION_LINES'
APPLICATION_COLUMN_NAME
END_USER_COLUMN_NAME
DESCRIPTIVE_FLEX_CONTEXT_CODE
DESCRIPTIVE_FLEXFIELD_NAME
SELECT *FROM apps.FND_APPLICATION_TL
APPLICATION_ID
APPLICATION_NAME
SELECT FAT.APPLICATION_ID,FAT.APPLICATION_NAME,FDF.DESCRIPTIVE_FLEXFIELD_NAME,FDFC.DESCRIPTIVE_FLEX_CONTEXT_CODE
,FDFCU.APPLICATION_COLUMN_NAME ,
FDFCU.END_USER_COLUMN_NAME
FROM
FND_APPLICATION_TL FAT,
FND_DESCRIPTIVE_FLEXS FDF,
FND_DESCR_FLEX_CONTEXTS FDFC,
FND_DESCR_FLEX_COLUMN_USAGES FDFCU
WHERE FAT.APPLICATION_ID=FDF.APPLICATION_ID
AND FAT.APPLICATION_NAME='Purchasing'
AND FDF.DESCRIPTIVE_FLEXFIELD_NAME='PO_REQUISITION_LINES'
AND FDFC.DESCRIPTIVE_FLEXFIELD_NAME=FDF.DESCRIPTIVE_FLEXFIELD_NAME
AND FDFCU.DESCRIPTIVE_FLEX_CONTEXT_CODE=FDFC.DESCRIPTIVE_FLEX_CONTEXT_CODE
AND FDFCU.DESCRIPTIVE_FLEXFIELD_NAME=FDFC.DESCRIPTIVE_FLEXFIELD_NAME