Your Custom Code submit the 'Payment Process Request Program' program
after that writtern fnd_concurrent.wait_for_request for 'Payment Process Request Program' program
after that query concurrent request where parent request id is above submitted
apply wait for request for each program
Please reply still having questions
Thanks for you help. Let me try this way and update...
Earlier it was in request set. Now Its wrapper program and it has to wait until sub child programs are completed.
I wrote below code to achieve this:
PROCEDURE process_child_reqs(p_ppr_request_id IN NUMBER) IS l_count NUMBER := 0; BEGIN g_prc := 'PROCESS_CHILD_REQS'; SELECT COUNT(*) INTO l_count FROM fnd_concurrent_requests WHERE parent_request_id = p_ppr_request_id; IF (l_count > 0) THEN FOR r IN (SELECT request_id FROM fnd_concurrent_requests WHERE parent_request_id = p_ppr_request_id) LOOP @ BEGIN wait_for_req_complete(r.request_id); EXCEPTION WHEN OTHERS THEN FND_FILE.PUT_LINE(FND_FILE.log, ' ERROR WHILE PROCESSING CHILD REQUESTS '||SQLERRM); END; END LOOP; END IF; EXCEPTION WHEN OTHERS THEN FND_FILE.PUT_LINE(FND_FILE.log,g_package||'.'||g_prc||' ERROR: '||SQLERRM); END process_child_reqs;
Ah - ok. Just as a point, you're count(*) statement is surplus - you don't need it.
Also you are swallowing any exception with "when others then" without a subsequent "raise". In a concurrent environment, retcode should be set to 2 in the event of a failure, with errbuf having the error message.