Is there a function Module to call a logical Database via function module or classes?
In my case I would need PNPCE, so it is the HCM Module.
You can use the function module LDB_PROCESS.
Here the SAP documentation.
But remember, LDB are obsolete.