oracle apps General Ledger Query to delete the budget lines from Budget Interface Table in R12

 

General Ledger SELECT Query to get the details for the Budget Name and Budget Entity Name

SELECT GBI.* FROM GL_BUDGET_INTERFACE GBI
WHERE 1=1
AND GBI.LEDGER_ID = <PROVIDE_LEDGER_ID>
AND GBI.BUDGET_NAME= ‘<PROVIDE_BUDGET_NAME>’
AND GBI.BUDGET_ENTITY_NAME= ‘<PROVIDE_BUDGET_ENTITY_NAME>’
AND GBI.FISCAL_YEAR = ‘<PROVIDE_FISCAL_YEAR>’ –2016

 

Get the count for the Budget lines from the Budget Interface Table that need to be deleted

SELECT count(1) FROM GL_BUDGET_INTERFACE GBI
WHERE 1=1
AND GBI.LEDGER_ID = <PROVIDE_LEDGER_ID>
AND GBI.BUDGET_NAME= ‘<PROVIDE_BUDGET_NAME>’
AND GBI.BUDGET_ENTITY_NAME= ‘<PROVIDE_BUDGET_ENTITY_NAME>’
AND GBI.FISCAL_YEAR = ‘<PROVIDE_FISCAL_YEAR>’

 

General Ledger DELETE Query to remove /delete  the budget lines  for the provided Budget Name and Budget Entity Name

DELETE FROM GL_BUDGET_INTERFACE
WHERE 1=1
AND GBI.LEDGER_ID = <PROVIDE_LEDGER_ID>
AND GBI.BUDGET_NAME= ‘<PROVIDE_BUDGET_NAME>’
AND GBI.BUDGET_ENTITY_NAME= ‘<PROVIDE_BUDGET_ENTITY_NAME>’
AND GBI.FISCAL_YEAR = ‘<PROVIDE_FISCAL_YEAR>’