cancel
Showing results for 
Search instead for 
Did you mean: 

¿How I can to record this button?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_schnell
Active Contributor
0 Kudos

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