How to find segment and FLEX value set id of General Ledger throw scripts


SELECT
  FLEX_VALUE_SET_ID
, SEGMENT_NUM
, SEGMENT_NAME
, APPLICATION_COLUMN_NAME
FROM FND_ID_FLEX_SEGMENTS_VL
WHERE ID_FLEX_CODE = 'GL#'
AND ENABLED_FLAG='Y'
ORDER BY SEGMENT_NUM



Find the Description
---------------------------

SELECT description||' ('||flex_value||')' Description
  FROM fnd_flex_values_vl
  WHERE flex_value_set_id = 1014548 --example
  AND flex_value = :P_COMPANY;  --example segment1