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

add function in alv

dmi
Participant
0 Likes
1,823

Hello

I have a alv-list with cl_salv_table.

Now I want to add a button behind the standard buttons in alv-grid (Refresh function)

Thanks for any helps

Daniel

5 REPLIES 5
Read only

Former Member
0 Likes
1,312

Go to the gui status and add ur new button on the application toolbar.

after u call the factory method activate ALV generic Functions and include own functions by setting own status.

data: gr_alv type ref to cl_salv_table.

CALL METHOD cl_salv_table=>factory

EXPORTING

list_display = abap_false

IMPORTING

r_salv_table = gr_alv

CHANGING

t_table = it_out_tab.

gr_alv->set_screen_status(

pfstatus = c_pfstatus_alv

report = sy-repid ).

set_functions = GR_alv->c_functions_all ).

Read only

0 Likes
1,312

Thanks Kalyan

This call I have the problem:

gr_alv->set_screen_status(

pfstatus = c_pfstatus_alv

report = sy-repid ).

set_functions = GR_alv->c_functions_all ).

c_pfstatus_alv is a pf-status what I define by my self, right?

When I do that, so I have only my own function in the grid, but I want the standard buttons to.

(Sort, Export, etc.)

Thanks for any help

Daniel

Read only

0 Likes
1,312

the button u need to add will be in the application tool bar..right?

if u hve the pf status..c_pfstatus_alv will be this that u will enter. On this PF status u will create ur own botton and pass the pfstatus name in the code given.

with this code.. guess u will hve all the other functions too..

Read only

0 Likes
1,312

Hi

Now I'm one step ahead - I copied the status SALV_STANDARD into my report, it works.

But now I get the next problem. I need the button EXPORT (Export the Grid data to Excel, etc.)

Thanks for any help

Daniel

Read only

dmi
Participant
0 Likes
1,312

solved by my self