on 02-17-2017 3:57 PM
Hi Personas experts,
I have been working on VA01 flavor to create credit/debit memos. Once user has entered all the necessary information I tried to add a script button that would do the following:
1) Save the reference document that the memo request was based on so it can be displayed at the end
2) saves the sd credit memo request (VA01) and save the document number so it can be displayed at the end
3) creates the billing document (VF01) - and saves the document number so it can be displayed at the end
However once I try to run the script the page becomes unresponsive. Can you give me some guidance please.
here is my script
//save reference document
var refDoc =
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP*/tabpT\\06/ssubSUBSCREEN_BODY:SAPMV45A:4311/txtVBAK-XBLNR").text;
session.utils.put("refDoc",refDoc);
//press save to create memo request document
session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP*/tabpT\\03/ssubSUBSCREEN_BODY:SAPMV45A:4303/ctxtVBKD-INCO1").setFocus();
session.findById("wnd[0]/tbar[0]/btn[11]").press();
//save memo request document
var memoReq =
session.findById("wnd[0]/sbar").getMessageParameter(0);
session.utils.put("memoReq", memoReq);
//go to VF01 to create billing document
session.findById("wnd[0]/tbar[0]/okcd").text =
"/nvf01";
session.findById("wnd[0]").sendVKey(0);
//press save to process memo request which should already
be on the screen
session.findById("wnd[0]/tbar[0]/btn[11]").press();
//save billing document
var billingDoc = session.findById("wnd[0]/sbar").getMessageParameter(0);
session.utils.put("billingDoc", billingDoc);
//go back to va01
session.findById("wnd[0]/tbar[0]/okcd").text =
"/nva01";
session.findById("wnd[0]").sendVKey(0);
//fill in text boxes in status box
session.findById("wnd[0]/usr/boxPersonas_148699715815464/txtPersonas_148699732315295").text
= session.utils.put("refDoc");
session.findById("wnd[0]/usr/boxPersonas_148699715815464/txtPersonas_148699734136192").text
= session.utils.put("memoReq");
session.findById("wnd[0]/usr/boxPersonas_148699715815464/txtPersonas_148699739535674").text
= sesssion.utils.put("billingDoc");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.