cancel
Showing results for 
Search instead for 
Did you mean: 

Script execution error - control not found

jay_pandit
Participant
0 Kudos

Hi folks,

I'm getting a "control not found" error on a script. This is on a Personas 2.0 SP3 system. The Flavor is based on ECC PR Display tcode ME53N.

One Control-Id overwrite rule exists in our admin_ui for ME53N/SAPLMEGUI/0014 :

     Rule Pattern:  ^ses\[0\]/wnd\[0\]/usrUSRAREA/subcntSUB0SAPLMEGUI\w+$

     Rule Replacement:  ses[0]/wnd[0]/usrUSRAREA/subcntSUB0SAPLMEGUI__COMMON__

ME53N basic view has 3 sections - Header, Item Overview and Item Details (multiple tabs). The Flavor hides the Header section, but it displays controls from the Item Overview and Detail sections, and therefore requires that the these sections should be open (un-collapsed) when switching to this Flavor, else the controls obviously would not display in the flavor. So, we've added a script to OnCreateHandler to Push the un-collapse buttons of the Items overview and detail sections, if these sections happen to be in collapsed state :

The Flavor loads successfully, and the Item Overview and Detail sections open up and the controls display properly in the Flavor,  EXCEPT in one scenario:  if Header section was open, Item Overview section was closed, Item Detail section was open. 

The error message says step 5 failed, but there is no step 5 in the script. Maybe it meant step 4 ? .... i.e. the collapse button of the Item overview section ?

And FF Browser consoles shows:

"14/5/2015 10:31:09,985688 ERROR Sap.Imagineering.Personas.Base.Controller.<>c__DisplayClass15-><Execute>b__12 -

control not found

Sap.Imagineering.Personas.Base.Controller.Script.Exceptions.ExecuteScriptException: control not found

   at Sap.Imagineering.Personas.Base.Controller.Script.ScriptEngine.Execute()

   at Sap.Imagineering.Personas.Base.Controller.UISession.<>c__DisplayClass15.<Execute>b__12()"

A cursory inspection (with my novice eye) of the xml files in the troubleshooting info seems to indicate that the Control-ID Overwrite is occurring as expected (I see the Replacement string __COMMON__  overwriting the 4 digits 0010 of the backend control id.  However, as you can see in the script, the script uses the 4 digits 0015 in the middle of the control ids. But I'm thinking this shouldn't matter due to the control id overwrite).

Anyway, In all of the other 7 combinations of open/collapse of the 3 screen sections, the FlavorX loads fine. And even in the error case, the controls of the collapsed Item overview section do show up and display in the Flavor  (implying that maybe the script actually worked ? ... almost as if this error pop-up is a false alarm ?). 

Furthermore, the flavor above is a pretty complex flavor -- tab merging galore, with lots of stuff being pulled out of the tabs onto the userarea etc.  A different simpler flavor of the same ME53N basic screen, does NOT exhibit the above issue -- i.e. it renders ok in all 8 combinations of open/collapse of the 3 sections.

Has anyone run into something similar ? Would appreciate any feedback if you have, thanks!

Jay.

Accepted Solutions (1)

Accepted Solutions (1)

chinthan_yajamaan
Active Contributor
0 Kudos

Hi Jay,

Incorrect step number issue was fixed recently. So if you update to latest note then you should see correct step number in error.

Thanks

Chinthan

jay_pandit
Participant
0 Kudos

Hi Chinthan,

Thanks. I assume it is in one of the 3 Notes 2173722, 2173725, 2173726 that came out on May 28th for 2.0 SP3 (although the fixes listed in these Notes do not specifically mention this particular issue, but I may have missed it). We are up-to-date on all prior SP3 Notes. Will apply these new Notes soon and inform.

Thanks,

Jay.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Such error is normally due to the fact that in the scripr you changed to a new screen where you may want to press a button, but the Personas does not get to the new screen.

This step in script normally helps:

1. You do change to anther screen (eg, push a button or run a tcode)

2. Add "Refresh screen" in script after step 1. This is IMPORTANT! Then Personas knows the btn on the new screen.

Does this solve your problem?

Dong Zhu

jay_pandit
Participant
0 Kudos

Hi Dong, I did add "Refresh Screen" but still the same issue. Actually there is no navigation to another screen/tcode here .. this is all within the same ME53N. But a "Refresh Screen" was worth a try ... unfortunately did not eliminate this mysterious error pop-up.  In any case, we have worked around the issue now by other means (as in my note above). Still, thanks for your suggestion, appreciate it.

Jay.

jay_pandit
Participant
0 Kudos

Just a quick update:  We've eliminated the "control not found" script error I described above, by eliminating the OnCreateHandler script itself.  Instead of PUSHing the open/collapse buttons via script, we are accomplishing the same by setting appropriate user settings in ECC table ESDUS just prior to opening the ME53N flavor shortlink. In the underlying SAPGUI screen, it is these ESDUS settings that control whether the various sections of the screen (such as Document overview, Help Info, Header section, Item overview, Item Detail etc) will be open or closed when the ME53N screen/flavor loads. Further, the flavor appears to load quicker now compared to the alternative of using OnCreateHandler script to push the appropriate open/collapse/close buttons of the various sections.