EVENTS IN ALV
Page 1 of 1
EVENTS IN ALV
EVENTS in ALV:-
SAP has given standard events that can be used on reports. When you use display function modules like ‘REUSE_ALV_GRID_DISPLAY’ in that we have some parameters to handle events listed below.
I_CALLBACK_PF_STATUS_SET
I_CALLBACK_USER_COMMAND
I_CALLBACK_TOP_OF_PAGE
I_CALLBACK_HTML_TOP_OF_PAGE
I_CALLBACK_HTML_END_OF_LIST
If you want to use standard 17 events given by SAP then use Function module ‘REUSE_ALV_EVENTS_GET’. Declare an internal table of type ‘slis_alv_event’ and pass to the events function module. This structure has two fields NAME & FORM.
CALLER_EXIT
USER_COMMAND
TOP_OF_PAGE
TOP_OF_COVERPAGE
END_OF_COVERPAGE
FOREIGN_TOP_OF_PAGE
FOREIGN_END_OF_PAGE
PF_STATUS_SET
LIST_MODIFY
TOP_OF_LIST
END_OF_PAGE
END_OF_LIST
AFTER_LINE_OUTPUT
BEFORE_LINE_OUTPUT
REPREP_SEL_MODIFY
SUBTOTAL_TEXT
GROUPLEVEL_CHANGE
These are 17 event names which SAP provides and are stored into internal table. Let us consider you want to use user-command event then use the following code.
To upload LOGO into ALV use Function Module ‘REUSE_ALV_COMMENTRY_WRITE’. You can upload your own logo through tcode SE78.
SAP has given standard events that can be used on reports. When you use display function modules like ‘REUSE_ALV_GRID_DISPLAY’ in that we have some parameters to handle events listed below.
I_CALLBACK_PF_STATUS_SET
I_CALLBACK_USER_COMMAND
I_CALLBACK_TOP_OF_PAGE
I_CALLBACK_HTML_TOP_OF_PAGE
I_CALLBACK_HTML_END_OF_LIST
If you want to use standard 17 events given by SAP then use Function module ‘REUSE_ALV_EVENTS_GET’. Declare an internal table of type ‘slis_alv_event’ and pass to the events function module. This structure has two fields NAME & FORM.
CALLER_EXIT
USER_COMMAND
TOP_OF_PAGE
TOP_OF_COVERPAGE
END_OF_COVERPAGE
FOREIGN_TOP_OF_PAGE
FOREIGN_END_OF_PAGE
PF_STATUS_SET
LIST_MODIFY
TOP_OF_LIST
END_OF_PAGE
END_OF_LIST
AFTER_LINE_OUTPUT
BEFORE_LINE_OUTPUT
REPREP_SEL_MODIFY
SUBTOTAL_TEXT
GROUPLEVEL_CHANGE
These are 17 event names which SAP provides and are stored into internal table. Let us consider you want to use user-command event then use the following code.
- Code:
[color=black]data : it_events type table of slis_alv_event,
wa_events type slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = it_events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
read table it_events into wa_events with key name = 'USER_COMMAND'.
wa_events-form = 'SUB_USER_COMMAND'.
modify it_events from wa_events index sy-tabix.
*&---------------------------------------------------------------------*
*& Form SUB_USER_COMMAND
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form SUB_USER_COMMAND using v_ucomm type sy-ucomm
v_slis type slis_selfield.
" your code here
endform. "SUB_USER_COMMAND
To upload LOGO into ALV use Function Module ‘REUSE_ALV_COMMENTRY_WRITE’. You can upload your own logo through tcode SE78.
govind- Admin
- Posts : 54
Join date : 2012-01-31
Similar topics
» Events in ABAP Reporting
» What are the list of events used in ABAP4?
» What are Control break events in ABAP?
» Simple ALV Grid example with TOP-OF-PAGE and ALV Events
» Fundamentals of events in ABAP Objects
» What are the list of events used in ABAP4?
» What are Control break events in ABAP?
» Simple ALV Grid example with TOP-OF-PAGE and ALV Events
» Fundamentals of events in ABAP Objects
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Aug 20, 2012 4:37 pm by Admin
» Difference between Type and Like
Thu Jun 07, 2012 2:40 pm by Admin
» How to handle table control fields in Module Pool program?
Wed May 09, 2012 2:41 am by govind
» Three tables inner join in SAP
Thu May 03, 2012 4:47 pm by Uma_ABAP
» Creating table type in ABAP
Sat Apr 28, 2012 9:03 pm by Uma_ABAP
» Creating user defined types and structures in ABAP
Sat Apr 28, 2012 8:55 pm by Uma_ABAP
» Creating Dynamic Internal Table and Dynamic Field catalog in SAP-ABAP
Fri Apr 27, 2012 11:00 am by Admin
» Copy Custom PF-Status from Standard program to Custom Program in ALV
Thu Apr 26, 2012 9:52 pm by Uma_ABAP
» Calculate/find number of working days between two dates in SAP
Tue Apr 24, 2012 2:06 pm by Uma_ABAP