Application Development and Automation 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: 
Read only

Toolbar in oops

divsmart
Participant
0 Likes
1,330

class.jpgtoolbar.txtHi Exxperts,

I tried on adding an toolbar using class 'cl_salv_functions_list'. but i am unable to see.

Can someone help me to resolve it. Please see attached source.txt.

Regards,

Senthil.G .

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
1,272

Hello divsmart

Try running the TOOLBAR_VBAK method inside of the DISPLAY_VBAK method, before the ALV is shown.

  METHOD display_vbak.

    DATA: alv_error TYPE REF TO cx_salv_msg.
*    DATA: alv_table TYPE REF TO cl_salv_table.

    TRY.
        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table   = alv_table
          CHANGING
            t_table        = lt_vbak
            .
      CATCH cx_salv_msg INTO alv_error .
    ENDTRY.

    toolbar_vbak( ). " <---

      alv_table->display( ).
  ENDMETHOD.                    "display_vbak

Kind regards,

Mateusz

Hello divsmart

Try running the TOOLBAR_VBAK method inside of the DISPLAY_VBAK method, before the ALV is shown.

  METHOD display_vbak.

    DATA: alv_error TYPE REF TO cx_salv_msg.
*    DATA: alv_table TYPE REF TO cl_salv_table.

    TRY.
        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table   = alv_table
          CHANGING
            t_table        = lt_vbak
            .
      CATCH cx_salv_msg INTO alv_error .
    ENDTRY.

    toolbar_vbak( ). " <---

      alv_table->display( ).
  ENDMETHOD.                    "display_vbak

Kind regards,

Mateusz
3 REPLIES 3
Read only

MateuszAdamus
Active Contributor
1,273

Hello divsmart

Try running the TOOLBAR_VBAK method inside of the DISPLAY_VBAK method, before the ALV is shown.

  METHOD display_vbak.

    DATA: alv_error TYPE REF TO cx_salv_msg.
*    DATA: alv_table TYPE REF TO cl_salv_table.

    TRY.
        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table   = alv_table
          CHANGING
            t_table        = lt_vbak
            .
      CATCH cx_salv_msg INTO alv_error .
    ENDTRY.

    toolbar_vbak( ). " <---

      alv_table->display( ).
  ENDMETHOD.                    "display_vbak

Kind regards,

Mateusz
Read only

0 Likes
1,272

Hi mateuszadamus

you are always great!!! can i get an link to set top-of-page using class 'cl_salv_table->GET_TOP_OF_LIST_PRINT' i searched in SDN but no any correct solutions.

your help is much apprcieted!!!

Read only