Skip to Content
avatar image
Former Member

PF-Status icons not showing using ALV table

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.

pfstatus-test.png (10.3 kB)
code.png (15.2 kB)
pfstatuspgm.png (22.1 kB)
systemstatus.png (18.5 kB)
pfstatuspgm.png (36.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 05, 2017 at 08:10 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • May 05, 2017 at 06:57 PM

    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 ).
    
    
    Add comment
    10|10000 characters needed characters exceeded

  • May 05, 2017 at 07:00 PM

    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!

    Add comment
    10|10000 characters needed characters exceeded