on 11-03-2005 7:25 AM - last edited on 02-04-2024 1:29 AM by postmig_api_4
Hi,
I'm using VB.Net and doing a rfc with OCX. Everything works except the import of a value which is returned from SAP. What I am getting back from SAP is just one number of type I (=Integer). I noticed that in VB I have to use a variable of type object (integer produces an error). The problem is that I always get a 0 even if SAP returns another value (I checked the export-paramater in SAP and this is working correctly).
The code is:
FunkCtrl = CreateObject("SAP.Functions")
FunkCtrl.connection = oConnection
Funktion = FunkCtrl.Add("z_vb_arc_display")
Funktion.Exports("IV_VBELN") = iv_vbeln
Funktion.Call()
Dim x As Object
x = Funktion.Imports("FEHLER")
Can anybody please tell me what is wrong?
Thanks
Jochen
Hi,
using VariantType doesn't change anything.
Its type is '_ComObject'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
an additional information:
I just tested it in VBA and there it works, using type Integer.
The difference is also that in VBA if I type a wrong name for the import-parameter this leads to an error, in VB.Net this is not recognized.
Can anybody help me please?
Jochen
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.