Author Topic: List Screen - _listcursorrow/_listcursorcol System Variables  (Read 6403 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 96
    • View Profile
Purpose:
Use cursor position [row,column] on a list screen to read data.
The system variables "_listcursorrow" and "_listcursorcol" can be used to find the cursor position on a list screen and further to read the data from that position.

For the below example, list screen is displayed on MB51 transaction.
The cursor position and data stored in "z_listvalue" can be read using the below code:

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: RM07DOCS.E0120.sjs
----------------------------------------------------------------------------------------------------------------------------------------------
pushbutton([TOOLBAR],'Find Position',{'process':readCursorPositionAndData});

function readCursorPositionAndData() {
        // Put cursor on the icon, to find out its position
        // Once you know the position of the list element, you can use below

        set('V[z_listvalue]','&#['+_listcursorrow+','+_listcursorcol+']');
        println('Value:' + z_listvalue);
}
« Last Edit: June 12, 2017, 12:04:03 PM by Benjamin Dasari »