Results 1 to 2 of 2

Thread: OCX SAP Import using .net

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    2

    OCX SAP Import using .net

    Hi,
    I'm using VB.net and doing a RFC in SAP over OCX. Everything works except the import of a number returned by SAP. I also tested it in VBA and there it works.
    In VB.net I always get back a an Object of value 0, if I try to put it in a variable of type Integer an error occurs: "Cast from type '_ComObject to type 'Integer' is not valid." In VBA I just get an Integer with the number returned by SAP.
    I use following coding:
    ...
    FunkCtrl = CreateObject("SAP.Functions")
    FunkCtrl.connection = oConnection
    Funktion = FunkCtrl.Add("z_vb_arc_display")
    Funktion.Exports("SAP_OBJECT") = "VBRK"
    Funktion.Exports("IV_VBELN") = "90005555"
    Funktion.Call()
    Dim x As Object
    x = Funktion.Imports("FEHLER")
    ...

    Can anybody tell what I have to change?

    Thanks
    Jochen

  2. #2
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    425

    Re: OCX SAP Import using .net

    Hi, sorry for digging such an old thread but i am facing the same problem faced by the thread starter. Does anyone has any solution to this? thanks.

    I am also trying to connect to SAP and call a function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width