cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving System Name used in JCO connection ?

Former Member
0 Kudos

Hi All,

Do you know how to retrive the System Name paramer value used in JCO connection using Web Dynpro programe. If so can you please sen me how.

I promise to award points for the correct answer.

Thank you and Regards

Maruti CR

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Maruti,

Try this (I'm assuming you want the system name of a model you used):

MODELNAME model = (MODELNAME)WDModelFactory.getModelInstance(MODELNAME.class);
	
IWDJCOClientConnection jcoClientConn = (IWDJCOClientConnection)model.getJcoClient();
	
String sysName = model.getSystemName();

Former Member
0 Kudos

Hi Jennifer,

Thank you for your reply. I am still trying to get the SAP system name for the model used. I trind to your your code but I am getting some compilation errors.

Bapi_User_Get_Detail_Input iasmodel = new Bapi_User_Get_Detail_Input();

The code I used is

Bapi_User_Get_Detail_Input iasmodel = (Bapi_User_Get_Detail_Input)WDModelFactory.getModelInstance(Bapi_User_Get_Detail_Input.class);

IWDJCOClientConnection jcoClientConn = (IWDJCOClientConnection)iasmodel.modelInstance();

I am getting compile errors..

The type of model represented by class 'com.ias.Bapi_User_Get_Detail_Input' is not compatible for creation by WDModelFactory

Can you please suggest?

Thank you and Regards

Maruti CR

Former Member
0 Kudos

Call transaction STFC_CONNECTION to get the System ID and user info.