Skip to Content

How to access value of selected row in screen personas 3.0

Feb 09 at 01:32 PM


avatar image


Hello Experts,

I have requirement where i have to create a button on that button i need to do recording of ME23n tcode. By doing hard coding its working. But requirement is when user selects particular row and hit button than it has to show value of g/l account on newly created text.

How to write code to select purchase order value from that selected row and then ill pass it to ME23n recording.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Thomas Mangler Feb 09 at 03:43 PM


try it like this

var table = session.findById("wnd[0]/usr/##########");		 // yout table
colname = table.getColumnName(0); 	             // Name of the first column (1 for the second....)
selrow = table.selectedRowsAbsolute;  				 // Numbmer of selected row > String 
selrownum = Number(selrow);  					 // Number of selected row > value
cellvalue = table.getCellValue(selrownum, colname);	         // cell content
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks.. i'll try this..


Hello Thomas,

Please find the attached word document in which i have show how i am selecting the row and i need purchase order column value of selected row.

Kindly help me out to achieve this.screen-perosonas-30-error-1.jpgscreen-personas-error.jpg

Thanks for your kind support.


Mahaveer Mehta


Hello Mahaveer,

the question is why you get back a negative col-Number in your Script?
Perhaps this is a spezial table. Unfortunately i have no User Data for ME23N and so i can't test it.

You can try to use table.selectedRows instead of table.selectedRowsAbsolute. But i don't think that there is another result.