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: 

PF-Status icons not showing using ALV table

Former Member

I've created a custom PF-Status, both from copying salv_test_table_layout/salv_standard and creating from scratch. I get the same results from either approach. When I test my layout, all icons and menu options show. However, when I run my program, only part of the icons show. I've deactivated and reactivated the problem icons/functions, I've moved them around in the order, I've deleted and re-added, nothing is changing the results. Here is my latest pf-status screen below, the test results and the results when I use it in my program.

test of the pf status :

using the pf status in the pgm

Program results:

The select all and deselect all wouldn't show, so I defined custom methods for those. Now the change layout icon and menu option will show, but the choose and save layout icons will not (nor will the menu options ungray).

If I do a system status on the program, it is using the right pf-status:

I've tried everything I can think of for 2 days. I've created programs from scratch, I've copied the example programs, I've logged out and back in before running the program. I'm using the table control because the users want full screen no matter what computer they use. I know I can switch to grid and dock it - which at this rate may be my only option. However, this is driving me crazy and I hate to just leave it and not understand the issue. My experience with ALV before this assignment has all been in webdynpro and I never had these issues there. Is this a lack of knowledge on my part? The SAP demo programs appear to do the same steps. Their pf-status's load just fine - they show like they test.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

Probably the GUI status is set using SET PF-STATUS 'Z...' EXCLUDING {list of function codes}. You may add a "statement breakpoint" in debug on "SET PF-STATUS" to make sure.

Did you try :

DATA lo_functions_list type ref to cl_salv_functions_list.
lo_functions_list = gr_table->get_functions( ).
lo_functions_list->set_layout_load( IF_SALV_C_BOOL_SAP=>TRUE ).
lo_functions_list->set_layout_change( IF_SALV_C_BOOL_SAP=>TRUE ).
lo_functions_list->set_layout_maintain( IF_SALV_C_BOOL_SAP=>TRUE ).
lo_functions_list->set_layout_save( IF_SALV_C_BOOL_SAP=>TRUE ).

Jelena
Active Contributor
0 Kudos

I suspect this has something to do with lr_functions code. See if Naimesh Patel's answer to this old post could help here. If you Google "SALV custom PF status" (as well as other SALV keywords) you can find more of his examples on Zevolving web site.

If A works and B doesn't then usually we need to look for the differences between A and B. Based on the screenshots, it looks very much like the functions are excluded from the GUI status. I'm not an SALV expert myself though, sorry!

nomssi
Active Contributor

I suspect your lr_functions->set_default( abap_true ). resets the status and you really need lr_functions->set_all( ).