Skip to Content
author's profile photo Former Member
Former Member

Buttons in alv-grid object on line-level

Hello experts,

i need buttons inside of the alv-grid. So every dataline should contains a button as a normal fieldcat-field. I do not want to expand the apllcation-bar of the alv.

I know that this issue is possible with table-control objects but i don't find any way to do this inside an alv.

Thanks for your help!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 26, 2009 at 04:52 PM

    Hello Marcel

    You have to a the "style" option to your outtab definition:

    TYPES: BEGIN OF ty_s_outtab.
       INCLUDE TYPE vbak.
    TYPES: celltab  TYPE lvc_t_styl.
    TYPES: END OF ty_s_outtab.
    
    DATA: gt_outtab TYPE STANDARD TABLE OF ty_s_outtab.

    In the layout you have to define this additional field:

    LVC_S_LAYO-stylefname = 'CELLTAB'.

    And then you need to fill for those cells where you want to have a button:

    ls_cell-style = cl_gui_alv_grid=>mc_style_button.

    The button triggers event BUTTON_CLICK (not really surprisingly).

    Regards

    Uwe

    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.