cancel
Showing results for 
Search instead for 
Did you mean: 

SAP - Unable to write a Comma

MaxDugardyn
Level 2
Hi all When trying to write a text or a number with a Comma (,) from a data collection in Blue Prism to a certain field in SAP, I repeatedly receive the error message "Exception has been thrown by the target of an invocation". If a remove the comma, Blue Prism writes the text/number perfectly. Does anyone know how to solve this? Kind regards Max
6 REPLIES 6

John__Carter
Staff
Staff
Can you type the same entry manually? Maybe SAP is configured not to accept 1,23 and changes it to 1.23?

MaxDugardyn
Level 2
Yes, I can type the exact same entry manually.

KonstantinosVog
Level 4
Hi Max, This has to do with a SAP setting and more specifically with the decimal notation of SAP GUI. In SAP GUI go to: System -> User Profile -> User Data -> in tab Default -> Decimal notation set it to = 1,234,567.89 (also find a relevant print screen attached). With this setting you will send your amounts from Blue Prism having dot instead of coma and then you will not have that problem. Let me know if that helped. Cheers, Konstantinos

MaxDugardyn
Level 2
Hi Konstantinos   Thanks a lot, now it works!   Kind regards Max

JustinWall
Level 2
One solution that I've had to use to get around this error is to use a code stage to set the text property of the field.

Something like the below code snippet in VB.net where x is the element ID from the Application Modeler and y is the text that you want to write to the field.
Dim sapgui = GetObject("SAPGUI")
Dim app = sapgui.GetScriptingEngine
Dim connection = app.Children(0)
Dim session = connection.Children(0)

Dim field = session.findById(x)

field.Text = y​

p.s. this code assumes only a single instance of SAPGUI is running

Hope this is helpful to someone,
Justin

------------------------------
Justin Wall
Systems Engineer
Lockheed Martin
America/Chicago
------------------------------

Justin This works for me too!

------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil