cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic List in BAPI

Former Member
0 Kudos

Hi Guys,

Recently i have started working with BAPI's.Can ne1 plz tell me how to get the dynamic list for the BAPI....i dont knw wt to gv in the output field mapping.

Thanks & Regards

Anshul Bhat

SAP - BI

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you meen how to use a BAPI as a data source for a dynamic list then this is quite straight forward.

For the output you need to select what output field (assigned value) is to give the displayed 'TEXT' values, and what field is to give the values that are to be returned from the list 'VALUE'.

Both have to be of text format, or converted to text format using expressions.

If this didn't answer your question, please give more info.

Henning Strand

Former Member
0 Kudos

Hey Hening

wl tnx fr ur reply man..... i tried but not able to solve the problem....see i am using the BAPI_GL_ACC_GETPERIODBALANCES and i want to have a dynamic list for the GL Accounts so that user can enter his choice.......I use the same BAPI forcreating a dynamic list and in the INPUT PORT for the input field GLACCT,i give the assigned value @GLACCT..

Now for the output port i have 6 options each for Value and Text....

@COMP_CODE,@CURRENCY,@CURRENCY_ISO,@FISC_YEAR,@FIS_PERIOD,@GL_ACCOUNT

i dnt understand wt i should keep in the 'Value' and wat in 'Text' .....

See if u can help me out wid this ......wud be really grateful.

Former Member
0 Kudos

If you need to use the list for filtering gl_account then use this field for both text and value (then the list will show exactly the value that is sent from the list).

Of course, the data service (bapi) that is to receive the gl_account sent from the list will have to have a corresponding input field to accept the list value. Often BAPIs don't have the same input and output fields, in which case you maybe have to write your own.

When I look at your BAPI_GL_ACC_GETPERIODBALANCES i see that this should have the glacct field in the input port, so I guess this will work. You of course have to send in values to the other input fields (companycode, currencytype, and fiscalyear) as well as these seem to be mandatory.

Henning Strand

Former Member
0 Kudos

Well i tried dat but the list is not gettin populated.......... m still not gettin the gl accounts list ...

Former Member
0 Kudos

Your BAPI needs values for input fields companycode, currencytype, fiscalyear and glacct.

You say: " in the INPUT PORT for the input field GLACCT,i give the assigned value @GLACCT". You need to assign values to the other three fields also. If you don't assign values for all these I guess the output will be nothing.

I don't know this BAPI specifically but here is a question: If you assign a specific glacct for the input I guess you won't get anything else than that same account through the output?

I think you need to use BAPI_GL_ACC_GETLIST where the only input parameter needed is your company code.

Henning Strand

Former Member
0 Kudos

Hey Henning

I tried using the getlist BAPI but stl da same ... can't get the dynamic list for GL Accounts ... it still is empty..is there a way by which we can use the getlist bapi on the story board....run it and use its output(Account list ) for the user to select the particular gl account and then run the get periodbalances bapi...hope u get what i mean to say !!!!

Anshul Bhat

SAP-BI,VC

Former Member
0 Kudos

For this to work you first need a form with a drop down box. For the entry list you choose dynamic and then search and choose BAPI_GL_ACC_GETLIST.

For the "find data service" step you have to choose "Account_list" for the output port.

When you see the "assigned value" column set a hard coded value for your companycode input field (I set '1000' for our company). For the output fields choose @GL_ACCOUNT for both value and text (you can change the text output field later to one of the @LONG_TEXT or @SHORT_TEXT to better visualize which account name is available).

Check the sort box to sort the list.

Close, deploy and run to see if the list is populated. It works super for me.

Henning Strand

Former Member
0 Kudos

Hey Henning

thanks man it works SUPER FINE for me also ...

1 more doubt ... is it not possible that 2 companies may have diff. GL accounts?? If yes then how to deal wid that???

Anshul Bhat

SAP- BI & VC

Former Member
0 Kudos

When you get this working you need to connect the form to your account balances bapi's input port and add a submit event to the form (to your drop down or add a separate button).

Now pass the drop down field value to the GLACCT input field. Also you need to set values for the other three input fields (I don't know what currencytype is so I can't help you here, company code and fiscal year are more obvious). You can either create input fields for these in your form also, or hard code them now to check if it works.

Then drag a table from the account_balances output port, choose columns you want shown. Deploy and run .

I bet you it'll work!

Good luck

Henning Strand

Former Member
0 Kudos

Actually I don't know anything about GLACCOUNTS. You'll have to ask someone in your finance department...

Thanks for all points! Glad I could help.

HS

Answers (0)