‎2014 Jan 11 2:13 PM
hi
we have a requirement of creating archive link document for employees using RFC which will be called via VB , the code we are using , uses standard FM
<ARCHIV_CREATE_FILE> in the RFC FM we have created
Private Const RAccess As String = " "
Private Declare Function RfcAllowStartProgram Lib "librfc32" (ByVal RAccess As String) As Integer
Sub test()
Dim fns
Dim par1
Dim par2
Dim par3
Dim par4
Dim par5
Set fns = CreateObject("SAP.Functions")
Set funcControl = CreateObject("SAP.Functions")
fns.logfilename = "my_log.txt"
fns.loglevel = 6
Dim conn
Set conn = fns.Connection
conn.ApplicationServer = "XXX.XX.XX.XX"
conn.System = "DEV"
conn.Systemnumber = "10"
conn.user = "abc"
conn.Password = "xyz"
conn.Client = "100"
conn.Language = "E"
conn.tracelevel = 6
If conn.logon(0, True) <> True Then
MsgBox "Could not connect to SAP R/3"
Else
MsgBox "Connected"
End If
ReturnCode = RfcAllowStartProgram("sapftp;saphttp")
funcControl.Connection = conn
Set RFC_READ_TABLE = funcControl.Add("ZFM")
Set strExport1 = RFC_READ_TABLE.exports("EMPLOYEENO")
Set strExport2 = RFC_READ_TABLE.exports("DOCUMENTTYPE")
Set strExport3 = RFC_READ_TABLE.exports("FILEPATH") '
strExport1.Value = "99999999"
strExport2.Value = "ZXXXX"
strExport3.Value = "C:\temp\Desert.jpg"
result = RFC_READ_TABLE.call
end sub
i get the result as false , when i debug the application , i get the error " only available with the rfc library from 4.0c onwa"
pls help
regards
sameer.
‎2014 Jan 11 2:41 PM
Sameer please search for this message you will find sap note to be implemented in one of threads. Please always search before posting
‎2014 Jan 11 2:53 PM
hi
i checked lots of threads , but this note says to use the LIBRFC32 of correct version , i have done the same , still am getting this error. I have downloaded all the new software dll and sapftp etc but still am getting error.
Nabheet , i have posted this after lot of trail and error and search , but i forgot to mention that all the threads have been refered to. If you have any specific note other than what i mentioned ,please help.
Regards
sameer
‎2014 Jan 11 3:06 PM