I use VBA to show 1 value from SAP (Total in COOIS). All works well but I have to type the value into Excel because the Total value is every time on another position, and I can't find how to copy into Excel. All is automated: Filters working fine, resize works fine, Set total for row works fine.

Code:
'COOIS Get Total
Option Explicit
Public SapGuiAuto, WScript, msgcol
Public objGui As GuiApplication
Public objConn As GuiConnection
Public session As GuiSession
Sub SAPDownloadAttachment()
Set SapGuiAuto = GetObject("SAPGUI")
Set objGui = SapGuiAuto.GetScriptingEngine
Set objConn = objGui.Children(0)
Set session = objConn.Children(0)
'About this I'm not sure:
'Define Variables
' Dim WB As Workbook
' Dim WS As Worksheet
' Dim LR As Long
' Dim i As Long
' Set WB = ThisWorkbook
' Set WS = WB.Worksheets("TEST")
' LR = WS.Cells(Rows.count, 1).End(xlUp).Row
session.findById("wnd[0]").resizeWorkingPane 126, 43, False
session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell").doubleClickNode "F00023"
session.findById("wnd[0]/usr/ssub%_SUBSCREEN_TOPBLOCK:PPIO_ENTRY:1100/ctxtPPIO_ENTRY_SC1100-ALV_VARIANT").SetFocus
session.findById("wnd[0]/usr/ssub%_SUBSCREEN_TOPBLOCK:PPIO_ENTRY:1100/ctxtPPIO_ENTRY_SC1100-ALV_VARIANT").caretPosition = 11
session.findById("wnd[0]").sendVKey 4
session.findById("wnd[1]/usr/cntlGRID/shellcont/shell").currentCellColumn = "TEXT"
session.findById("wnd[1]/usr/cntlGRID/shellcont/shell").doubleClickCurrentCell
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_WERKS-LOW").Text = "p120"
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_ARBPL-LOW").Text = "132"
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_ISTEN-LOW").SetFocus
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_ISTEN-LOW").caretPosition = 0
session.findById("wnd[0]").sendVKey 4
session.findById("wnd[1]/usr/cmbWORKFLDS-MONTH").SetFocus
session.findById("wnd[1]/usr/cmbWORKFLDS-MONTH").Key = "1"
session.findById("wnd[1]/usr/cmbWORKFLDS-YEARN").SetFocus
session.findById("wnd[1]/usr/cmbWORKFLDS-YEARN").Key = "2025"
session.findById("wnd[1]/usr/sub:SAPLSHLC:0200[0]/txtIOWORKFLDS-DAY03[0,6]").SetFocus
session.findById("wnd[1]/usr/sub:SAPLSHLC:0200[0]/txtIOWORKFLDS-DAY03[0,6]").caretPosition = 1
session.findById("wnd[1]").sendVKey 2
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_ISTEN-HIGH").SetFocus
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_ISTEN-HIGH").caretPosition = 0
session.findById("wnd[0]").sendVKey 4
session.findById("wnd[1]/usr/cmbWORKFLDS-MONTH").SetFocus
session.findById("wnd[1]/usr/cmbWORKFLDS-MONTH").Key = "1"
session.findById("wnd[1]/usr/cmbWORKFLDS-YEARN").SetFocus
session.findById("wnd[1]/usr/cmbWORKFLDS-YEARN").Key = "2050"
session.findById("wnd[1]/usr/sub:SAPLSHLC:0200[0]/txtIOWORKFLDS-DAY06[0,15]").SetFocus
session.findById("wnd[1]/usr/sub:SAPLSHLC:0200[0]/txtIOWORKFLDS-DAY06[0,15]").caretPosition = 1
session.findById("wnd[1]").sendVKey 2
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").currentCellRow = -1
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").selectColumn "GWEMG"
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").pressToolbarButton "&NAVIGATION_PROFILE_TOOLBAR_EXPAND"
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").pressToolbarContextButton "&MB_SUM"
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").selectContextMenuItem "&SUMC"
MsgBox "Close this message and put Total in Excel"
'Set back to Main Page
session.findById("wnd[0]").resizeWorkingPane 126, 43, False
session.findById("wnd[0]/tbar[0]/btn[15]").press
session.findById("wnd[0]").resizeWorkingPane 126, 43, False
session.findById("wnd[0]/tbar[0]/btn[15]").press
'Stop Macro
Application.VBE.CommandBars.FindControl(ID:=228).Execute
End Sub
GuiGridViewObject, how to scroll to a given line number, how to read a value from this line... (which are 3 different questions so 3 different posts.) All these different questions are answered in Stack Overflow (e.g. stackoverflow.com/a/65577250/9150270). I removed "Bot-editor tells me..."