I am writing a custom backend class to call a custom function module in R3 to get some data. As this has to run before the application start page is loaded, I have used a exit before the /b2b/startapp.do is called.
The problem here is that when I am using the getDefaultJCoConnection() method in the backend class which extends the IsaBackendBusinessObjectBaseSAP class, the JCO user is determined as the application user rather than the RFC user which I have configured in XCM. Because of this there is an authorization error as the application user does not have auth to the custom function group.
I have written many other exits in the application and they are all working fine and picking up the RFC user which has relevant authorizations.
Am I missing something here?