Skip to Content
avatar image
Former Member

last table line in a SAP GUI Script

Hi All,

Does anybody know, if it is possible to find the last line of the table on the right hand side of the structure editor in eCATT (tr. SECATT) (

I use the script below and want to calculate the last line automatically if it is possible.

Kind Regards:


Dim Count
Dim Varname
Dim LastLine
Dim CountLine

LastLine = 5
CountLine = 0

For Count = 0 to LastLine

session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").currentCellRow = Count
Varname = session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").getCellValue(Count, "DATA")

if Varname <> "" Then

session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[0]/shell").modifyCell CountLine, "PNAME", Varname 

CountLine = CountLine + 1

End If


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 23, 2009 at 08:26 AM

    Hi Svetlana,

    You could try it as follows:

    . . .

    LastLine = session.findById("wnd[0]/usr/tabsTS_SCRIPT_EDITOR_0202/tabpECSC_ED/ssubTR_SCRIPT_REF1:SAPLECATT_MAIN:0402/cntlCC_ECSC_EDITOR/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell/shellcont[1]/shell").rowCount

    For Count = 0 to LastLine - 1

    . . .



    Add comment
    10|10000 characters needed characters exceeded