var sRawRow = source.selectedRowsAbsolute; var sRow = sRawRow.replace(/;/g,''); //删除分号, var nRow = Number(sRow); //将行号字符串转换为JS号 var sRollgrp = source.getCellValue(nRow," ZZROLLING_NUMBER");
var sRollnum = source.getCellValue(nRow," ZZASIA_SAMPLE");
警报(sRollgrp);
alert(sRollnum);
我也尝试了另一种方法,但仍然无法正常工作。
var objTable = session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell");
var firstVisibleRow = objTable.firstVisibleRow;
session.utils.log(firstVisibleRow +'');
var selectedVisibleRow = parseInt(session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell")。selectedRowsAbsolute);
var selectedTableRow = firstVisibleRow + selectedVisibleRow;
session.utils.log(selectedTableRow +'');
var colName ='ZZASIA_SAMPLE';
var rollgrp = session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell")。getCellValue(selectedTableRow,colName);
您好Tamas,
我正在尝试根据ALV网格的行选择捕获2列的值。
我写了一个下面的脚本,该脚本适用于普通表控制,但不适用于ALV网格。
我缺少什么吗?
var sRawRow = source.selectedRowsAbsolute;
var sRow = sRawRow.replace(/;/g,''); //删除分号,
var nRow = Number(sRow); //将行号字符串转换为JS号
var sRollgrp = source.getCellValue(nRow," ZZROLLING_NUMBER");
var sRollnum = source.getCellValue(nRow," ZZASIA_SAMPLE");
警报(sRollgrp);
alert(sRollnum);
我也尝试了另一种方法,但仍然无法正常工作。
var objTable = session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell");
var firstVisibleRow = objTable.firstVisibleRow;
session.utils.log(firstVisibleRow +'');
var selectedVisibleRow = parseInt(session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell")。selectedRowsAbsolute);
var selectedTableRow = firstVisibleRow + selectedVisibleRow;
session.utils.log(selectedTableRow +'');
var colName ='ZZASIA_SAMPLE';
var rollgrp = session.findById(" wnd [0]/usr/cntlGRID1/shellcont/shell")。getCellValue(selectedTableRow,colName);
session.utils.log(rollgrp);
session.callTransaction('ZARPS_ROLLING_CLOSE');
session.findById(" wnd [0]/usr/ctxtP_ROLLGR")。text = rollgrp;
session.findById(" wnd [0]/tbar [1]/btn [8]")。press();附加屏幕截图。谢谢
一周热门 更多>