Extract data from BAPI_AP_ACC_OPENITEMS
Hello Everyone,
Has anyone done an extract for BAPI "BAPI_AP_ACC_OPENITEMS" using RFC connection from SAP. I have below code, any suggestions here. What will be the Imports if we have to extract 7-10 columns in the extract ?
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As Object
Dim r3Conn As R3Connection
Try
'Create and open the R3 Connection
r3Conn = Me.GetConnection(si, globals, api)
r3Conn.Open()
Dim r3Func As RFCFunction = r3Conn.CreateFunction("BAPI_AP_ACC_GETOPENITEMS")
r3Func.Exports("CompanyCode").ParamValue = "1000"
r3Func.Execute()
Return r3Func.Imports("").ToTable()
' End Select
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
Finally
If Not r3Conn Is Nothing Then r3Conn.Close
End Try
End Function