Notes
Notes - notes.io |
CLASS lcl_gui_alv_event_receiver3 DEFINITION.
PUBLIC SECTION.
METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id es_row_no. "this will be passed each time your click on the cell
ENDCLASS. "lcl_gui_alv_event_receiver DEFINITION
CLASS lcl_gui_alv_event_receiver3 IMPLEMENTATION.
METHOD handle_hotspot_click .
READ TABLE gt_documentfiles ASSIGNING FIELD-SYMBOL(<fs_documentfiles>) INDEX e_row_id-index.
IF sy-subrc = 0.
PERFORM download_documentfiles USING <fs_documentfiles>.
ENDIF.
ENDMETHOD . "handle_hotspot_click
ENDCLASS.
"For Container & ALV
DATA : go_container_d TYPE REF TO cl_gui_custom_container,
go_alv_d TYPE REF TO cl_gui_alv_grid,
gs_variant_d TYPE disvariant,
gs_layout TYPE lvc_s_layo.
"" for handling alv "alv event receiver class
DATA: g_alv_event_ref1 TYPE REF TO lcl_gui_alv_event_receiver3.
MODULE status_9001 OUTPUT.
* SET PF-STATUS '9001_E'.
* SET TITLEBAR 'xxx'.
PERFORM free_container.
PERFORM display_alv_d.
ENDMODULE.
FORM free_container .
"" IF conatiner already filled then clear it
IF go_container_d IS NOT INITIAL.
CALL METHOD go_alv_d->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CALL METHOD go_container_d->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
ENDIF.
ENDFORM.
FORM display_alv_d .
"" Display Buy Data
CREATE OBJECT go_container_d
EXPORTING
container_name = 'DOWN'.
CREATE OBJECT go_alv_d
EXPORTING
i_parent = go_container_d.
gs_layout-stylefname = 'CELLTAB'.
gs_layout-cwidth_opt = abap_true.
CONCATENATE sy-repid '01' INTO gs_variant_d-report.
CALL METHOD go_alv_d->set_table_for_first_display
EXPORTING
is_layout = gs_layout
i_save = abap_true
is_variant = gs_variant_d
CHANGING
it_outtab = gt_documentfiles
it_fieldcatalog = gt_fieldcat.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD go_alv_d->refresh_table_display.
CREATE OBJECT g_alv_event_ref1.
"" For handling Hotspot
SET HANDLER g_alv_event_ref1->handle_hotspot_click FOR go_alv_d.
ENDFORM.
CASE sy-ucomm.
WHEN 'CANCEL' OR 'X' OR 'ENTER'.
SET SCREEN 0.
ENDCASE.
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team