The object does not support this property or method (error 438)

Asked 2 years ago, Updated 2 years ago, 74 views

I would like to read the table values from BAPI BAPI_USER_GETLIST to determine if the user exists.

Public Function CheckUser (iCurrentRow As Integer) As Boolean
    Variable for storing DimoBAPIUserCheckAsObject'BAPI objects
    DimiCntReturn As Integer'Return Object Verification Loop Variables
    Loop Variables for Checking DimoSelection As Object'Return Objects

    'User Registration BAPI Object Generation
    SetoBAPIUserCheck=oRFC.Add("BAPI_USER_GETLIST")

    'Set Import Parameter to BAPI Object
     oBAPIUserCheck.Exports("With_USERNAME") = "X"

    SetoSelection=oBAPIUserCheck.Tables("SELECTION_EXP")
    oSelection.Item("PARAMETER").Value("PARAMETER") = "USERNAME"

Why did the subject error occur here?

vba excel

2022-09-30 16:42

1 Answers

The code written in the question does not define an oRFC.

However, I tried to use the oRFC Add (which is presumed to be the property or method of the oRFC because it is oRFC.Add) which is not defined as "oRFC.Add("BAPI_USER_GETLIST"). The error 'does not support this property or method' occurred.

At the beginning of the program, if you substitute the oRFC with an object in the class with the method or property called Add, this error will not occur.


2022-09-30 16:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.