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: 

Pushbutton in ALV

Former Member
0 Kudos

Hi ,

how can i add a pushbutton in the menu of ALV.

Regards

Arun

4 REPLIES 4

Former Member
0 Kudos

Hi Arun,

Check the following code:

CLASS lcl_events DEFINITION.

PUBLIC SECTION.

METHODS:

handle_toolbar

FOR EVENT toolbar OF cl_gui_alv_grid

IMPORTING e_object e_interactive.

PRIVATE SECTION.

ENDCLASS.

CLASS lcl_events IMPLEMENTATION.

METHOD handle_toolbar.

DATA:

zzl_toolbar TYPE stb_button.

*---Append an icon for "Check prices"

CLEAR:

zzl_toolbar.

zzl_toolbar-function = 'CHECK_PRICE'.

zzl_toolbar-icon = icon_check.

zzl_toolbar-quickinfo = text-fq6.

zzl_toolbar-text = text-fi6.

APPEND zzl_toolbar

TO e_object->mt_toolbar.

ENDMETHOD.

ENDCLASS.

Regards,

John.

athavanraja
Active Contributor
0 Kudos

look at program

<b>BCALV_TEST_USER_COMMANDS</b>

User defined button called "Change Data" is added.

Regards

Raja

ssimsekler
Active Contributor
0 Kudos

Hi Arun

You can also make use of the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.

Kind Regards...

*--Serdar

Former Member
0 Kudos

Hi Arun ,

Just refer to this document.Hope it will do...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/abap code sample for data browser using alv grid.doc

Regards ,

Immanuel.