Wednesday, February 19, 2020

API to Delete Descriptive Flex Field Context in Oracle APPS

--------------------------------------------------------------------------------
--API to delete Descriptive Flex Field Context
--------------------------------------------------------------------------------
DECLARE
CURSOR c1
IS
SELECT dff.application_id
  ,dff.descriptive_flexfield_name
              ,dff_context.descriptive_flex_context_code
  FROM fnd_descriptive_flexs_vl dff
              ,fnd_descr_flex_contexts_vl dff_context
         WHERE title = 'Requisition Headers'
   AND dff.descriptive_flexfield_name = dff_context.descriptive_flexfield_name
   AND dff_context.descriptive_flex_context_code IN ('Test','Req Operating Enable')
;
BEGIN
FOR i IN c1
LOOP
BEGIN 
fnd_descr_flex_contexts_pkg.delete_row(x_application_id                => i.application_id
  ,x_descriptive_flexfield_name    => i.descriptive_flexfield_name
  ,x_descriptive_flex_context_cod  => i.descriptive_flex_context_code
  ); 
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error occured while deleting DFF Context. Error Message: '||SQLERRM);
END;

dbms_output.put_line('DFF Conetext Filed: '||i.descriptive_flex_context_code ||' deleted successfully');

END LOOP;


END;

--
--Run below query to validate deletion successfully or not
/*SELECT dff.application_id
  ,dff.descriptive_flexfield_name
              ,dff_context.descriptive_flex_context_code
  FROM fnd_descriptive_flexs_vl dff
              ,fnd_descr_flex_contexts_vl dff_context
         WHERE title = 'Requisition Headers'
   AND dff.descriptive_flexfield_name = dff_context.descriptive_flexfield_name
   AND dff_context.descriptive_flex_context_code IN ('Test','Req Operating Enable')
;
*/

-- Issue commit 

1 comment:

  1. KPMG Lease Management Tool (KPMG LMS) assists businesses in complying with IFRS 16. KPMG supports the management of multiple lease contract. The service features a combination of purpose-built software and a behind-the-scenes data analysis team to help manage your lease accounting efficiently.

    ReplyDelete

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)