2009 Apr 29 1:06 PM
Dear ABAP ers,
I have a question for you.
I am dealing with the event SUTOTAL_TEXT in ALV, to change sub total text in the screen?
But the event is not triggered and the control is not going to that FORM.
*****************************************************************************
FORM eventtab_build CHANGING lt_events TYPE slis_t_event.
CONSTANTS: gc_formname_subtotal_text TYPE slis_formname value 'SUBTOTAL_TEXT',
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
READ TABLE lt_events WITH KEY name = slis_ev_subtotal_text into ls_event.
if sy-subrc = 0.
move 'gc_formname_subtotal_text to ls_event-form.
append ls_event to lt_events.
endif.
ENDFORM.
*****************************************************************************
FORM alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
it_events = gt_events[]
is_print = gs_print
tables
t_outtab = gt_output
exceptions
program_error = 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.
ENDFORM.
FORM subtotal_text CHANGING p_subtot_text TYPE slis_subtot_text.
BREAK-point.
ENDFORM. "subtotal_text
But the control is not coming to the above break-point.
ANY SUGGESTIONS FLOKS???
Srihari.
Dear ABAP ers,
I have a question for you.
I am dealing with the event SUTOTAL_TEXT in ALV, to change sub total text in the screen?
But the event is not triggered and the control is not going to that FORM.
*****************************************************************************
FORM eventtab_build CHANGING lt_events TYPE slis_t_event.
CONSTANTS: gc_formname_subtotal_text TYPE slis_formname value 'SUBTOTAL_TEXT',
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
READ TABLE lt_events WITH KEY name = slis_ev_subtotal_text into ls_event.
if sy-subrc = 0.
move 'gc_formname_subtotal_text to ls_event-form.
append ls_event to lt_events.
endif.
ENDFORM.
*****************************************************************************
FORM alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
it_events = gt_events[]
is_print = gs_print
tables
t_outtab = gt_output
exceptions
program_error = 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.
ENDFORM.
FORM subtotal_text CHANGING p_subtot_text TYPE slis_subtot_text.
BREAK-point.
ENDFORM. "subtotal_text
But the control is not coming to the above break-point.
ANY SUGGESTIONS FLOKS???
Srihari.
2009 Apr 29 1:21 PM
Change the code as specified:
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
READ TABLE lt_events WITH KEY name = slis_ev_subtotal_text into ls_event.
if sy-subrc = 0.
move 'gc_formname_subtotal_text to ls_event-form.
*append ls_event to lt_events.
modify lt_events from ls_event index sy-tabix. " Not too sure of the syntax,
endif.Not too sure of the Modify syntax, but you have to modify the lt_events itab and not append.
Regards,
Ravi
2009 Apr 29 1:23 PM
Hi,
Need to Modify...
READ TABLE lt_events WITH KEY name = slis_ev_subtotal_text into ls_event.
if sy-subrc = 0.
move 'gc_formname_subtotal_text to ls_event-form.
MODIFY lt_events FROM ls_event TRANSPORTING form INDEX SY-TABIX.
endif.
2009 Apr 29 1:29 PM
Sorry..
i m doing MODIFY in my code, and the internal table GT_EVENTS is updated with the respective FORM name against the event SUBTOTAL_TEXT.
Still Control is not going to that form.
2009 Apr 29 1:39 PM
2009 Apr 29 1:47 PM
2009 Apr 29 1:54 PM
yes even i am talking about that...did you check the above mentioned thread...
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |