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: 

Standard Tool Bar is missing at the top of Container for ALV Grid Display

former_member267852
Participant
0 Kudos

Hi All,

I have developed an ALV report using Container.

I found that Standard tool bar buttons at top of Container are missing like sort ascending, sort descending, Summetion, Excel download, etc...

I want that even Standard tool bar buttons have to display for better options.

help me regarding this.

Regards,

Naresh.

1 ACCEPTED SOLUTION

naveenvishal
Contributor
0 Kudos

Hi Naresh,

Which method you using for ALV report?

Regards,

Naveen

5 REPLIES 5

naveenvishal
Contributor
0 Kudos

Hi Naresh,

Which method you using for ALV report?

Regards,

Naveen

0 Kudos

Hi Naveen,

     Data : gv_alvgrid TYPE REF TO cl_gui_alv_grid.

     DATA: gv_ccontainer TYPE REF TO cl_gui_custom_container.
     DATA: gv_custom_control_name TYPE scrfname VALUE 'CONT_ALV_OUTPUT'.

    IF gv_alvgrid IS INITIAL.
*Creating custom container instance
      CREATE OBJECT gv_ccontainer
        EXPORTING
          container_name              = gv_custom_control_name.

*Creating ALV Grid instance
      CREATE OBJECT gv_alvgrid
        EXPORTING
          i_parent          = gv_ccontainer.

      DATA : lv_disvariant TYPE disvariant.
      lv_disvariant = sy-repid.

      CALL METHOD gv_alvgrid->set_table_for_first_display
        EXPORTING
          is_variant                    = lv_disvariant
          i_save                        = 'A'
          is_layout                     = gs_layout
          i_default                     = 'X'
*          it_toolbar_excluding          = ' '
        CHANGING
          it_outtab                     = gt_final
          it_fieldcatalog               = gt_fieldcat.

Regards,

Naresh.

0 Kudos

Hi Naresh ,

You can append buttons to the button toolbar in the container and then bind the buttons to the event listener / receiver as follows:

http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=117506242

This will handle all the events as per SAP definitions.

Hope this helps.

Regards,

Naveen

0 Kudos

Hi Naveen,

Mistake is mine...

I am handling other's object, he has set no_toolbar = 'X' in layout.

that;s y it was missed.

i have removed it and able to get standard tool bar as required.

Regards,

Naresh.

0 Kudos

Hi Naresh,

Nice to know problem is resolved.

Pl close the thread now.

Regards,

Naveen