I am facing problems while playing back the recording done through SAPGUI(record).
Let's say for creating a sales order through VA01. I did the recording. The recording is smooth without any errors. In the Structure editor also, it shows the same windows and values .
But while playing back (Parameterized or not)after entering the values in the first screen of VA01, it opens 2 new windows with the same screen( First screen of Va01).
The first opened session terminates along with the 2 others after some time giving an error.
From the log I could not find out the problem. If anyone has any idea regarding this problem, please reply back.
Thanks & regards,
There are some options available in SAPGUI Command Interface, which exists for each of the recorded screens. Check for the following values so that you can ensure the successful execution of SAPGUI recorded script. Double click on command interface from the SAPGUI command in the test script editor. On the right side, interface will be opened. There are following options available immediately after the interface name -
1. RestGUI - If the ResetGUI contains 'X', the transaction specified in ProcessedScreen will be started as new. It has a similar effect of executing with /n on directly R/3 system.
SAPGUI commands only replay properly if each successive command starts at exactly the same point at which the last command stopped.
Everything that was recorded in single attempt fulfills this condition but if recorded a test script in sections, this might not be the case. For example, where several transactions have been recorded separately, one can set the ResetGUI flag to 'X' in the first SAPGUI command following each change of transaction.
2. ConnectionID & SessionID - uniquely identify the sessions during replay. When everything should run in the same session, all the SAPGUI command interfaces must have the same SessionID and ConnectionID.
Check for above values, it should sort out your problem.
PS: If the query solves your problem, kindly reward points.
Hello Sasmita, hello SAP Developer,
just to clarify: the ResetGUI flag doesn't doesn't determine whether a new GUI session should be opened or not. It only determines whether the transaction in this SAPGUI command will be started newly (if ResetGui='X') or not (if ResetGui=' ').
In the meantime I noticed that I forgot one important issue in my last answer: opening a new session can also be caused by a change in the logical system name of the target system. So altogether we have three parameter that might lead to opening a new session: the ConnectionID, the SessionID and the logical system name. If one of these parameters in the current SAPGUI command is different from the parameters in the earlier SAPGUI commands, a new GUI session will be opened.
- First SAPGUI command: ConnectionID '/app/con', Session ID 'ses', target system 'MY_TARGET_SYS'
- Next SAPGUI command:
a) ConnectionID '/app/con', Session ID 'ses', target system 'MY_TARGET_SYS' -> a new GUI session will be opened, because the SessionID is different.
b) ConnectionID '/app/con', Session ID 'ses', target system 'MY_TARGET_SYS2' -> a new GUI session will be opened, because the logical name of the target system is different.
c) ConnectionID '/app/con', Session ID 'ses', target system 'MY_TARGET_SYS' -> no new GUI session will be opened, because everything stayed the same.
One comment on the logical target system name: only the name has to be different. Even if two logical system names point to the same target system, this will still open a new GUI session.
So, if you want to ensure that the SAPGUI commands are replayed in the same GUI session, you have to ensure that these three parameters are the same in all SAPGUI commands of the execution.
One last remark: in eCATT as of 6.40 there is always the start option "Execute all SAPGUI commands in a single session per destination". This start option will overwrite the behaviour caused by different combinations of ConnectionId and SessionID. In this case only the logical system name is relevant for opening a new GUI session or not.
this looks like a problem with the ConnectionID and SessionID.
If various SAPGUI commands should run in the same GUI session, they have to have the same SessionID and ConnectionID. The actual value of these ID's is not important; they only have to be the same.
So please check whether the ConnectionIDs are the same in all your SAPGUI commands and whether the SessionIDs are the same in all of them.
I hope this helps...