HI,
I'm just getting started with Personas scripting and would like to ask if what I have done is correct.
What I'd like is for the Tax classification description text to appear on the sales order screen (item billing tab) in VA01.
I've written the following code:
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_ITEM/tabpT\\04").select();
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_ITEM/tabpT\\04").executeWebRequest("post", "proxy", "assert/tabswitch", null, null);
var tax = session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_ITEM/tabpT\\04/ssubSUBSCREEN_BODY:SAPMV45A:4453/ctxtVBAP-TAXM1").text;
if (tax == "1") { session.findById("wnd[0]/usr/txtPersonas_167336765355982").text = "1%"; }
else if (tax == "E") { session.findById("wnd[0]/usr/txtPersonas_167336765355982").text = "Exempt"; }
else if (tax == "L") { session.findById("wnd[0]/usr/txtPersonas_167336765355982").text = "Loss leader"; } Does that look okay?
I tried removing the first 2 lines:
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_ITEM/tabpT\\04").select();
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_ITEM/tabpT\\04").executeWebRequest("post", "proxy", "assert/tabswitch", null, null); but then the script didn't work. Any idea what those two lines do?
It all seems to work if I assign the above script to the grey script field (below) via Screen Events - onAfterRefresh (I hope that's the right one to use) but the user then has to press enter for the text to be refreshed:

Is there a way to refresh the text when the user enters a value (without pressing enter)?
Is there a debugger for Personas script like ABAP?
Is there a good scripting resource available?
Thanks in advance!