cancel
Showing results for 
Search instead for 
Did you mean: 

I want to start SAPGUI with JAVA Program. Somebody has an idea?

Former Member
0 Kudos

Hello dear forum users,

I would like to start and register me in immediately SAPGUI visible with a Java program. Somebody has an idea of how to do this or with which technology to do this?

Regards,

Hüdayi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

To open SAPGUI from java program, use this code

String []command={"cmd.exe","/c","Start","C:\WINDOWS\SAPwksta\setup\SAL\SapLogon.sal" };

try {

Runtime run=Runtime.getRuntime();

Process proc=run.exec(command);

} catch (IOException e)

{

}

Former Member
0 Kudos

Thank you Laksmi,

So I can start SAPGUI. But I forgot to write further question in that issue: How can I give the SAPGUI futher parameters, like user name and password during start?

Thank you and regards,

Hüdayi

Former Member
0 Kudos

Then start the Java GUI instead from your Java code instead. In the configuration of the Java GUI, you can define parameters for each system (for e.g - client, user, password, language, etc). I am not sure if you can start the login process automatically too, but you certainly can set the login information in the configuration file.

Former Member
0 Kudos

I have the helpful answer,

Process p = Runtime.getRuntime().exec(

"C:/Programme/SAP/FrontEnd/SAPgui/sapshcut.exe -system=EE3 -client=300 -user=RWExxx -pw=yyyyyyy -language=E -command=PFCG");

Based on the parameters the SAPGUI will be logged in with Java code.

Anyway thank you for your help.

Regards,

Hüdayi

Former Member
0 Kudos

Aah! Good to know Thanks for the info, maybe I can put it to use someday too.

T00th

Former Member
0 Kudos

HI,

Great Hudayi.. Good job.. Thanks for letting us know.

Regards

LN