on 2017 May 04 10:42 PM
I've created the following script in SAP Screen Personas:
//Define Variable
var SoldTo=session.findById("wnd[0]/usr/subSUBSCREEN_HEADER:SAPMV45A:4021/subPART-SUB:SAPMV45A:4701/ctxtKUAGV-KUNNR").text;
//If Sold-to Field is blank, display message. Otherwise, go to Header->Conditions Tab
if (!SoldTo) {
alert("Please enter Sold-to Party to view Header Conditions");
}else{
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG/ctxtRV45A-MABNR[1,0]").setFocus();
session.findById("wnd[0]/mbar/menu[2]/menu[1]/menu[7]").select();
}
This script executes properly in Webgui:
However, I'm getting the following error when I run the script in GUI:
Does anyone have any ideas on how to resolve this issue? I'm on SAPGUI Patch 13 and Screen Personas PL3.
Thanks,
Erin
Request clarification before answering.
Apparently the SAP GUI doesn't like the 'alert' command? Try replacing it based on this KB article.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Tamas!
I was following the example in "Error Handling" in the wiki - but you're right, it seems as though the GUi doesn't like it. I rewrote the script with the dialog message example you shared and it is working fine.
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.