‎2005 Feb 16 3:05 AM
Dear all,
I am new to excel vba. I have writen this procedure in excel to retrieve a list of GL accounts from the system but somehow i got this in return.
-
Set oBapiControl = CreateObject("SAP.BAPI.1")
oBapiControl.Connection.System = "AAA"
oBapiControl.Connection.client = "100"
oBapiControl.Connection.Language = "EN"
Set oConnection = oBapiControl.Connection
If oConnection.logon(0, False) <> True Then
Exit Sub
End If
Set GlgetList = oBapiControl.GetSAPObject("BUS3006")
Dim oCompanyCode, oLanguage, oLanguageiso, oReturn, oAccountList As Object
Set oAccountList = oBapiControl.dimas(GlgetList, "GetList", "AccountList")
GlgetList.GetList Language:="EN", _
Return:=oReturn, _
AccountList:=oAccountList, _
CompanyCode:="1000", _
LanguageIso:=" "
-
somehow i got this in return -> "Mandatory parameter ACCOUNTLIST was missing". I have declared the AccountList but it still returned this message. What could i missed in the first place??? What is best recommedation on this, please advice. Your help is much appreciated.
Cheers,
Andrew
‎2005 Feb 16 12:07 PM
Hello Andrew,
Everything looks ok in your code.
But I saw in my system and maybe it is a type problem.
The parameter name in my system is ACCOUNT_LIST and not ACCOUNTLIST as you typed.
You can see it using transaction BAPI or SE37 for function module BAPI_GL_ACC_GETLIST.
Try to change the parameter name to ACCOUNT_LIST.
Regards,
Mauricio
‎2005 Feb 21 1:59 AM
Hi Mauricio,
Actually after much of a checking i found out that there's no problem with it. In fact i managed to retrieve the data as i wanted from the system but somehow i still get this message..... i will find out more and should there be any findings i will let you know
Cheers,
Andrew