on 03-08-2010 4:41 PM
Hello experts.
I search a solution to control a new screen (pop-up).
Via a specific transaction (ZSU01), i fill some field (user, reference, comment, ...), and i execute => a new screen appear.
Problem : When i record a sapscript, all actions generated on the new screen is not recorded.
Question : How i can control actions in a new screen? I can switch screen?
Maybe i can identify the new screen (by id? ..) and modify my current session with a new Connection.Children ?
Edited by: Christophe Boudinet on Mar 8, 2010 5:42 PM
Hi Christophe,
basically, a script can be recorded only in the first mode. Is the new screen a new mode, we must proceed as follows:
1. The script will be recorded in the first mode should be terminated
2. The resulting script must be manually added the following lines:
For example:
...
session.findById("wnd[0]/tbar[0]/okcd").text = "/i"
session.findById("wnd[0]").sendVKey 0
set wshell = createObject("Wscript.Shell")
PATH = "c:\Documents and Settings\USERNAME\sapworkdir"
wshell.run chr(34) & PATH & "\script_2.vbs" & chr(34)
3. Thereafter, this script should be under a new name eg script_1.vbs be saved.
4. Now the first mode should be closed.
After the first mode has been closed, the new mode (screen) is still open, this is internally declared as the first mode.
5. A new script in the new session is being recorded.
6. Thereafter, this script should be under a new name eg script_2.vbs be saved.
7. Done
When the new screen is not a new mode, I only know the method wshell.sendkeys.
Regards,
ScriptMan
Edited by: ScriptMan on Mar 10, 2010 9:39 AM
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.