Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Wednesday, October 15, 2014

How to make the Oracle report concurrent program ends with warning?


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.
So first make the output contains No data. For that Just use where 1=2 then it will return no data.
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

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect