cancel
Showing results for 
Search instead for 
Did you mean: 

how to bypass the warning message while replay of CBTA using VBScript

Former Member
0 Kudos

HI All,

Currently we are facing issue while warning messages.

Accepted Solutions (0)

Answers (2)

Answers (2)

Paul_Babier
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Eswari, There is no possibility to set the behavior "on Warning" any differently than the default behavior - which is to fail. If you encounter a warning in the application when you run a script, it fails. it cannot be bypassed. The warnings need to be resolved. There is no other option. This of course is not the case with errors. You can change the behavior "On Error". However just because you can change the behavior on error, does not mean you can extend this to "on warning". I have verified this with the CBTA developers, and it is factual. Regards, Paul

0 Kudos

Hi Eswari,

the problem I see in the screen shot is quite common and would come up with any Test Automation Tool, not just CBTA. During recording you entered at date that was current at that time but is now outdated and the application is raising that warning.

So the question here how to provide the current date or even a future date during run time.

Here you just need to replace the date value '20.10.2015' by a so called token like

%today%   for current date or

%=Date+7%  for 7 days in the future.

Details on the concepts behind to solve similar problems you can find in the following guide:

https://support.sap.com/content/dam/library/SAP%20Support%20Portal/support-programs-services/solutio...

Just search for 'Standard Tokens' to find the related page.

Regards Reiner

Former Member
0 Kudos

Hi Reiner,

Thanks for the reply. Yes I too agree with this point. But currently we are facing issue with any of  the warning message and it makes the script fails.

When we are creating the Sales order  we might encounter many warning messages (Not error messages).Sometimes no warning message will generate during recording but when reply if we encounter any warning messages the CBTA scripts fails. Is there any way to avoid this kind of warning messages and pass the script.

For example, this date issue has been given for example  where this script gets failed when this warning message appears and we need to pass this script as this is just a warning message but not an error. Not only this date warning message but whatever warning message appears the script should not fail and it should execute successfully. Can you please let me know is there any way to bypass the warning message and execute the script successfully?.

Regards,

Eswari

0 Kudos

Hello Eswari,

ok I see the issue is more generic. As I can't see the recorded script I can just guess that during recording there were no warning messages and so the flow of user interaction is different when running the script. Without warning the application went to the next screen that is now expected by the script and so it fails because the sequence of screens is different.

This bahaviour is quite common independen from the used tool.

My recommendation:

If you can determine in which step a warning is coming up you need to find out how to get to the next screen (e.g. press Enter key) and so add an addtional step using CBTA_GUI_A_PressKey into the script. If you can't determine this in advance you can add a step to read the message parameters while using CBTA_GUI_SB_GetMessageParams and then using the IF, ENDIF keywords to perform a subsequent step as soon a warning is coming up.

You may check the following guide for more information:

https://support.sap.com/content/dam/library/SAP%20Support%20Portal/support-programs-services/solutio...

Regards Reiner