cancel
Showing results for 
Search instead for 
Did you mean: 

Getting backend systemname in webdynpro

Former Member
0 Kudos

Hi,

I am accessing rfc using webdynpro via jco's, how to retrieve the backend system name programatically, so i can set some import parameters based on system name.I tried using IWDJCOClientConnection class, but getting error java.lang.nullpointerexception.My java engine where i deploy webdynpro is remotely connected , not local.Both jco's are configured, i can get the data from webdynpro but when tried to get backend system info, its giving error.Below is the code i tried

try {

String jco1="WD_MODELDATA_DEST";

String jco2="WD_RFC_METADATA_DEST";

IWDJCOClientConnection jConnection = WDSystemLandscape.getJCOClientConnection(jco1);

String sysname=jConnection.getSystemName();

wdComponentAPI.getMessageManager().reportSuccess("sysname is : "+ sysname);

} catch (WDSystemLandscapeException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

Can you please provide some info how i can get backend R-3 system name where the rfc is residing.Is there any other way to retrieve the system name using webdynpro.

Thanks,

pkv

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi PKV,

I do not know what kind of error you are receiving, but the value of getSystemName() could be NULL if the connection is defined by application server and system id.

Check also the javadoc:

[http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/services/sal/sl/api/IWDJCOClientConnection.html]

Rgds,

Alain

Answers (0)