Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Switch between open sessions

Former Member
0 Likes
1,145

Hi,

I am just wondering if anyone knows a script which can be used to change between sessions preferable in either GuiXT or VBS?

As i want to always have one session open and using a push button switch windows to the other session and run the next part of the script.

Thanks,

Graeme

Hi,

I am just wondering if anyone knows a script which can be used to change between sessions preferable in either GuiXT or VBS?

As i want to always have one session open and using a push button switch windows to the other session and run the next part of the script.

Thanks,

Graeme

1 REPLY 1
Read only

script_man
Active Contributor
0 Likes
580

Hi Graeme,

I'm more at home in this forum:

For GuiXT I had an example. A GuiXT - Script opens a new session with the transaction = "BP". Since the variable GeschPartner unknown in the new session, it will be transported there.


. . . 
Screen SAPLRECA_BDT_APPL_TOOL.0100
  set V[GeschPartner] "&F[GeschPartner]"
  copytext fromString="GeschPartner" toText="t1"
  copytext fromText="t1" toSharedText="s1"
 Enter "/obp" process="Next_Script.txt"

Next_Script.txt:


Screen SAPLBUS_LOCATOR.3000
  Enter "/Menu=1,1"
 
Screen SAPLBUPA_DIALOG_JOEL.1600
  copytext fromSharedText="s1" toText="t1"
  copytext fromText="t1" toString="GeschPartner"
  Set F[Geschäftspartner] "&V[GeschPartner]"
  Enter
. . . 
Screen SAPLBUPA_DIALOG_JOEL.1600
 Enter "/i"
returnvalues "V[NewParamater_1]:&V[NewParameter_1];V[NewParameter_2]:&V[NewParameter_2];OK:/0,process=Next_Script_1.txt"

The command Enter "/i" closes the new session and GuiXT can be continued in the original session. The parameters of the new session can be passed with returnvalues​​ to original session. A new script Next_Script_1.txt can be running . . .

With VBS you can do many things. A good example, see e.g. here:

Regards,

ScriptMan