Tuesday, April 30, 2013

Completing Oracle Report(developer 6i/10g) to Warning/Error

Very old one but still can be very useful for many.

1> Store the required result in a placeholder based on your business requirement.

2> In 'after report' trigger call fnd_concurrent.set_completion_status(<status>,<your message text>);

status can be NORMAL, WARNING or ERROR, it is not case sensitive.

Example:

1> palceholder :p_status_chk

2>
function afterreport return boolean is
v_status_flag boolean;
begin
   srw.user_exit ('FND SRWEXIT');
   if :p_status_chk = 'ERROR' then
      v_status_flag := fnd_concurrent.set_completion_status('ERROR','Please review log file for details.');
      commit;
      --srw.message(1002,'Setting Completion status to Error');
   elsif :p_status_chk = 'WARNING' then
      v_status_flag := fnd_concurrent.set_completion_status('WARNING','Please review log file for details.');
      commit;
      --srw.message(1003,'Setting Completion status to Warning');     
   end if;
return (v_status_flag);
end;

---

No comments:

Post a Comment