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: 

CL_SALV_TABLE refresh button

Former Member
0 Kudos

I need to add a refresh button to my ALV report designed using CL_SALV_TABLE class. I made a copy of the SALV_TABLE_STANDARD status from function group SALV and added it to me program. Then I have code that says

gr_table->set_screen_status(  pfstatus      = 'SALV_TABLE_STANDARD'

report        = sy-repid

set_functions = gr_table->c_functions_all ).

I still dont see the refresh button though. What am I doing wrong? Infact there are many button from the application toolbar that are missing.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

That didnt not solve it. I copied the GUI status from SALV. And in my program I can see all the buttons. But Do I have to activate something or add the buttons somehow?

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please try to move SY-REPID to a variable and use this variable when passing to the method.




data: lv_repid type sy-repid.

lv_repid = sy-repid.
gr_table->set_screen_status(  pfstatus      = 'SALV_TABLE_STANDARD'
                                            report        = lv_repid
                                            set_functions = gr_table->c_functions_all ).

Regards,

Rich Heilman

Former Member
0 Kudos

That didnt not solve it. I copied the GUI status from SALV. And in my program I can see all the buttons. But Do I have to activate something or add the buttons somehow?

0 Kudos

Megan,

Yes, after you copy the gui status to your program, you must edit that gui status and add your new button. Follow this tutorial here.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899...

When modifying the gui status, if there is no room, you can get rid of one of the icons at the end, such as one of the "black" arrows. I have done so in the example in the tutorial.

Regards,

Rich Heilman

Former Member
0 Kudos

But the refresh button is already available. Then why do I have to add myfunction to the application toolbar.

Former Member
0 Kudos

Well I went ahead did what you said and added a myfunction with the refresh icon. And Now I see it in there Thanks Rich

Now I am going to go through your document to figure out how to code the event part of it.

0 Kudos

My problem is the same. I can't see the refresh button, although it is already defined in the gui status.

Is there any way to enable this standard function?

The workaround to define my own function would be ok, but it's not the best way, not?

Thanks for any help.