Skip to Content
0
Former Member
Jul 23, 2009 at 07:50 AM

last table line in a SAP GUI Script

157 Views

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) (http://help.sap.com/saphelp_47x200/helpdata/EN/2a/121e3bd711bb04e10000000a114084/frameset.htm)

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

Kind Regards:

Svetlana

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

Next