Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Button's Event Handler Method not getting triggered

To add a button I have written the following code:

clear ls_button.
    l_import = 'Mass Upload'.
    l_enabled = 'X'.
    clear ls_button.
    ls_button-on_click = 'UPLOAD'. "IMPORT FILE
    ls_button-text     = l_import.
    ls_button-enabled  = l_enabled.
    INSERT ls_button INTO rt_buttons INDEX 5.

Created a new Event Handler method for it and wrote the following code:

gr_file_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'ZSRQM_INCID_H/FileUploadwindow'
    iv_usage_name = 'ZCufileupload'
    iv_title = l_title ).


  gr_file_popup->set_on_close_event( iv_view = me iv_event_name = 'upload' ).
  gr_file_popup->open( ).

When i run in th component in debug mode,my event is not getting triggered.

Please suggest.

Regards

Najam

Tags:
Former Member
replied

Try the following code in first part...

clear ls_button.

l_import = 'Mass Upload'.

clear ls_button.

ls_button-on_click = 'UPLOAD'. "IMPORT FILE

ls_button-text = l_import.

ls_button-page_id = me->component_id.

ls_button-enabled = abap_true.

INSERT ls_button INTO rt_buttons INDEX 5.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question