Skip to Content

How to get custom PF status in ALV using cl_salv_table (Using a container)

I created a screen and inside that a container.I tried for an ALV display using CL_SALV_TABLE in the cvontainer. It's working. when I opted for default PF status.It's working. But when I tried for custom PF status using SET_SCREEN_STATUS method, it's throwing some exception. But it's working if I don't use a container .

In both the cases I copied PF status into my program from some standard program.Then added some functionality.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Mar 17, 2009 at 01:19 PM

    When you use the Container, ALV will expect the Toolbar within that container, not in the PF-STATUS.

    When you create an ALV without the Container, you are creating the Full Screen ALV and here you can have your custom PF Status. But when you create the ALV with the container you are creating the ALV Grid. For this Grid, you must use the method ADD_FUNCTION of class CL_SALV_FUNCTIONS to have your function added in the toolbar.


    * Code snippet from the SALV_DEMO_TABLE_FUNCTIONS
    *... §3.1 activate ALV generic Functions
        data: lr_functions type ref to cl_salv_functions,
              l_text       type string,
              l_icon       type string.
        lr_functions = gr_table->get_functions( ).
        lr_functions->set_all( gc_true ).
    *... §3.2 include own functions
        l_text = text-b01.
        l_icon = icon_complete.
            name     = 'MYFUNCTION'
            icon     = l_icon
            text     = l_text
            tooltip  = l_text
            position = if_salv_c_function_position=>right_of_salv_functions ).
          catch cx_salv_existing cx_salv_wrong_call.



    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2009 at 09:21 AM

    I f you are using Screen and container use CLass:




    Create PF-STATUS in PBO of screen.

    [Change standard PF|]

    EXCLUDE Certain buttons on standard toolbar:

    DATA: lt_exclude TYPE ui_functions,

    ls_exclude TYPE ui_func.

    ls_exclude = cl_gui_alv_grid=>mc_fc_sum.

    APPEND ls_exclude TO lt_exclude.

    CLEAR ls_exclude.

    ls_exclude = cl_gui_alv_grid=>mc_mb_filter.

    APPEND ls_exclude TO lt_exclude.

    CLEAR ls_exclude.

    ls_exclude = cl_gui_alv_grid=>mc_mb_sum.

    APPEND ls_exclude TO lt_exclude.

    pass lt_exclude to METHOD-->SET_TABLE_FOR_FIRST_DISPLAY



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 14, 2009 at 12:01 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.