Got the solution.
We can get an instance of FPM, using the cl_fpm_factory=>get_instance(). From the instance, use the get_runtime_info() method to get the application id etc compare with what is coming from Cockpit/Freight Order UI/POWL and place separate logic for each of them.