Application Development 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: 

How to perform a bottom of the application toolbar by codding?

Former Member
0 Kudos

Hi.

I tried to found info about this, it seems to be easy, but i couldn't found it.

I have a ALV Report (with funtion module not OO).

I copied a gui status from program saplkkbl status gui: standard_fullscreen.

In the ALV i have one column editable, i could refresh the info when i push the bottom that refers the function code &REFRESH

I add a buttom in the application toolbar, i would like to execute or perform the standard funtion '&Refresh', and after that do my own code.

how could i do it?

thanks!!!

Albio.-

3 REPLIES 3

Former Member
0 Kudos

Hi,

First thing you have to do is to add event 'USER_COMMAND' to events table and pass this to it_events parameter of alv function module. ( 'REUSE_ALV_GRID_DISPLAY' ). then create a form

FORM user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

<Add your code here fro handling new button.>

r_ucomm will have ok_code for button pressed

to refresh data set

rs_selfield-refresh = con_x.

ENDFORM.

0 Kudos

Hi.

Well... i'm doing my program like you told me:

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

rs_selfield-refresh = 'X'.

CASE r_ucomm.

WHEN 'CALC'. "buttom added by me

PERFORM recalcula_formula.

WHEN 'RUN'. "buttom added by me

PERFORM corre_batch_input.

endcase.

ENDFORM. "USER_COMMAND

I need to execute the standard funtion bottom '&REFRESH' before my perform 'recalcula_formula'.

0 Kudos

Hi,

The changed data will be available in the internal table you are using for ALV. Need not to do refresh. Just check this SAP standard program BCALV_FULLSCREEN_GRID_EDIT.

Regards,

Gagan