cancel
Showing results for 
Search instead for 
Did you mean: 

Run Shorcut.Exe SAPGUI 730 From Java

0 Kudos

Hi ,

We had written a Java application. It's build a command line as shurtcut and we ara login SAP ERP automaticaly.

There is no problem until SAP GUI 720 .

But Java application don't work for SAP GUI 730.

When i want to login , process is waiting. So I terminate

the java application but after command line work.

My java Code :

    Runtime rt = Runtime.getRuntime();

    Process pr = rt.exec(command_line);

Command line parameter is 'C/:....shurcut.exe -user..-password ...'.

Can anybody help us ?

I think this is interest securtiy in SAPGUI 730 .

Accepted Solutions (0)

Answers (1)

Answers (1)

ACE-SAP
Active Contributor
0 Kudos

Hi

You can either connect using SAPGui binary or the SAP shortcut binary.

Here are two examples that I did test on a SAPGui 7.30

The '-gui' parameter is optional but it can allow to connect on a SAP system that is not defined in the SAPLogon.ini config file of the client

The  -command param allows to open a specific report/transaction.

Regards


"%ProgramFiles%\SAP\FrontEnd\SAPgui\sapgui.exe" /SHORTCUT="-system=XXX -client=200 -user=TEST -pw=password -language=E -type=Transaction -command=se38 -gui=/H/SAP_srv_hostname/S/3200"

"%ProgramFiles%\SAP\FrontEnd\SAPgui\sapshcut" -system=XXX -client=200 -user=TEST -pw=password -language=E -type=Transaction -command=se38 -gui=/H/SAP_srv_hostname/S/3200



103019 - SAPshortcut: Program parameters

SAPshortcut - Netweaver Technology - SCN Wiki

0 Kudos

Thank Yves.

My problem is ,   when I run my command text via Windows Command Line no problem occurs but

same line run via My Java Application GUI dont open until i terminate application.

Why is Java Appilication Don' Work ? My Application is worked SAPGU 720.

My Command Text

C:\Program Files\SAP\FrontEnd\SAPgui\sapshcut.exe

-sysname="Customer PRD" -client=100 -user=CONUSER -pw=PASS -language=EN -type=Transaction -command=SESSION_MANAGER

ACE-SAP
Active Contributor
0 Kudos

This can happen if option are not recognized.

So the command is working when you launch it from shell prompt but not working when called from Java ?

Pay attention to the fact that sysname parameter depends on option defined in the SAPGui of the computer you are running the command on ( => saplogon.ini). If the saplogon.ini is not the same on all machine you can get into trouble.

Regards

0 Kudos

I click to Login buton on my java program after command executing. But it's waiting until terminate my java program . I terminate java program then sapgui is openining .

ACE-SAP
Active Contributor
0 Kudos

So the problem seems to come from interactions between your Java app & the SAPGui client...

I'm afraid I cannot help you in that area...

Sriram2009
Active Contributor
0 Kudos

Hi

In the command prompt you can use

" start sapshcut.exe -sysname="Customer PRD" -client=100 -user=CONUSER -pw=PASS -language=EN -type=Transaction -command=SESSION_MANAGER "

Regards

Former Member
0 Kudos

Not sure that exists some relation between these two events: closing your java application and starting sapgui session. Is your java code as simple as your provided in first message. The same code works on my machine.

0 Kudos

Hi Roman,

My hava code work for SAP GUI 720 , but dont work for SAP GUI 730.  Do you use SAPGUI 730 ?

Former Member
0 Kudos

SAPGUI 7.30 SP7.

0 Kudos

Can you send sample java code ?

Former Member
0 Kudos

Hi,

got the same problem.

A Java Applet is loaded and tries to start sapshcut.exe to view a transaction.

In background a jp2launcher.exe (Java 😎 is started.

The sapshcut.exe is executed after several minutes. If i kill the jp2launcher process
the sapshcut works immediately.

The only workaround I found, is replacing the sapshcut.exe from SapGui Rel. 7.3 or 7.4
with the sapshcut.exe from the 7.2 version.

That works.

Regards

Ralf Mertens