0

I use Excel VBA to automate tasks in SAP.

Many times when dealing with GuiTableControl​ the numbers and dates are formatted as text, not values. That causes problems when users have different settings (commas and points as decimal separator, for example).

Is there a function like getcellvalue in GuiGridView?

A workaround would be to access the User Profile in System/User Profile/Own Data/Defaults to get the default format for the current user, and create a function to convert the text to a value depending on the default format.

Example of User Profile in SAP

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Pablo
  • 1
  • 1

1 Answers1

0

Try declaring a variable and using the "text" property of the field from the script. For example:

myVariable = session.findById("wnd[0]/usr/tabs_blah_blah").Text

Then use the variable in Excel to populate the formulae to convert in the correct way.

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
  • Yes, of course, but if you don't know the system of the user you can't know how to convert the text to a value. ( whether if points or commas are used as the decimal separator for example) – Pablo Aug 22 '17 at 17:27