Skip to Content
0
Former Member
Nov 12, 2010 at 07:25 PM

How to set Callback Status in ALV OO

768 Views

Hi All,

I need to find the method or object to use to set the callback status to my program so I may use forms that I have developed.

How do i do that?

thanks

KW

 TRY.

        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table = gr_alv
          CHANGING
            t_table      = gt_dev_task_display.

        PERFORM f_display_settings.

        gr_alv->set_screen_status(
        pfstatus = 'ZALV_STANDARD_KW'
        report = sy-repid
        set_functions = gr_alv->c_functions_all ). "set all basic ALV funtions

        gr_events = gr_alv->get_event( ).

**... optimize the column widths
        TRY.
            lr_columns = gr_alv->get_columns( ).
            lr_columns->set_optimize( 'X' ).
          CATCH cx_salv_not_found.                      "#EC NO_HANDLER
        ENDTRY.

*   get layout object
        lo_layout = gr_alv->get_layout( ).
*
*   set Layout save restriction
*   1. Set Layout Key .. Unique key identifies the Differenet ALVs
        ls_key-report = sy-repid.
        lo_layout->set_key( ls_key ).
*   2. Remove Save layout the restriction.
        lo_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
        lo_layout->set_default( abap_true ).
*
        gr_functions = gr_alv->get_functions( ).

        gr_functions->set_all('X').

        gr_functions->set_group_filter( value = if_salv_c_bool_sap=>false ).

        gr_alv->get_display_settings( ).

        gr_alv->display( ).

      CATCH cx_salv_msg.
        MESSAGE 'ALV Display Not possible'(w02) TYPE 'I' DISPLAY LIKE 'E'.
    ENDTRY.