How to get Concurrent Request ID of a parent program in a child program of a Request Set?

Upon a requirement I have created a request set with multiple programs in it. I was in a need to pull request ID of the first program in the request of the second program. I tried to figure out if there are any options within concurrent program definitions but I couldn’t find any, so I tried to find if there is any function in ‘FND_GLOBAL’ package and I have left with no luck here.

I tried to find a solution by creating a two sample programs ‘XX CP to get parent request ID – 1’ and ‘XX CP to get parent request ID – 2’ and added them to a request set ‘XX CP Test RS1’. When I submit the request set I have observed that the programs in the request are submitted by another program called ‘Request Set Stage’. So, the first program is not triggering the 2nd program, the program ‘Request Set Stage’ triggers the programs in the request set one after the other. You can observe the same in the below screenshots.

Request in the SRS Window:
You can observe the order of request IDs, we can see that one request ID is skipped after every program submission
Requests in the View Requests Form

You can find in the below screenshot that the skipped request ID is related to ‘Request Set Stage’
Request ID of the programs submitted in the Request Set

So, finally I provided the solution this way. Within the script of first program I have called the 2nd program by using ‘fnd_request.submit_request’ API and I have used ‘fnd_global.CONC_REQUEST_ID‘ in the first program to find its request id and passed the request ID as a concurrent program parameter to ‘fnd_request.submit_request’ API to run the second program.

Also, see –> PL/SQL Script to Submit a Concurrent Request form backend