Skip to Content
0

¿How I can to record this button?

Apr 27, 2017 at 05:08 PM

111

avatar image

This Button is appears when I download an attached file in the transaction FB03 but I want to do a Macro using the recorder in SAP.

The vbs scripts is stop when this windows appear.

This is my script, Other alternative is use a script for found the windows but the cursor sometimes start in differents position (open, save or cancel) and the tabs or enter was not exact.

session.findById("wnd[0]/titl/shellcont/shell").pressButton "%GOS_TOOLBOX"
session.findById("wnd[0]/shellcont/shell").pressButton "VIEW_ATTA"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").currentCellColumn = "BITM_DESCR"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").selectedRows = "0"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").doubleClickCurrentCell

And I thought that is posible just user the session ID of the button like

session.findById("wnd[1]/tbar[0]/btn[0]").press

Anyone know what is the ID CODE session?

Thanks for the help

buttom.png (16.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Stefan Schnell
May 03, 2017 at 05:57 AM
0

Hello Hector,

the GOS supports SAP GUI Script recording, all you have to do is to disable in the SAP Logon the using of native Windows dialogs.

After that you can record your activities also.

Here you see the FB03 with an export of a PDF file from the GOS.

And now your code looks like this:

session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"
session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_VIEW_ATTA"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").currentCellColumn = "BITM_DESCR"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").selectedRows = "0"
session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").pressToolbarButton "%ATTA_EXPORT"
session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "This is a test.pdf"
session.findById("wnd[1]/usr/ctxtDY_FILENAME").caretPosition = 19
session.findById("wnd[1]/tbar[0]/btn[0]").press

Cheers
Stefan


saplogon001.jpg (48.5 kB)
saplogon002.jpg (173.1 kB)
Share
10 |10000 characters needed characters left characters exceeded