How to Create the Value Set via Script


BEGIN
   FND_FLEX_VAL_API.SET_SESSION_MODE ('customer_data');          /*Mandatory*/
   FND_FLEX_VAL_API.CREATE_VALUESET_TABLE (
      VALUE_SET_NAME            => 'XXCONA_REQ_NO_VS',
      DESCRIPTION               => 'XXCONA Requisition Number',
      SECURITY_AVAILABLE        => 'N',
      ENABLE_LONGLIST           => 'N',
      FORMAT_TYPE               => 'Char',
      MAXIMUM_SIZE              => 20,
      PRECISION                 => NULL,
      NUMBERS_ONLY              => 'N',
      UPPERCASE_ONLY            => 'N',
      RIGHT_JUSTIFY_ZERO_FILL   => 'N',
      MIN_VALUE                 => NULL,
      MAX_VALUE                 => NULL,
      TABLE_APPLICATION         => 'Purchasing',
      table_appl_short_name     => 'PO',
      TABLE_NAME                => 'PO_REQUISITION_HEADERS',
      ALLOW_PARENT_VALUES       => 'N',
      VALUE_COLUMN_NAME         => 'SEGMENT1',
      VALUE_COLUMN_TYPE         => 'Char',
      VALUE_COLUMN_SIZE         => 20,
      MEANING_COLUMN_NAME       => NULL,
      MEANING_COLUMN_TYPE       => NULL,
      MEANING_COLUMN_SIZE       => NULL,
      ID_COLUMN_NAME            => NULL,
      ID_COLUMN_TYPE            => NULL,
      ID_COLUMN_SIZE            => NULL,
      WHERE_ORDER_BY            => 'WHERE org_id = mo_global.get_current_org_id ORDER BY segment1 DESC',
      ADDITIONAL_COLUMNS        => NULL
   );
   COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (SQLERRM);
END;

end;