on 08-01-2016 9:51 AM
hi all,
I have a scenario that once a transactional screen has been reached a variety of status bar messages could be displayed once 'Enter' has been pressed.
One simple example is to script entering an employee number in transaction PA30 and then check the status bar message to see if the "Person is already being processed" type message is displayed.
For this example in SAPGUI the message no is this: Message No. PBAS_SERVICE001
so for my simple script I can put this:
//check for the message that another user is in the record
if (session.findById("wnd[0]/sbar").messageNumber = 001) {
//if the message is displayed overwrite with this value
session.findById("wnd[0]/usr/ctxtRP50G-PERNR").text = "42006892";
}
so if the message appears, overwrite the employee number with the value of 42006892.
But this does not work. I have also tried using in the script the full message no of PBAS_SERVICE001 but that does not work either. In both examples the employee number does indeed get overwritten with the 42006892 regardless of whether the message is displayed in the status bar or not.
In my more complex example I wish to do a loop to check the status bar for the message " Record Saved", and if there is a different message, capture the message, press enter, and then check for the Record Saved message again.
I'm struggling to understand how to capture these messages if the message Number I'm using does not work.
Any ideas anyone?
thanks,
Ian
I have now solved the first script by changing the value 001 to be a string "001" and it now works.
I should now be able to do my looping.
Am marking my original question as being answered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.