My requirement is to detach a particular pll from oracle forms. Since I have a big list of forms, I have decided to automate it.
I used oracle.forms.jdapi API
I am able to detach all the pll but I am not able to detach a pll from the second level.
For example:
A.pll,B.pll,C.pll are attached to XYZ.pll.
My form ABC is attached with XYZ pll
My objective is to remove C.pll
IF C.pll is directly attached to my forms I am able to detach but in the case I mentioned above I am not able to detach.
Can someone help me on this?

IF C.pll is directly attached to my forms I am able to detach but in the case I mentioned above I am not able to detach.

The save operation on PLL files is not supported with the JDAPI, so even though you can operate on the objects in a PLL file the save method will fail reverting all your changes. So you can't detach another PLL from a PLL with JDAPI. The only thing which comes to my mind is to convert the PLL into PLD using rwconverter, remove the line

attach <your_library_name>

and convert the PLD into a PLL again. However; it would be far easier to just one-time detach the library in forms builder...