as @Palaniyappan wrote, the wildcards works with SAP Screen numbers. SAP Screen numbers, in your case 0389, are very often a problem in the automation. Your approach to replace it with a wildcard is correct. But you should “wildcard” your title too. “Display Invoice 2334352 (28 / 75)” as title applies only to a single case. Use instead “Display Invoice *”. It should work with that.
Alter the selectors see the possibilities and can you check Uipath explorer that selector exactly defined for tabs. That can avoid confusion changing. and also it may be the issue with SAP was defined in background as well . Activate the exact window that you required
Yes, it is invalid after including wildcard and even the same page of SAP is opened the in background.
It runs into exception.
I can see few more places being dynamic apart from what we have now replaced with wildcard
If you see in the selector
038* is done
Another one is there which looks dynamic
Change that number with wildcard as well
And give a try
I have checked the possibilities in UiPath Explorer, there’s only ID available.
Yes, I do change the title to wildcard, but the main issue is on the ID. The Robot not able to identify the selector after replace the ‘0389’ or ‘0385’ with wildcard ‘038*’.
Still no luck.
Use title like this “Display Invoice *”.
And did we try using Sap Wingui activities
Because the title could be Display/Change Invoice (xx/xx) or Display/Change Credit Note (xx/xx) depending on the business requirement process. So, I set the title as * to be safe.
I tried to use Select SAP Menu Item and replace the ID selector with wildcard, still getting invalid selector.
Probably there’s something to do with the code in SAP.
Did you try changing the default framework and check if there are any parameters which can be included as part of selector apart From ID.
Hope this helps… Let me know if you need more details.
@shivagowdavarad please NEVER change the default identification framework in SAP WinGUI!
“Default” ensuring the identification of all elements with help of SAP WinGUI API Scripting
Noted, thanks for the Input.
I recommend that here since it was just a standard click activity used in the context.
I tried it and in my case with my example it works without any problems.
We discussed the same problem a few month ago here, but unfortunately without any result.
Here you can find another post, which describes the same behavior.
Could it be possible that the id changes on different positions?
Seems that you hit a known problem with SAP id scheme. The problem here is that the control in the id that you are trying to use wildcards has slashes in its name and we cannot identify the hierarchy properly.
You have 2 solutions:
- You can use regex matching (RegEx Search), but I don’t recommend this since it’s slower
- Replace all slashes(’/’) in the control name with ‘?’ (simplest and recommended solution)
In your case you should use:
<sap id='usr/subSUB_MAIN:?COCKPIT?SAPLDISPLAY46:038*/subSUB_HDR:/COCKPIT/SAPLDISPLAY46:04051/tabsG_STRIP_HDR/tabpTAB4' />
I am assuming the name of your container is
subSUB_MAIN:/COCKPIT/SAPLDISPLAY46:0389. Please check this in UiExplorer for confirmation.
Please let me know if this solves it for you.
very interesting. I tried this with the field name /SAPDMC/LSSCREEN-PROJECT from the report /SAPDMC/SAPMLSMW …
… and without wildcards all works well. With a wildcard and replacing all slashes, as you described, all works well too.
I assume that @Gwen have to set a few question marks more in his id:
<sap id='usr/subSUB_MAIN:?COCKPIT?SAPLDISPLAY46:038*/subSUB_HDR:?COCKPIT?SAPLDISPLAY46:04051/tabsG_STRIP_HDR/tabpTAB4' />
You should definitely document this.
Thank you very much for this important information.
Yes, I already talked to @LevKushnir and we will document this.
Regarding the extra '?'s you added, they are not needed as that is another container/control. To be more clear, the replacement of '/'s to '?'s is only needed in the leaf id of the container control that requires wildcards.
subSUB_HDR:/COCKPIT/SAPLDISPLAY46:04051 would need this replacement only if you needed to use wildcards within it (for example:
This is a picture (hopefully) explaining it better:
If you need to use wildcards inbetween hierarchy separators, then all (and only) the slashes between those separators/slashes need to be replaced by ‘?’.
The element will be found no problems with the extra ‘?’ you added (in
subSUB_HDR:/COCKPIT/SAPLDISPLAY46:04051), but those are not needed and might potentially make the search slower (as we have to look through all the children at that hierarchy level for matches).
thank you very much again for this clarification and important information.
Yes, the container is
Also, the solution works well for me!
This is interesting! I never thought that the hierarchy could be the issue for this.
Greatly appreciate and thanks for the useful information!
Thanks everyone for the information and assist!
Learnt a lot from here.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.