on 03-28-2013 2:39 PM
Hello All,
I'm using SAP GUI for Java 7.20 on Linux/Rhel6.3, and I'm trying to find some way to automatically log onto SAP systems, something similar to sapshcut that exists for SAPGUI Windows.
I've been looking into the possibility of SAPGUI supported scripts, I went through all documents in here http://scn.sap.com/docs/DOC-8971 but with no luck of.
With the scrpting record window I was able to record some simple stuff like
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-MANDT").text = "000";
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-BNAME").text = "USER";
// The text of a password field is not recorded. Either enter a valid password or delete the following line
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/pwdRSYST-BCODE").text = "****";
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-LANGU").text = "en";
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-LANGU").setFocus();
application.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2;
application.findById("/app/con[0]/ses[0]/wnd[0]").resizeWorkingPane(193,31,false);
application.findById("/app/con[0]/ses[0]/wnd[0]").sendVKey(0);
but when I try to run it via command line in : $guilogon -f skript, nothing happens
I know that I'm missing something, but I can't find what.
Could someone please push me into the right direction ?
cheers,
michal
Hello,
the script you have recorded starts with filling a a logon screen. Of course, you also need one when playing back. So you need to specify the connection also, like
guistart conn=/H/appserver.acme.com/S/3200 -f testscript
Another option is to specify the logon data in parameters like
guistart conn=/H/appserver.acme.com/S/3200&user=guest&pass=secret&tran=mytransaction
It is the same as saving a connection in SAP Logon and providing the logon data in the "logon" tab of the new connection dialog.
A safer approach regarding passwords would be to use Secure Network Connection including authentication.
Best regards
Rolf-Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eva,
Please check the below options
1. if scripting is disabled by the user, check SAP GUI options
2. if scripting is disabled on the server, check parameter sapgui/user_scripting in RZ11
3. uncheck "Low Speed Connection" in SAPGUI options
Passwords are not recorded in SAPGUI scripting. You need to save the password in the script.
One more thing, if you are trying to run the VBS script, then it is not possible. VBS script doesn't supported by SAP GUI Java.
Better use JavaScript. It is supported by both SAP GUI for Windows as well as Java.
Also please follow the below threads.
http://scn.sap.com/message/8007715
http://scn.sap.com/thread/1455374
Hope this helps.
Regards,
Rajkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.