on 05-09-2016 1:36 PM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try the control overwrite role? That is used to solve such dynamic id issue.
Br,
Dong
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.