sap interface, how to learn sap, sap connection, process sap, sap process, sap application integration

Call SAP RFC Function 2 (Dynamic)

SAP Interfacing with VBA. In this blog you will get some informations about :
Best Information For Call SAP RFC Function 2 (Dynamic) | Call SAP RFC Function 2 (Dynamic) Articles

This is just an alternative expreression on the RFC call.

(A) Declaration of Function

Same as static RFC call function, after you logged on through SAP.Functions logon method, you can add Function as written below.
Dim sapConn As Object 'Declare variant
Dim objData As Object
Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object

If sapConn.Connection.Logon(0, False) <> True Then 'Try Logon
msgbox "Cannot Log on to SAP"
End If
'Define function
Dim objRfcFunc As Object
If Not sapConn.RFC_READ_TABLE(exception, QUERY_TABLE:="T001", _
ROWCOUNT:=10, DATA:=objData) Then
MsgBox "Call cannot be done"
End If
..'Retrieve data from objData

(B) Declaration of Export parameter
Unlike static RFC call (do with add method), you don't need to explicitly specify the parameter or structure to be used for the function if the import parameters are not in structure. You can just specify string or numbers directly as parameter.

(C) Declaration of Import parameter
Same as export parameter, you don't need to declare the parameter with referring to the function object. Simply you define the VB object (if it is structure or table), and include it in the dynamic call. After the call, the object will have the structure data as needed.

We have been providing the best information about Call SAP RFC Function 2 (Dynamic) For you. If you liked this information, please tell your friends on Facebook, Twitter or Google plus using social buttons below.. ^_^. SAP Interfacing with VBA
Call SAP RFC Function 2 (Dynamic) Rating: 4.5 by: Abdul Rahman Nasution


Post a Comment