cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Problem:"I::001 Only available with the RFC library from 4.0C onwards."

Former Member
0 Kudos

Hello,

Ihave a VBA code that calls a BAPI via RFC to checkout a document. The Problem is that I get an error like in the subject. Here is my Code


Private Declare Sub RfcAllowStartProgram Lib "librfc32.dll" (value As Any)


Sub checkout_file()
 
Dim oDocument As Object
Dim oDocumentFile As Object
Dim oDocumentFiles As Object
 
Dim oReturn As Object
 
Dim oBAPICtrl As Object
 
'Creating BAPI object
Set oBAPICtrl = CreateObject("SAP.BAPI.1")
 
Set oConnection = oBAPICtrl.Connection
 
If oConnection.Logon(0, False) = False Then
MsgBox "No access to R/3 System"
Exit Sub 'Programm beenden
End If
 
RfcAllowStartProgram ByVal 0&
 
'Creating lokal instance of BO "Draw"
Set oDocument = oBAPICtrl.GetSAPObject("DRAW", "PM2", "A5N00030059989", "D", "000")
If Err.Number <> 0 Then
MsgBox "No local BO 'Draw' created!"
Exit Sub
End If
 
Set oDocumentFile = oBAPICtrl.DimAs(oDocument, "CheckOutView2", "DocumentFile")
 
oDocumentFile("WSAPPLICATION") = "DOC"
 
oDocument.CheckOutView2 OriginalPath:="D:\test\", _
DocumentFile:=oDocumentFile, _
DOCUMENTFILES:=oDocumentFiles, _
DocumentStructure:=oDocumentStructure, Return:=oReturn
 
 
MsgBox oDocumentFiles.RowCount
MsgBox oReturn("MESSAGE")

Set oConnection = Nothing
Set oBAPICtrl = Nothing

End Sub

I have the newest librfc32.dll in my System32 folder (Version 7110.0.46.6208). Where is the problem? Can it be a problem on the application server or something?

Thank you,

Thomander

Accepted Solutions (0)

Answers (1)

Answers (1)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Thomander,

Note 885058 indicates that the problem is resolved with the latest

RFC and ICU files. The RFC library is contained in the RFCSDK, please

ensure that you are using the latest SDK, it can be downloaded from the

following location:

Support Packages and Patches

==> Additional Components

==> SAP NW RFC SDK

==> SAP NW RFC SDK 7.10

==>Your OS

ICU libraries can be downloaded from service market place as part of

sap kernel. There are contained in the complete package sapexe.car

& in a seperate package UCLIB.sar

-> service.sap.com/patches

-> Entry by application group

-> additional component

-> SAP Kernel [ select the correct versions] & download the file

The naming convention of the library files varies depending on the

operating system, they may be called

"libicuuc.so.26", "libicuuc.sl.26", "libicuuc26.so" or "icuuc26.dll",

for example. You must therefore adjust the unpacking statements

accordingly.

Unpack the library to the temporary directory & then move it to the

kernel directory ("/usr/sap/<SID>/SYS/exe/run").

Caution: Make sure that the libicu* libraries do not overwrite any

existing files.

Once you are using the latest RFC and ICU files you should be ok.

Maybe the information in the following link could also be useful for this kind of error:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/plm/i001Win32error+2

Best regards,

Christoph

Former Member
0 Kudos

Hi,

that means these files have to be placed on the application server? I'm wondering why this error occurs because EasyDM works perfectly. I only get that error when using my code to call the BAPI directly...

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Thomander,

please note that DMS BAPIs require always a SAPGUI channel or open RFC connection to start the SAPHTTP/SAPFTP program that is used to up- or download files to the client. If the BAPI ist executed in background mode, the system doesn't know from where to get the original file.

Please do not use BAPIs in background mode, use APIs instead. They are more flexible regarding RFC calls (background processing). Please see SAP note 504692, which contains sample programs for special checkin/checkout cases. Please read this note and use the sample programs as a basis for your own coding. Further please see also SAP note 796709 which also might contain useful information for such cases.

Unfortunately, there is no standard solution for calling DMS BAPIs in the background. If you need more assistance with your own coding, please contact our Remote Consulting Team. They are the right guys for consulting issues.

Best regards,

Christoph