Try this: library(RDCOMClient)
## Criando a conexao com o SAP oLogonControl <- COMCreate("SAP.Logoncontrol.1") ## Conectando com o usuario ao SAP g_connection <- oLogonControl$NewConnection() g_connection[["System"]] <- "PD4" g_connection[["ApplicationServer"]] <- "server_ip" g_connection[["SystemNumber"]] <- "00" g_connection[["User"]] <- "your_username" g_connection[["Password"]] <- "your_password" g_connection[["Client"]] <- "203" g_connection[["Language"]] <- "EN" HWND <- NULL if(!g_connection$Logon(HWND, TRUE)){ stop("Usuário Não Logado") # user not logged }else{ oFunction <- COMCreate("SAP.Functions") oFunction[["Connection"]] <- g_connection oFunc <- oFunction$Add("RFC_CALL_TRANSACTION") oFunc$Call() } On Sat, Jul 31, 2010 at 3:17 PM, Andre <a.azev...@adp.pt> wrote: > > Hello, > > Anyone knows if there is a way to connect R with the ERP SAP? > Thanks. > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-connect-R-with-SAP-tp2309018p2309018.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.