RSAP
RSAP copied to clipboard
Make use of ROWSKIPS and ROWCOUNT of RFC_READ_TABLE
Two currently unused options of RFC_READ_TABLE are ROWSKIPS and ROWCOUNT. A possible way to incorporate them into RSAPReadTable is:
RSAPReadTable <- function(con, saptable, options=list(), delimiter=';', skip=0, n=-1L, fields=list())
{
if(!RSAPValidHandle(con))
stop("argument is not a valid RSAP con")
library(reshape)
parms <- list('DELIMITER' = delimiter,
'QUERY_TABLE' = saptable,
'OPTIONS' = list('TEXT' = options),
'FIELDS' = list('FIELDNAME' = fields),
'ROWSKIPS' = skip
)
if (n != -1L){
parms[['ROWCOUNT']] <- n
}
...
One has to bear in mind though that depending on the NW RFC version there could be limits on these based on their types - I've read of instances where ROWSKIPS is INT4 and thus limited to 999999. The version that is available to me does not seem to impose such restrictions.
Hi -
I'm happy to take a pull request if you can provide one.
Thanks, Piers.