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

Query To Fetch AP Invoice Details From SO Number(Doc ID 2949013.1)

SELECT dh.source_order_number       ,df.source_line_number as so_line_number   ,df.fulfill_line_number    ,ddr.doc_user_key as po_number...