1 person found this helpful
You write code in a PLSQL procedure in database and call that procedure in After Reports Trigger of RDF.
Sample code is given in following note.
How To Get Statement Output in PDF? Is There A Sample Template For AR Statements? (Doc ID 603338.1)
You did do a commit after the fnd_request.submit_request right?
Can you explain what you try to achieve? Since you call XDOREPPB I sort of assume you want to call BI Publisher on your output or something??
If thát is the case, this should not be necessary .. if you register your template on the same application and concurrent program name it should automatically start and publish your output.
Otherwise what you try to do is that you try to publish the output of your program, but your program was still running, so XDOREPPB could not handle it. You could try submitting XDPOREPPB with a little lack time, so it's submitted, but only starts in a few minutes. As long as you use the commit after the submit that might work. But like I said, it should not be necessary if that is what you try to achieve if the setup is right.
If you requirement is just to ftp the file once the program is completed then you can use the delivery options ftp option while submitting the program from submit request window.
I moved all of the code to a separate pl/sql package and then just called it from the after-report trigger as you suggested. This works!
Statement Generation (ARXSGPO) After Report Trigger --> call Procedure in custom package --> calls XDOREPPB using fnd_request.submit_request and on-completion--> calls custom ftp job using fnd_request.submit_request