on 03-02-2016 8:48 PM
Hello,
I am facing a challenge with a personas script where I am attempting to populate a header text element with a value from a custom personas field. The code for this portion is below. I am receiving an "Control not found" error. I used the Inspector to get the control ID, and repeated this process again when it didn't work to make sure I had the correct control ID. I also added the code to expand the header section in ME21N to make sure the header text would be visible. It is visible when I run this flavor with the code below commented out, to avoid the control id error.
//Capture BOL value for entry in header text
var BOL = session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/boxPersonas_1455234548030/boxPersonas_1455235063374/txtPersonas_1455249345930").text;
//Make sure header section is expanded
session.findById("wnd[0]/tbar[0]/okcd").text = "METOGGON1";
session.findById("wnd[0]").sendVKey(0);
//Populate header text
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT3/ssubTABSTRIPCONTROL2SUB:SAPLMEGUI:1230/subTEXTS:SAPLMMTE:0100/subEDITOR:SAPLMMTE:0101/cntlTEXT_EDITOR_0101/shellcont/shell").text=BOL;
We are on Personas 3.0, SP2, Kernel 742/patch 322.
Any ideas why the control would not be found?
Rob
Hi,
Just a tip - perhaps make sure that the top buttom "Document overview on" is also in right toggle state. That could also change the ids.
Br,
Dong
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
I have just had this exact same issue; unable to reference tabs/text within them in ME21n. I did a check and we got exactly the same error as you did for the same text.
I just fixed mine; I had implemented an update to the note 2295996 maybe a week or two ago, but just implemented the latest version (12) and it now seems to be working like a charm.
Hurray!
Best of luck with your Persona work,
Kind regards,
Di
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Rob,
Can you put the expand header section code on top, before you var BOL..
session.findById("wnd[0]/tbar[0]/okcd").text = "METOGGON1";
session.findById("wnd[0]").sendVKey(0);
var BOL = ..........
Sushant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushant,
I tried moving the expand header section before the var BOL but I got the same result. Another thing I tried was to update the header text in an OnLoad script rather in the "Launch page" script that calls ME21N. I got a different result, but still an error:
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.