Thursday, August 16, 2018

API to delete Value Set Value from Independent Value Set in Oracle APPS

DECLARE
   l_err_msg   VARCHAR2 (1000) := NULL;
   CURSOR c1
   IS
      SELECT ffv.flex_value_id, ffv.flex_value
  FROM fnd_flex_value_sets ffvs
      ,fnd_flex_values ffv
      ,fnd_flex_values_tl ffvt
 WHERE     flex_value_set_name = 'XX Value Set Name' -- Value Set Name
       AND ffv.flex_value_set_id = ffvs.flex_value_set_id
       AND ffvt.flex_value_id = ffv.flex_value_id
       AND ffvs.flex_value_set_id = ffv.flex_value_set_id
       AND ffv.flex_value = 'XX Value Set Value1'
       AND ffvt.language = USERENV('LANG')--'US'
       AND ffv.enabled_flag = 'Y'
       AND ffv.summary_flag = 'N';
BEGIN
   FOR i IN c1
   LOOP
      fnd_flex_values_pkg.delete_row (i.flex_value_id);
      COMMIT;
      DBMS_OUTPUT.put_line (i.flex_value_id || ' Deleted  Successfully !!!!');
   END LOOP;
EXCEPTION
   WHEN OTHERS
   THEN
      l_err_msg := SQLERRM;
      DBMS_OUTPUT.put_line ('Exception: ' || l_err_msg);

END;

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)