Solution:
We can make the Oracle report concurrent program ends
with warning based on conditions.
Let’s do
the sample rdf report first.
Then Save
this as XX_SAMPLE_ALL.rdf
And prepare layout.
Save it
and go to oracle applications system administrator responsibility and create
executable like below.
Then
create concurrent program.
Then
attach it to request group and go to that responsibility and then run the
report through SRS window. Before this, make sure that our XX_SAMPLE_ALL.rdf is
in server respective folder.
It is
completed Normal. Click on view output
Now our requirement is
whenever the output contains no data then the report should end with Warning
status.
Save it and move to server.
And run the report and check
the output
So here no data but the
report completed normal. But we need the concurrent program should goes to
Warning status. For this take one summary column for count on any column from
data model query.
Then go to After report
trigger and write code like this.
function AfterReport return
boolean is
l_result boolean;
begin
SRW.USER_EXIT('FND SRWEXIT');
If :CS_COUNT<1 then
l_result :=
fnd_concurrent.set_completion_status('WARNING','Optional Sample Warning Text');
end if;
commit;
return (l_result);
end;
Then save the report and move
to server and run the report.
Now it shows completed
Warning. Click on the output.
Note:
-------
To achieve this we should use
user exits and P_CONC_REQUEST_ID and we shouldn’t use fnd_global.apps_initialize.
No comments:
Post a Comment