Hi all and apologies if I'm in the wrong forum. I've been using the function RFC_READ_TABLE to read data from R3 via an Access database for a while now. I now have to branch out and read data from CRM but I am not having much luck. The problem seems to be that I can't login to the CRM system the same way that I am currently logging into R3. Here is a snippet of what I am currently doing.
Function LogOnR3() As Boolean
Set R3 = CreateObject("SAP.Functions")
R3.Connection.ApplicationServer = UsrInfo.lServer
R3.Connection.System = UsrInfo.lSystem
R3.Connection.Client = UsrInfo.lClient
R3.Connection.User = UsrInfo.lUser
R3.Connection.Password = UsrInfo.lPassWord
R3.Connection.Language = UsrInfo.lLang
R3.LogLevel = 9
SysStr = SysCmd(acSysCmdSetStatus, "Logging on to SAP R/3...Functions")
If R3.Connection.Logon(0, UsrInfo.lSilent) True Then
MsgBox ("Could not log on")
UsrInfo.lStatus = "Logged Off"
SysStr = SysCmd(acSysCmdClearStatus)
LogOnR3 = True
UsrInfo.lStatus = "Logged On"
All of the UsrInfo variables are populated prior to this log on function. If I enter all the details for the R3 system then it works perfectly. If I enter all the details for the CRM system, it will not login unless I provide my R3 password. So it is logging on the the R3 system, even though I am providing the CRM system, server, client, etc and then I can't read any of the CRM tables. How do I login to CRM.
Essentially I am trying to read information from the tables CRMD_ORDERADM_H, CRMD_ORDERADM_I, IBIB, IBIN, etc but it seems that because I'm logged into the R3 system instead I can't read these tables. Does the function RFC_READ_TABLE even exist in CRM, I don't have the access to look it up?
Alternatively, is there tables in R3 that show all the details of a business transaction, ibase, etc, that I could use instead so I don't have to login to CRM. For example, I can read data from the view IAOM_CRM_AUFK but this does not provide me with all the information that I'm looking for. I have a very limited knowledge of CRM and SAP.
Any help would be greatly appreciated.
hi, normal , login a SAP server need application server, system number, system ID, SAP user, password, language.
And you can also check if all the connection info you use is available by a SAP GUI. According your system info, you can create a login point in SAP GUI, and to check if you can login the CRM by SAP GUI. Maybe there is some network or user license problem.
RFC_READ_TABLE is a very bad idea and a security risk.
In CRM we generally approach reading data at a logical level on the busines object unless we are searching for data. For business transactions review this wiki for some ideas:
I'm used to working with folks wanting to get CRM data from their external systems, so I would not let those guys who I work with use RFC read table, but instead use a standard BAPI or use Z-BAPI(standard bapi wrapped in a Z-function module called to make life simpler for them). If you have a CRM ABAP developer at your place, ask them to help you. If not, if you explain your business scenario(what are you trying to get out of CRM). I can give you a few ideas.
The other problem with RFC_READ_TABLE is that if you are ever audited for security, you are going to fail that audit big time, by using that function module.
hi, as I known, CRM also have RFC_READ_TABLE
For your problem, please aware that not only the user info is different when you login CRM, the sys info is also different when you login CRM, compare to login ERP.
CRM is a respecitive server to ERP, so the IP, system code, system number can be different.
In additional, the RFC_READ_TABLE is not a very strong FM to fetch data, because it has a lengh limit on the reture structure, too large structure can't be fetch. And the table which is too large record is a poor performance to return.