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);
}