I have a client that needs to have me query their SAP system from within an application that uses VBA. I have successfully written the portion that logs onto their SAP. I just have no experience with the syntax to use their custom RFC that they have provided me. I only know this much.
the import parameters and order:
TEMPLATE
STRAS
PSTLZ
PFACH
Then there are 2 returned values
MESSAGE
LIFNR
Here's what I have so far.
Dim sapConnection As Object 'Connection object
Dim theFunc As Object 'Function object
Dim functionCtrl As SAPFunctions
Set functionCtrl = New SAPFunctions
Set sapConnection = functionCtrl.Connection
sapConnection.ApplicationServer = "x.x.x.x"
sapConnection.client = "###"
sapConnection.Language = "EN"
sapConnection.user = "xxxxx"
sapConnection.Password = "xxxxx"
If sapConnection.logon(0, True) <> True Then
MsgBox "failed"
exit sub
end if
Set theFunc = functionCtrl.Add("Z_NK_RFC_VENDOR_LOOKUP")
From here I'm completely lost. How do I send the field values that I have such as the TEMPLATE or (PSTLZ and PFACH).
What this query is to do is return a vendor number and a message such as (Valid Vendor) when sent either a Document Type or a PO Box and Zipcode.
Thanks in advance.
_______
I love small animals, especially with a good brown gravy....
the import parameters and order:
TEMPLATE
STRAS
PSTLZ
PFACH
Then there are 2 returned values
MESSAGE
LIFNR
Here's what I have so far.
Dim sapConnection As Object 'Connection object
Dim theFunc As Object 'Function object
Dim functionCtrl As SAPFunctions
Set functionCtrl = New SAPFunctions
Set sapConnection = functionCtrl.Connection
sapConnection.ApplicationServer = "x.x.x.x"
sapConnection.client = "###"
sapConnection.Language = "EN"
sapConnection.user = "xxxxx"
sapConnection.Password = "xxxxx"
If sapConnection.logon(0, True) <> True Then
MsgBox "failed"
exit sub
end if
Set theFunc = functionCtrl.Add("Z_NK_RFC_VENDOR_LOOKUP")
From here I'm completely lost. How do I send the field values that I have such as the TEMPLATE or (PSTLZ and PFACH).
What this query is to do is return a vendor number and a message such as (Valid Vendor) when sent either a Document Type or a PO Box and Zipcode.
Thanks in advance.
_______
I love small animals, especially with a good brown gravy....