cancel
Showing results for 
Search instead for 
Did you mean: 

Execute RFC from PDK based development

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

Koti,

Thanks for your reply. But my thing is I do not want to use JCO Client service as the developer has the explicitly put the connection parameters in the code or in a property file.

Is there any other way of getting connection from SAP & execute RFC

Thanks

Aakash

Former Member
0 Kudos

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

Answers (0)