Thursday, 7 June 2018

Script/Query to Delete Concurrent Program and Executable from Backend

--**1. Script to Delete Data Definition**--
BEGIN
XDO_DS_DEFINITIONS_PKG.DELETE_ROW('APPL NAME','DATA DEFINITION CODE');

--
COMMIT;
--
END;

--**Script to Delete Data Template**--
BEGIN
XDO_TEMPLATES_PKG.DELETE_ROW('APPL NAME','DATA TEMPLATE CODE');

--
COMMIT;
--
END;


--2. Script/Query to delete Concurrent Program and Executable from Backend
DECLARE
  prog_short_name    VARCHAR2(240);
  appl_short_name    VARCHAR2(240);
BEGIN
   prog_short_name := 'XXXXXXXX';    --Concurrent Program Short name
   appl_short_name := 'XXXX';     --Application Short name
   --Checking for program and executable is exist or not
   IF fnd_program.program_exists    (prog_short_name, appl_short_name) OR
     fnd_program.executable_exists (prog_short_name, appl_short_name)   
   THEN
   --deleting the program
      fnd_program.delete_program(prog_short_name, appl_short_name);
   --deleting the executable
      fnd_program.delete_executable(prog_short_name, appl_short_name);
      COMMIT;
DBMS_OUTPUT.PUT_LINE (prog_short_name || ' deleted successfully');
   ELSE
      DBMS_OUTPUT.PUT_LINE (prog_short_name || ' not found');
   END IF;
EXCEPTION
   WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE ('Error: ' || SQLERRM);
END;

No comments:

Post a Comment