0

I'm automating a process with VBA, and I'm using SAP GUI Scripting to do so.

The macro is to create dispute cases and it works fine but I want to know if it's possible to extract a text from a confirmation box when the case is duplicated.

enter image description here

I have the code to get the text from a information box but doesn't work with this window.

session.FindById("wnd[1]/usr/txtMESSTXT1").Text

This is the part of the code where I'm trying to get the text:

If session.ActiveWindow.Name = "wnd1" Then 'copy text from pop up rn(I, 11) = session.findById("wnd1").Text 'This only returns the name of the box.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • In the past I've been able to use the SAP Scripting Tracker [https://tracker.stschnell.de/] to figure out objects. Maybe this can help? – MarioTheHedgehog Jul 10 '19 at 05:38
  • Maybe like this `session.findById("wnd[1]/usr/txtSPOP-TEXTLINE1").Text` ? Have you tried to use script recorder and click text field to see what is saved in script? – Sphinx Jul 10 '19 at 08:10
  • "wnd1" is incorrect. should be wnd[1]. Also are you sure its 1? from my experince try 2. this may work.. – alowflyingpig Jul 14 '19 at 03:34

0 Answers0