on 09-13-2015 9:17 PM
Hi Guys,
New to personas I'm trying to create a simplified FK03 (vendor master data) view.
The idea is to put all important fields on the first screen.
I have prepared a script to move the data (target field in the example below is the vendor street):
session.findById("wnd[0]/usr/chkRF02K-D0110"); /select buton address
session.findById("wnd[0]/tbar[0]/btn[0]"); /icon to enter
var str=session.findById("wnd[0]/usr/subADDRESS:SAPLSZA1:0300/subCOUNTRY_SCREEN:SAPLSZA1:0301/txtADDR1_DATA-STREET"); /field
session.findById("wnd[0]/tbar[0]/btn[3]"); /exit
session.findById("wnd[0]/usr/txtPersonas_1442172530157").text=str; /target field
When I execute the script the field receives the following entry:
[object Object]
As far as I understand, the script can't find the source field. What do I miss?
Thanks for the feedback.
Greetings
Pawel
Your line that starts 'var str=session.findById("...");' should say 'var str=session.findById("...").text;'
Actually, most of your other lines look similarly suspect. To push a button you need to use the "press()" method on the button object, for example, so your second line should be:
session.findById("wnd[0]/tbar[0]/btn[0]").press();
Did you create this script by hand, or was it generated by the script recorder? If you are building it by hand, I'd start by using the recorder just to get an idea of how the objects work before writing them by hand.
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Steve for the hint.
My script wasn't created by hand but I didn't use the recorder neither.
Anyway, for those who will face the same issue, the correct script is:
session.findById("wnd[0]/usr/chkRF02K-D0110").selected = true;
session.findById("wnd[0]/tbar[0]/btn[0]").press();
var str=session.findById("wnd[0]/usr/subADDRESS:SAPLSZA1:0300/subCOUNTRY_SCREEN:SAPLSZA1:0301/txtADDR1_DATA-STREET").text;
session.findById("wnd[0]/tbar[0]/btn[3]").press();
session.findById("wnd[0]/usr/txtPersonas_1442172530157").text=str
BR
Pawel
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.