Skip to Content
avatar image
Former Member

How to access value of selected row in screen personas 3.0

screen-perssonas-30.jpg

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 09 at 03:43 PM

    Hi,

    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
    console.log(cellvalue);
    
    Add comment
    10|10000 characters needed characters exceeded

    • 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.

      Regards,
      Thomas