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
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.
© 2024 OneMinuteCode. All rights reserved.