cancel
Showing results for 
Search instead for 
Did you mean: 

SAP VBScript and the Easy Access Screen

Former Member
0 Kudos

Hello All. I am recording SAP vbScripts and have found that I can't use them unless I am at the Easy Access Screen (the screen you get when you first login to SAP). However, I am not always at the Easy Access Screen when I need to run the script.

I've tried creating adding several "Back" (or F3) entries in the script to get to the E.A.S., but sometimes there is a message box which that triggers after pressing the back button and the script errors out. Does anybody know if there is a solution to this?

Also, I don't want to record a script going back to the E.A.S. because I could be at any transaction at the time of running the script.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To start a new Transaction - altough one is currently startet - you can use the method Session.StartTransaction("SE38").

Max

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks to everyone for providing the info on this. I've tested it an it works as I wanted it to.

Former Member
0 Kudos

As Stefan said, use "/N" before transaction code.

For example for trscn CA03: session.findById("wnd[0]/tbar[0]/okcd").text = "/NCA03"

To jumnp right int o easy access menu:

session.findById("wnd[0]/tbar[0]/okcd").text = "/NS000"

0 Kudos

Years late, but the insertion of /n was perfect for what I needed with my script. I had been searching for days to find out how to instruct the script to either (1) operate within a specifically identified session, or (2) have the first child session back out of whatever tcode it was in to execute the tcode identified in the script. /n basically accomplishes (2) with the least amount of headache. I'm still stuck with running my script within the first session, but for my purposes it doesn't really matter. I just needed that first session to be able to launch a different tcode from whatever state it was in.

stefan_schnell
Active Contributor
0 Kudos

Hello Steve,

welcome in the Scripting forum.

You can use /n in front of you transaction code, e.g.

session.findById("wnd[0]/tbar[0]/okcd").text = "/nSE38"

On this way you jump back and start the new transaction in the same session.

Hope it helps. Let us know.

Cheers

Stefan