cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Screen Personas 2.0: Script error, most likely because of Screen Personas dysfunctionality and no idea how to handle?

former_member193127
Participant
0 Kudos

Hello everybody,

SAP Screen Personas 2.0 generate the following script, if I record to open the selection variant-button in ME21N (Document Overwiev on) and select an entry in the DropDown:

    

Script:

1.step (open DropDown):

Command 'Right click' on the following ID: ses[0]/wnd[0]/dockcnt/splitcnt/cell[0][1]/tbar/dropmenuSELECT

2.step (select entry in DropDown):

Command 'Select' on ID: ses[0]/wnd[0]/dockcnt/splitcnt/cell[0][1]/tbar/dropmenuSELECT/menuCONTEXT/item0050568E34721ED684ED6153F966022DNEWPO_QUERY

If I insert the recording in a script button and try it immediately, it works fine. But if I leave the transaction and come back, it will not work anymore!

I have an assummption: Maybe the ID from the second step is influenced by the mouse position or something other, because when I make a new recording, the ID will always chance. Here are any examples for an other ID from the second step from other recordings:

ses[0]/wnd[0]/dockcnt/splitcnt/cell[0][1]/tbar/dropmenuSELECT/menuCONTEXT/item0050568E34721ED684EF5AB11AF8822DNEWAGREEMENT_QUERY

ses[0]/wnd[0]/dockcnt/splitcnt/cell[0][1]/tbar/dropmenuSELECT/menuCONTEXT/item0050568E34721ED684ED264134D4022DNEWPO_QUERY

ses[0]/wnd[0]/dockcnt/splitcnt/cell[0][1]/tbar/dropmenuSELECT/menuCONTEXT/item0050568E34721ED684EF6F44F2A2C22DNEWAGREEMENT_QUERY

If I make the ID shorter, it will not work anymore, or I don't cut it in the right way.

I try it with IE and Firefox, we've implented earlier the notes 2194262, 2235274, 2274219 and add in index.html and nwbc.html the line: <param name="source" value="ClientBin/PersonasUI_V1.5.000.xap?version=1.5.120"/>. Newer notes doesn't seem to match this issue.

Have everybody an idea how is it possible to insert this step in a script button?

Thanks a lot for answers.

Accepted Solutions (1)

Accepted Solutions (1)

Nicolas
Active Contributor
0 Kudos

Hello,

I have the exact same issue in Personas 3 and I already created a thread about it :

I also reported an incident on SAP Support.

Best regards,

Nicolas

Answers (2)

Answers (2)

Former Member
0 Kudos

Did you try the control overwrite role? That is used to solve such dynamic id issue.

Br,

Dong

former_member193127
Participant
0 Kudos

control overwrite role? Pls explain

praseo
Explorer
0 Kudos

What Nicolas said is correct.
The control IDs for entries in 'Select Variant' button are generated dynamically and therefore scripting is not recommended.

Control ID overwrite rules cannot solve the problem here.

Control ID overwrite rules come into picture when control IDs need to be normalized between two containers / tab items. Here, the source control IDs should be deterministic so that regular expressions can normalize them to a target control ID.

Former Member
0 Kudos

Hello Pradeep B,

Even if you said that scripting the selection of an item in the DropDown menu isn't recommended, could you tell me if you have an idea to do it ?

So as to replace these two lines of command :

ses[0]/wnd[0]/dockcnt[1]/splitcnt/cell[0][1]/tbar/dropmenuSELECT

ses[0]/wnd[0]/dockcnt[1]/splitcnt/cell[0][1]/tbar/dropmenuSELECT/menuCONTEXT/item00505680331F1ED497F495C9EE5F6C16NEWREQ_BY_USER_QUERY"

I'm stuck in my script, I'd much appreciated your help.

Thanks.

Maxime

praseo
Explorer
0 Kudos

Hello Maxime,
Sorry for not being clear in my previous reply.
Selection of an item cannot be done using scripting in Personas due to the dynamic nature of control IDs of menu items.

Regards,
Pradeep

Nicolas
Active Contributor
0 Kudos

Hello,

SAP answered and, unfortunately, this behavior cannot be changed. It is intended design and if a static definition applied, the risk would be that inconsistencies could technically be created by operating on outdated GUIDs. And this has to be avoided...

Best regards,

Nicolas

Former Member
0 Kudos

Hello,

I have the same problem in my script. Today, do you find a solution to automatize the selection of an item such as "Purchase Requisitions" in the DropDown menu ?

My colleagues and me would much appreciate your help.

Thanks.

Maxime