cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to fill header text in ME21N flavor

0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

diwheeler
Explorer
0 Kudos

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

0 Kudos

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

0 Kudos

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:

0 Kudos

hi rob,

I think you should open a message with us. Looks like a scripting issue.

Can you please make sure that you have the latest client note?

Regards,

Sushant