Hi Barat,
Its actually a good thinking. This will be helpful for developers many ways..
Up to my understanding, there are no standard BAPI program to met your requirement.
But, you can implement your own BAPI program in order to achieve the logic.
There will be multiple tables involved to derive the details for process chains.
regs,
Sivaa.