Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Execute RFC from PDK based development

Hi All,

I want to execute a RFC from PDK based component (AbstractPortalComp/JSPDynp).

What are the different options availabel for doing executing RFC?

Is there a way I can live without hard coding SAP system Connetion params in the project code or in a properties file?

Any help is appreciated.

Thanks

Aakash

replied

Hi,

you could also use Sap Enterprise Connector - see [http://help.sap.com/saphelp_webas630/helpdata/en/79/c6213e225f9a0be10000000a114084/frameset.htm|http://help.sap.com/saphelp_webas630/helpdata/en/79/c6213e225f9a0be10000000a114084/frameset.htm] for more info.

For getting the client without specifying the login/pass in the code just get it from the usermapping of the current user (from the request) for the alias of the system used:

    IJCOClientService clientService =
      (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
    IJCOClientPoolEntry poolEntry = clientService.getJCOClientPoolEntry(systemAlias, request);
    Client client = poolEntry.getJCOClient();
    if (!client.isAlive()) {
      client.connect();
    }

the rest is as usual - see the help.

Romano

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question