Hi All,
I am also running the same package but unable to run it from PL SQL. please guide me for the same.when i am running this procedure it gives some error at "raise_application_error(-20001, return_text);" --line num 72 in app_exception package.
please help me to run this successfully.
Regards,
Shailendra
Cancelling mass Invoices
-
- Posts: 1
- Joined: Thu Dec 20, 2012 7:49 am
- Location: India
hi all
i m trying to run the same thing from plsql procedure for cancellation of invoices .
i m getting the same error .
AP_DISTS_NO_OPEN_FUT_PERIOD
reason what i got is the function Ap_Cancel_Single_Invoice in package ap_cancel_pkg checks whether the period is open through this call ...
-- 1. If there is no open period, return FALSE --
------------------------------------------------------------------------
l_debug_info := 'Check whether there is an open period';
-- Bug1715368
l_open_period := ap_utilities_pkg.get_current_gl_date(p_accounting_date);
if l_open_period is null then
ap_utilities_pkg.get_open_gl_date(p_accounting_date,
l_open_period,
l_open_gl_date);
if l_open_period is null then
P_message_name := 'AP_DISTS_NO_OPEN_FUT_PERIOD';
RETURN FALSE;
end if;
else
l_open_gl_date := p_accounting_date;
end if;
-----------------------------------------------
function get_gl_period_name (P_Date IN date) return varchar2
is
cursor l_current_cursor is
SELECT period_name
FROM gl_period_statuses GLPS,
ap_system_parameters SP
WHERE application_id = 200
AND GLPS.set_of_books_id = SP.set_of_books_id
AND P_Date BETWEEN start_date AND end_date
AND NVL(adjustment_period_flag, 'N') = 'N';
l_period_name gl_period_statuses.period_name%TYPE := '';
begin
open l_current_cursor;
fetch l_current_cursor into l_period_name;
close l_current_cursor;
return (l_period_name);
end get_gl_period_name;
-----------------------------------------------------------
function get_gl_period_name (P_Date IN date) return varchar2
is
cursor l_current_cursor is
SELECT period_name
FROM gl_period_statuses GLPS,
ap_system_parameters SP
WHERE application_id = 200
AND GLPS.set_of_books_id = SP.set_of_books_id
AND P_Date BETWEEN start_date AND end_date
AND NVL(adjustment_period_flag, 'N') = 'N';
l_period_name gl_period_statuses.period_name%TYPE := '';
begin
open l_current_cursor;
fetch l_current_cursor into l_period_name;
close l_current_cursor;
return (l_period_name);
end get_gl_period_name;
------------------------------------------
what i found is the cursor gives me null output and thus causing me error
'AP_DISTS_NO_OPEN_FUT_PERIOD'
i m trying to run the same thing from plsql procedure for cancellation of invoices .
i m getting the same error .
AP_DISTS_NO_OPEN_FUT_PERIOD
reason what i got is the function Ap_Cancel_Single_Invoice in package ap_cancel_pkg checks whether the period is open through this call ...
-- 1. If there is no open period, return FALSE --
------------------------------------------------------------------------
l_debug_info := 'Check whether there is an open period';
-- Bug1715368
l_open_period := ap_utilities_pkg.get_current_gl_date(p_accounting_date);
if l_open_period is null then
ap_utilities_pkg.get_open_gl_date(p_accounting_date,
l_open_period,
l_open_gl_date);
if l_open_period is null then
P_message_name := 'AP_DISTS_NO_OPEN_FUT_PERIOD';
RETURN FALSE;
end if;
else
l_open_gl_date := p_accounting_date;
end if;
-----------------------------------------------
function get_gl_period_name (P_Date IN date) return varchar2
is
cursor l_current_cursor is
SELECT period_name
FROM gl_period_statuses GLPS,
ap_system_parameters SP
WHERE application_id = 200
AND GLPS.set_of_books_id = SP.set_of_books_id
AND P_Date BETWEEN start_date AND end_date
AND NVL(adjustment_period_flag, 'N') = 'N';
l_period_name gl_period_statuses.period_name%TYPE := '';
begin
open l_current_cursor;
fetch l_current_cursor into l_period_name;
close l_current_cursor;
return (l_period_name);
end get_gl_period_name;
-----------------------------------------------------------
function get_gl_period_name (P_Date IN date) return varchar2
is
cursor l_current_cursor is
SELECT period_name
FROM gl_period_statuses GLPS,
ap_system_parameters SP
WHERE application_id = 200
AND GLPS.set_of_books_id = SP.set_of_books_id
AND P_Date BETWEEN start_date AND end_date
AND NVL(adjustment_period_flag, 'N') = 'N';
l_period_name gl_period_statuses.period_name%TYPE := '';
begin
open l_current_cursor;
fetch l_current_cursor into l_period_name;
close l_current_cursor;
return (l_period_name);
end get_gl_period_name;
------------------------------------------
what i found is the cursor gives me null output and thus causing me error
'AP_DISTS_NO_OPEN_FUT_PERIOD'
Who is online
Users browsing this forum: No registered users and 0 guests