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

Button Display

Hi anybody,

I want to use click event button inside abap programe.

how to use click events of button.

anybody tell me.

Regards,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 04:08 PM

    hi,

    for this the user commmand is used...

    if sy-ucomm = 'TES'.

    do some thing....

    endif.

    reward if useful.

    regards.

    srishti.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:56 PM

    Hi udith bajpai,

    If you want a additional Button on a ALV here is the logic how you do it...here STATUS is where you Design your Custom button and the following functions will help you with the function module.

    i_callback_pf_status_set = 'STATUS'

    i_callback_user_command = 'COMMAND'

    Here is the sample code how you use this in the function Module....this will help you...

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = w_program

    i_callback_pf_status_set = 'STATUS'

    i_callback_user_command = 'COMMAND'

    i_structure_name = 'STRUCTURE'

    is_layout = fm_layout

    tables

    t_outtab = itab

    exceptions

    program_error = 1

    others = 2

    ***********************************************************************

    • Here our own custom PF STATUS (STATUS) is passed into the ALV function

    • module through this statement.

    ***********************************************************************

    form STATUS using rt_extab type slis_t_extab.

    set pf-status 'STATUS' excluding rt_extab.

    endform. "STATUS

    ************************************************************************

    • This is where the logic when the User Defined Custom Button is pressed

    • is written. The statement "WHEN 'STATUS'" comes into play when the

    • button is pushed on the output screen.

    ************************************************************************

    form COMMAND using ucomm like sy-ucomm

    selfield type slis_selfield.

    selfield-refresh = 'X'.

    case ucomm.

    when '&STAT'.

    write your logic here...........

    endcase.

    Let me know if you need help furthur....

    Thanks and Regards,

    Sandeep

    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.