Reputation: 75
My requirement is to use R to analyze data from my company SAP system. I use R v.3.2.4 on my local computer and am able to log in to SAP via SAPGUI.
I have found that to connect R to SAP you need RSAP package, and to install it you need SAP NetWeaver RFC SDK on your local computer.
I tried the steps below, but have stuck with installing RSAP in R (step B-7]).
I would appreciate any suggestion how to proceed ...
[A] Steps according to: https://wiki.scn.sap.com/wiki/display/ABAPConn/Download+and+Installation+of+NW+RFC+SDK
[B] Steps according to: INSTALL file on https://github.com/piersharding/RSAP
library(devtools)
library(yaml)
library(reshape)
install_github("RSAP", username="piersharding", args=c("--configure-args=--with-nwrfcsdk-include=C:\\nwrfcsdk\\include --with-nwrfcsdk-lib=C:\\nwrfcsdk\\lib --no-clean-on-error"))
And here is the error:
Downloading GitHub repo piersharding/RSAP@master from URL https://api.github.com/repos/piersharding/RSAP/zipball/master
Error in curl::curl_fetch_memory(url, handle = handle) : Problem with the SSL CA cert (path? access rights?)
In addition: Warning message: Username parameter is deprecated. Please use piersharding/RSAP
I tried another thing as suggested in INSTALL file in step B-7:
In R execute:
install.packages("RSAP", repos=c("h t t p://piersharding.com/R"), type="source")
And this time the system did some more work, but still without success:
Installing package into ‘\\RWAMSEEFP1/U_kosinskr$/My Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Warning in install.packages : dependencies ‘yaml’, ‘reshape’ are not available trying URL 'http://piersharding.com/R/src/contrib/RSAP_0.9.tar.gz' Content type 'application/x-gzip' length 69780 bytes (68 KB) downloaded 68 KB * installing *source* package 'RSAP' ... ** libs Warning: this package has a non-empty 'configure.win' file, so building only the main architecture gcc -m64 -I"C:/PROGRA~1/R/R-32~1.4/include" -DNDEBUG -I. -I"C:/nwrfcsdk/include" -DSAPwithUNICODE -DUNICODE -D_UNICODE -D_AFXDLL -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DSAPonNT -DSAP_PLATFORM_MAKENAME=ntintel -I"d:/RCompile/r-compiling/local/local323/include" -O2 -Wall -std=gnu99 -mtune=core2 -c RSAP.c -o RSAP.o In file included from C:/nwrfcsdk/include/sapnwrfc.h:7:0, from RSAP.c:41: C:/nwrfcsdk/include/sapucx.h:562:5: warning: 'align' attribute directive ignored [-Wattributes] In file included from RSAP.c:41:0: C:/nwrfcsdk/include/sapnwrfc.h:28:0: warning: ignoring #pragma warning [-Wunknown-pragmas] RSAP.c: In function 'u8to16c': RSAP.c:133:12: warning: variable 'rc' set but not used [-Wunused-but-set-variable] RSAP.c: In function 'u8to16': RSAP.c:150:12: warning: variable 'rc' set but not used [-Wunused-but-set-variable] RSAP.c: In function 'u8to16r': RSAP.c:167:12: warning: variable 'rc' set but not used [-Wunused-but-set-variable] RSAP.c: In function 'u16to8c': RSAP.c:184:12: warning: variable 'rc' set but not used [-Wunused-but-set-variable] RSAP.c: In function 'u16to8': RSAP.c:208:12: warning: variable 'rc' set but not used [-Wunused-but-set-variable] RSAP.c: At top level: C:/nwrfcsdk/include/sapuc.h:853:24: warning: 'sccsidU16' defined but not used [-Wunused-variable] gcc -m64 -shared -s -static-libgcc -o RSAP.dll tmp.def RSAP.o -L. -LC:/nwrfcsdk/lib -lsapnwrfc -llibsapucum -Ld:/RCompile/r-compiling/local/local323/lib/x64 -Ld:/RCompile/r-compiling/local/local323/lib -LC:/PROGRA~1/R/R-32~1.4/bin/x64 -lR installing to \\RWAMSEEFP1/U_kosinskr$/My Documents/R/win-library/3.2/RSAP/libs/x64 ** R ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) : there is no package called 'RSAP' Error: loading failed Execution halted ERROR: loading failed * removing '\\RWAMSEEFP1/U_kosinskr$/My Documents/R/win-library/3.2/RSAP' Warning in install.packages : running command '"C:/PROGRA~1/R/R-32~1.4/bin/x64/R" CMD INSTALL -l "\\RWAMSEEFP1\U_kosinskr$\My Documents\R\win-library\3.2" C:\Users\kosinskr\AppData\Local\Temp\Rtmp40cQJZ/downloaded_packages/RSAP_0.9.tar.gz' had status 1 Warning in install.packages : installation of package ‘RSAP’ had non-zero exit status The downloaded source packages are in ‘C:\Users\kosinskr\AppData\Local\Temp\Rtmp40cQJZ\downloaded_packages’
RTools installation settings
c:\Rtools
Package authoring installation
PATH=c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files\Java\jre6\bin;C:\Windows\system32;
Upvotes: 1
Views: 1138