Saturday, 28 April 2018

How to select SAP layout with name

session.findById("wnd[0]/tbar[1]/btn[33]").press
Set Layout =  session.findById("wnd[1]/usr/ssubD0500_SUBSCREEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/shell")

Rows = Layout.RowCount()

For i = 0To Rows - 1
  LayoutVariant = Layout.getCellValue(i, "VARIANT")
  Layout.setCurrentCell i,"TEXT"
  Layout.firstVisibleRow = i
  Layout.selectedRows=i
  
  If LayoutVariant = "STEFAN3"Then

    Layout.currentCellRow = i

    Layout.clickCurrentCell

    ExitFor

  EndIf
  
  Next







https://archive.sap.com/discussions/thread/3748959

3 comments:

  1. Hi, Thanks for sharing!

    I'm getting an "there is no enough memory to execute this action. Consider to switch to 64bit or try with less data" error.

    How can I fix this?

    ReplyDelete
    Replies
    1. I also get that error. Did you find any solutions?

      Delete
  2. Use RowsCount = Layout.RowCount() inplace of Rows = Layout.RowCount()

    ReplyDelete