Quantcast
Channel: SCN : All Content - Scripting Languages
Viewing all articles
Browse latest Browse all 522

error on calling a function from vba

$
0
0

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.


Viewing all articles
Browse latest Browse all 522

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>