src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js
function(oTable) {
			var oScrollExtension = oTable._getScrollExtension();
			var iMaxRowIndex = oTable._getMaxFirstVisibleRowIndex();

			if (iMaxRowIndex === 0) {
				return 0;
			} else {
				var nScrollPosition = VerticalScrollingHelper.getScrollPosition(oTable);
				var iScrollRange = VerticalScrollingHelper.getScrollRange(oTable);
				var nScrollRangeRowFraction = VerticalScrollingHelper.getScrollRangeRowFraction(oTable);

				if (TableUtils.isVariableRowHeightEnabled(oTable)) {
					if (VerticalScrollingHelper.isScrollPositionInBuffer(oTable)) {
						return -1;
					} else {
						return Math.min(iMaxRowIndex, Math.floor(nScrollPosition / nScrollRangeRowFraction));
					}
				} else {
					var iRowIndex = Math.floor(nScrollPosition / nScrollRangeRowFraction);

					// Calculation of the row index can be inaccurate if scrolled to the end. This can happen due to rounding errors in case of
					// large data or when zoomed in Chrome. In this case it can not be scrolled to the last row. To overcome this issue we consider the
					// table to be scrolled to the end, if the scroll position is less than 1 pixel away from the maximum.
					var nDistanceToMaximumScrollPosition = iScrollRange - nScrollPosition;
					var bScrolledViaScrollTop = oScrollExtension.getVerticalScrollbar()._scrollTop == null
												|| internal(oTable).bIsScrolledVerticallyByWheel;
					var bScrolledToBottom = nDistanceToMaximumScrollPosition < 1 && bScrolledViaScrollTop
											|| nDistanceToMaximumScrollPosition < 0.01;

					if (bScrolledToBottom) {
						// If zoomed in Chrome, scrollTop might not be accurate enough to correctly restore the scroll position after rendering.
						VerticalScrollingHelper.updateScrollPosition(oTable, iScrollRange, null, true);
					}

					return bScrolledToBottom ? iMaxRowIndex : Math.min(iMaxRowIndex, iRowIndex);
				}
			}
		}
function(oTable) {
			var oScrollExtension = oTable._getScrollExtension();
			var iMaxRowIndex = oTable._getMaxFirstVisibleRowIndex();

			if (iMaxRowIndex === 0) {
				return 0;
			} else {
				var nScrollPosition = VerticalScrollingHelper.getScrollPosition(oTable);
				var iScrollRange = VerticalScrollingHelper.getScrollRange(oTable);
				var nScrollRangeRowFraction = VerticalScrollingHelper.getScrollRangeRowFraction(oTable);

				if (TableUtils.isVariableRowHeightEnabled(oTable)) {
					if (VerticalScrollingHelper.isScrollPositionInBuffer(oTable)) {
						return -1;
					} else {
						return Math.min(iMaxRowIndex, Math.floor(nScrollPosition / nScrollRangeRowFraction));
					}
				} else {
					var iRowIndex = Math.floor(nScrollPosition / nScrollRangeRowFraction);

					// Calculation of the row index can be inaccurate if scrolled to the end. This can happen due to rounding errors in case of
					// large data or when zoomed in Chrome. In this case it can not be scrolled to the last row. To overcome this issue we consider the
					// table to be scrolled to the end, if the scroll position is less than 1 pixel away from the maximum.
					var nDistanceToMaximumScrollPosition = iScrollRange - nScrollPosition;
					var bScrolledViaScrollTop = oScrollExtension.getVerticalScrollbar()._scrollTop == null
												|| internal(oTable).bIsScrolledVerticallyByWheel;
					var bScrolledToBottom = nDistanceToMaximumScrollPosition < 1 && bScrolledViaScrollTop
											|| nDistanceToMaximumScrollPosition < 0.01;

					if (bScrolledToBottom) {
						// If zoomed in Chrome, scrollTop might not be accurate enough to correctly restore the scroll position after rendering.
						VerticalScrollingHelper.updateScrollPosition(oTable, iScrollRange, null, true);
					}

					return bScrolledToBottom ? iMaxRowIndex : Math.min(iMaxRowIndex, iRowIndex);
				}
			}
		}
function ( oTable ) { var oScrollExtension = oTable . _getScrollExtension ( ) ; var iMaxRowIndex = oTable . _getMaxFirstVisibleRowIndex ( ) ; if ( iMaxRowIndex === 0 ) { return 0 ; } else { var nScrollPosition = VerticalScrollingHelper . getScrollPosition ( oTable ) ; var iScrollRange = VerticalScrollingHelper . getScrollRange ( oTable ) ; var nScrollRangeRowFraction = VerticalScrollingHelper . getScrollRangeRowFraction ( oTable ) ; if ( TableUtils . isVariableRowHeightEnabled ( oTable ) ) { if ( VerticalScrollingHelper . isScrollPositionInBuffer ( oTable ) ) { return - 1 ; } else { return Math . min ( iMaxRowIndex , Math . floor ( nScrollPosition / nScrollRangeRowFraction ) ) ; } } else { var iRowIndex = Math . floor ( nScrollPosition / nScrollRangeRowFraction ) ; // Calculation of the row index can be inaccurate if scrolled to the end. This can happen due to rounding errors in case of // large data or when zoomed in Chrome. In this case it can not be scrolled to the last row. To overcome this issue we consider the // table to be scrolled to the end, if the scroll position is less than 1 pixel away from the maximum. var nDistanceToMaximumScrollPosition = iScrollRange - nScrollPosition ; var bScrolledViaScrollTop = oScrollExtension . getVerticalScrollbar ( ) . _scrollTop == null || internal ( oTable ) . bIsScrolledVerticallyByWheel ; var bScrolledToBottom = nDistanceToMaximumScrollPosition < 1 && bScrolledViaScrollTop || nDistanceToMaximumScrollPosition < 0.01 ; if ( bScrolledToBottom ) { // If zoomed in Chrome, scrollTop might not be accurate enough to correctly restore the scroll position after rendering. VerticalScrollingHelper . updateScrollPosition ( oTable , iScrollRange , null , true ) ; } return bScrolledToBottom ? iMaxRowIndex : Math . min ( iMaxRowIndex , iRowIndex ) ; } } }
Gets the index of the row at the current vertical scroll position.

@param {sap.ui.table.Table} oTable Instance of the table.
@returns {int} The index of the row, or -1 if the index could not be determined.
Gets the index of the row at the current vertical scroll position .