cancel
Showing results for 
Search instead for 
Did you mean: 

error on calling a function from vba

Former Member
0 Kudos

hello guys

I have an ABAP function developed on our SAP environment called /TENR/CFBPP_SAP_ACT_TO_SQE

It works fine when called from SE37 transaction, but when I call it from my VB app, I get a SYSTEM_FAILURE error at MyFunC.Call

I guess I can call it just like a BAPI function, so I created the code above (I supressed the connection because it works)

-----------------------------------------------------------------------------------------------------

...

        MyFunC = R3.Add("/TENR/CFBPP_SAP_ACT_TO_SQE")

        MyFunC.Exports("I_PEP").value = "P/87620/E.AAF"

        MyFunC.Exports("I_CLASE_ORDEN").value = "CF02"

        'MyFunC = R3.Add("BAPI_USER_GETLIST")

        'MyFunC.Exports("MAX_ROWS").value = "100"

        'MyFunC.Exports("WITH_USERNAME").value = ""

        If MyFunC.Call Then

           Dim objReturn As Object

           'objReturn = MyFunC.TABLES("USERLIST")

           objReturn = MyFunC.imports("T_ACTIVIDADES")

           Return objReturn.rowcount

        Else

            Return MyFunC.Exception

        End If

-----------------------------------------------------------------------------------------------------

when I toogle to call BAPI_USER_GETLIST which have similiar params, it works fine

I checked function name and param names and they are ok.

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_schnell
Active Contributor
0 Kudos

Hello Alessandro,

welcome.

Is your function module RFC enabled?

What does the namespace /TENR/ stands for?

Let us know the results.

Cheers

Stefan