RSAPReadTable: SAP RFC function calls

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Open connections to an SAP System for RFC calls

Usage

1
2
RSAPReadTable(con, saptable, options=list(), fields=list(),
                             delimiter=';', nrows=-1, skip=0)

Arguments

con

an Open SAP RFC Connection handle.

saptable

the Data Dictionary name of a table to read.

options

list of string values of SQL WHERE clause statements to apply to the table select.

fields

a list of column names that you want returned from the table.

delimiter

the column delimiter character. As values in rows returned by the RFC handler are not enquoted, it may be necessary to use a character that is less likely to occur in strings than the default semicolon.

nrows

integer: the maximum number of rows to retrieve. The default indicates all rows to be retrieved.

skip

integer: the number of lines of the table to skip before beginning to retrieve data.

Details

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  con <- RSAPConnect(ashost="nplhost", sysnr="42",
                      client="001", user="developer", 
                      passwd="developer", lang="EN", 
                      trace="1", lcheck="1")

  res <- RSAPReadTable(con, "SFLIGHT2")
  # or use alias
  # res <- readTable(con, "SFLIGHT2")

  print(res)

  RSAPClose(con)
  

Value

Returns a data.frame of the table contents selected

Note

Depending on the NW RFC version used in the installation of RSAP, there could be limits on the parameters nrows and skip based on their internal types. For example, in some older versions of NW RFC the internal parameter ROWSKIPS used by skip has SAP-type INT4 and is thus limited to 999999.

Author(s)

Piers Harding

See Also

RSAPConnect, RSAPGetInfo, RSAPInvoke, RSAPClose

Examples

1
2
3
4
5
6
7
8
## Not run: 
# read the flight data demo table
res <- RSAPReadTable(con, "SFLIGHTS2",
                     options=list("CARRID = 'AA'"),
                     fields=list('CARRID', 'CONNID', 'FLDATE',
                                 'PRICE'))

## End(Not run)

piersharding/RSAP documentation built on May 25, 2019, 6:10 a.m.