cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Run Transaction Code from CMD

chinni_adapa
Participant
0 Likes
7,645

Dear All,

Please give suggestions on, How can we execute transaction code with out interacting with SAP GUI.

Is it possible to execute transaction code from Command Prompt?

Your inputs are highly appreciated.


Thanks & Regards,

Chinni

Accepted Solutions (0)

Answers (2)

Answers (2)

S_Sriram
Active Contributor
0 Likes

Hi chinni.

Yes, It is possible to execute the transaction code from the Windows command prompt You can use the follow the command to start the SAPGUI along with user id credentials and SAP Transaction code

You can get the more help from  " Start sapshcut / ? "

For example -

start sapshcut  -system=SID -client=xxx -desc=(SAPGUI System desc) -user=(User ID) -pw=password -maxgui -command=( SAP Transaction code)

Regards

SS

chinni_adapa
Participant
0 Likes

Thanks for your reply Prithviraj and Sriram.

By executing that command, we are successfully logged into SAP. I do not want to see that SAP Screen.

My actual requirement is, We have PAT file in my system.By installing PAT file, we should navigate to SAINT transaction and follow some steps, it will installed in SAP.

Now my question is can we install PAT file from command prompt with out seeing SAP Screens.

can we perform same operations which are done in SAINT transaction using Command Prompt.

Regards

Chinni

S_Sriram
Active Contributor
0 Likes

Hi Chinni.

For any SAP installation / upgrade you have to use either from SAPGUI or SUM tool. it is not advice /recommend to do the PAT file installation from the command prompt using the transaction SAINT /SPAM.

Could you share the requirement in detail.

Regards

SS

Former Member
0 Likes

Hi,

You might end up corrupting your system if you do anythin like that from your cmd or putty prompt.

Use SPAM for older releases or else use SUM for newer releases if you would like your installation to go fine without errors. There are many intermediate processes called in between to apply these packages. please use SUM or SPAM and save your time.

chinni_adapa
Participant
0 Likes

We are developing product, for that developed objects in SAP and packed into PAT file. Now this PAT file should automatically installed in client SAP server using my developed product. (client will provide Server name, user name, Instance number....). For that reason, we are searching through command prompt.could you clarify me, is it possible or not.

Regards,

Chinni

Former Member
0 Likes

Hi Chinni,

Automating the process is good idea but something like implementing/installation should be done in a conventional way. As these are complex processes, includes user inputs, multiple screens, settings, and all that.

I would strongly suggest to go through the ideal process for implementing the files.

Though you can try with SAP GUI scripting if that helps, haven't tried it, give try may be in sandbox system.

Regards,

Prithviraj.

Former Member
0 Likes

Hi Chinni,

If I understand the question correctly, you wish to run a tcode by login in SAP from command prompt, then you can achieve this by calling sapshcut.exe with below parameters from cmd

sapshcut.exe -sysname=ABC -client=100 -command=tcode -user=usrName -pw=passwrd

you can have this code written in a batch file and pass tcode as an argument.

or you can set a particular Tcode as initial tocde when logged in SAP. to do so from your inital screen (/n) go to Extras--> choose Set Start Transaction --> Tocde. Done.

Regards,

Prithviraj.