How to Delete AP Invoice Data from the Oracle Apps EBS R12.
-- API "AP_AI_TABLE_HANDLER_PKG.DELETE_ROW" can be used to delete AP Invoice Data.
------- This Script can be used when invoice accounting is not done.
DECLARE
CURSOR CUR1 IS
SELECT AIA.ROWID,AIA.* FROM AP_INVOICES_ALL AIA WHERE AIA.BATCH_ID <>13000;
BEGIN
MO_GLOBAL.SET_POLICY_CONTEXT('S',101); -- CHANGE THE ORG ID AS PER INSTANCE SETUP.
FOR I IN CUR1 LOOP
AP_AI_TABLE_HANDLER_PKG.DELETE_ROW(I.ROWID,'APXINWKB');
END LOOP;
COMMIT;
END;
-- API "AP_AI_TABLE_HANDLER_PKG.DELETE_ROW" can be used to delete AP Invoice Data.
------- This Script can be used when invoice accounting is not done.
DECLARE
CURSOR CUR1 IS
SELECT AIA.ROWID,AIA.* FROM AP_INVOICES_ALL AIA WHERE AIA.BATCH_ID <>13000;
BEGIN
MO_GLOBAL.SET_POLICY_CONTEXT('S',101); -- CHANGE THE ORG ID AS PER INSTANCE SETUP.
FOR I IN CUR1 LOOP
AP_AI_TABLE_HANDLER_PKG.DELETE_ROW(I.ROWID,'APXINWKB');
END LOOP;
COMMIT;
END;
Hello,
ReplyDeleteTrying to delete an Invoice using the sample script above and got below error.
ORA-20001: APP-SQLAP-10000: ORA-01403: no data found occurred in
AP_AI_TABLE_HANDLER_PKG.DELETE_ROW<-APXINWKB
with parameters (p_Rowid = AAq6jeAHHAAARMAAAE)
while performing the following operation:
Get the invoice_id
-20001
regards, Lovely