on 04-05-2007 3:14 PM
Dear Colleagues,
We need use VBA programming in Excel to deliver the function to our customer. The VBA program will call our standard SAP function, e.g. RFC, Web service, and other kinds of service.
How can I know what functions, objects are delivered by SAP, which I can use in the VBA programming?
For example,
Set ctrl = CreateObject("<b>SAP.Functions</b>")
Set sapConnection = ctrl.Connection
sapConnection.<b>client</b> = ActiveSheet.Cells(3, 2).Value
sapConnection.<b>user</b> = ActiveSheet.Cells(4, 2).Value
sapConnection.<b>Language</b> = ActiveSheet.Cells(7, 2).Value
Is there any handbook I can use?
Your help will be appreciated very much!
Thank you and best regards,
Shiguo
Hi Shiguo,
What information do you need? If you need a list of parameters and methods with the SAP.Functions object there is no real documentation that I can find. However if you are in the Visual Basic editor you can add a reference to SAP.Functions, then in the object browser see it's methods and properties.
So in the Visual Basic editor goto Tools->References. Click on the Browse button. You should see a open file dialog box. In the filetype drop down select OCX. Find your SAP gui directory and look for the following files wdtfuncs.ocx and wdtlog.ocx (you need to add them seperatly).
Then when you have done that you should see the following entries in the references dialog box
SAP Remote Function Call Control
SAP Logon Control
(both ticked).
Click on OK.
Press F2 or goto View->Object Browser.
In the top box it should say <All Libraries>
Using that box find SAPFunctionsOCX
You should see all the parameters and methods exposed by the SAP Functions OCX.
There is some small documentation visible in the lower half of the screen.
As for some code examples
Check in the widgets form. Look for SAP.VBS as that will give you an example of using RFC_READ_TABLE.
I hope this helps.
Nath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.