Hi all,
I'm trying to run a PAD flow to extract certain data reports from SAP. As per the Playbook (link: https://flow.microsoft.com/en-us/blog/rpa-playbook-for-sap-gui-automation-with-power-automate-api-fl...), I have used the scripting engine in SAP to record a script that I want to run (and then automate the output further with PAD).
For some scripts, I get an error message stating that there is a Syntax error (see screenshot). I have manually run the scripts in SAP and they work fine. Now to the question: Is there any way to see where (on what line) PAD has thrown a syntax error in the script? I have about 100 lines, and just by looking at it, nothing seems wrong.
Solved! Go to Solution.
Final update: Found that there is a way to escape from variable interpretation: using two subsequent "%" characters. Now the script runs through perfectly.
Addition:
I looked through the script again and found that SAP generates lines containing multiple instances of the character "%" which are interpreted as a variable by PAD. So the generated script is OK, but is not interpretes correctly by PAD. Anyone have any idea on how to get around that?
Best regards,
Erik
Final update: Found that there is a way to escape from variable interpretation: using two subsequent "%" characters. Now the script runs through perfectly.
Hello friend, help me, I did not understand you, I have this code with the same problem
it's a button click
session.findById("wnd[0]").maximize
session.findById("wnd[0]/usr/ctxtW_MATNR-HIGH").showContextMenu
session.findById("wnd[0]/usr").selectContextMenuItem "%001"
@Anonymous
If the text ”%001” is auto generated from SAP, try changing it to ”%%001”. Adding an extra ”%” makes PAD interpret it as a single %-character instead of a variable.
Hope it helps!
BR
Erik
thank you very much for your help
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.