Skip to Content
author's profile photo Former Member
Former Member

OCX Import-pararmeter

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 03, 2005 at 07:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2005 at 12:53 PM

    Hi,

    using VariantType doesn't change anything.

    Its type is '_ComObject'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.