on 02-09-2018 1:32 PM
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.
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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Regards,
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.
Regards,
Thomas
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.