Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mandatory field missing

Former Member
0 Likes
1,506

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

2 REPLIES 2
Read only

MauricioMiao
Contributor
0 Likes
693

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

Read only

0 Likes
693

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