PL-SQL code to delete XML/BI Publisher template and Data Definition
delete XML/BI Publisher template and Data Definition
Oracle apps ebs delete bi publisher
oracle delete xml template
SET SERVEROUTPUT ON
DECLARE
-- Change the following two parameters
var_templatecode VARCHAR2 (100) := 'XXTEST'; -- Template Code
boo_deletedatadef BOOLEAN := FALSE;
-- delete the associated Data Def.
BEGIN
FOR rs
IN (SELECT t1.application_short_name template_app_name,
t1.data_source_code,
t2.application_short_name def_app_name
FROM xdo_templates_b t1, xdo_ds_definitions_b t2
WHERE t1.template_code = var_templatecode
AND t1.data_source_code = t2.data_source_code)
LOOP
xdo_templates_pkg.delete_row (rs.template_app_name, var_templatecode);
DELETE FROM xdo_lobs
WHERE lob_code = var_templatecode
AND application_short_name = rs.template_app_name
AND lob_type IN ('TEMPLATE_SOURCE', 'TEMPLATE');
DELETE FROM xdo_config_values
WHERE application_short_name = rs.template_app_name
AND template_code = var_templatecode
AND data_source_code = rs.data_source_code
AND config_level = 50;
DBMS_OUTPUT.put_line ('Template ' || var_templatecode || ' deleted.');
IF boo_deletedatadef
THEN
xdo_ds_definitions_pkg.delete_row (rs.def_app_name,
rs.data_source_code);
DELETE FROM xdo_lobs
WHERE lob_code = rs.data_source_code
AND application_short_name = rs.def_app_name
AND lob_type IN ('XML_SCHEMA',
'DATA_TEMPLATE',
'XML_SAMPLE',
'BURSTING_FILE');
DELETE FROM xdo_config_values
WHERE application_short_name = rs.def_app_name
AND data_source_code = rs.data_source_code
AND config_level = 30;
DBMS_OUTPUT.put_line (
'Data Defintion ' || rs.data_source_code || ' deleted.');
END IF;
END LOOP;
DBMS_OUTPUT.put_line (
'Issue a COMMIT to make the changes or ROLLBACK to revert.');
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
DBMS_OUTPUT.put_line (
'Unable to delete XML Publisher Template ' || var_templatecode);
DBMS_OUTPUT.put_line (SUBSTR (SQLERRM, 1, 200));
END;
/
Related posts:
- Register a test concurrent program from backend in Oracle EBS
- Supervisor Hierarchy and Approval Limits in Oracle EBS R12
- Query to find vacation rules in Oracle R12
- View java class source in oracle database
- Load Java source code in oracle database
- Query to find all APIs of Oracle Apps modules
- OAF customizations queries
- Oracle apps list of concurrent programs in a Request Set
- Query to get Organization Hierarchy in Oracle apps
- Oracle apps query to find incompatible programs blocking a concurrent request
- Form function attached to which responsibility and user
- Query to find the responsibility attached to user in oracle apps
- How to enable debug log in Oracle apps EBS
- How to add AME role and responsibility to user
- Oracle form attached to which responsibility
- SQL query to get MIME type for file extension
- Query to get concurrent program and executable details
- Query to get responsibility level profile option values
- Query to validate migration of XML/BI Publisher Template and Data Definition
- Query to get details of XML/BI Publisher Template and Data Definition
- Query to get Site level and Organization level Profile Option Value
- PL-SQL code to reset application user password
- PL-SQL Procedure to send email with attachment
- PL-SQL to delete Concurrent Program and Executable
- Query to get the details of the lock in the database
- PL-SQL code to delete XML/BI Publisher template and Data Definition
- Query to find Form Personalization
- Query to find profile option values
- Query to get details of concurrent program parameters
- PL-SQL Code to find Menu Hierarchy of a responsibility
- Query to find details of Flex value sets
- Query to find concurrent program Responsibility and Request Group
- Concurrent program SQL statement currently running in background
- Query to find scheduled concurrent programs
- Query to kill database session for a concurrent request
- Query to get DFF (Descriptive Flex Field) Details
