01-30-2009 10:31 PM
I need display subtotals text in ALV . I am using the Event:
FOR EVENT subtotal_text OF cl_gui_alv_grid
IMPORTING es_subtottxt_info
ep_subtot_line
e_event_data.
but the problem is that it is not triggered
Please help me!!! Someone have a solution? It doesn't display any text.
My code is :
METHOD subtotal_text.
PERFORM event_subtotal_text USING es_subtottxt_info
ep_subtot_line
e_event_data.
ENDMETHOD. "subtotal_text
----
FORM event_subtotal_text USING es_subtottxt_info TYPE lvc_s_stxt
ep_subtot_line TYPE REF TO data
e_event_data TYPE REF TO cl_alv_event_data.
break mmalarconv.
FIELD-SYMBOLS: <fs_text> TYPE ANY.
IF es_subtottxt_info-criteria = 'BUKRS'.
ASSIGN e_event_data->m_data->* TO <fs_text>.
<fs_text> = 'Subtotal Company'.
ENDIF.
ENDFORM. " d0100_event_subtotal_text
01-31-2009 4:33 AM
Whatever steps mentioned in the given link for normal ALV are also valid for ALV using oops. Pl. follow these steps to display subtotal text in ALV OO.
https://wiki.sdn.sap.com/wiki/x/PYPVAg
Regards,
Joy.
01-30-2009 11:40 PM
Hi,
Please try to plug in the code below to get sub total text.
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
'SUBTOTAL_TEXT'. DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.* Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.ENDFORM. " sub_get_event
Best Regards
Krishna
01-31-2009 4:33 AM
Whatever steps mentioned in the given link for normal ALV are also valid for ALV using oops. Pl. follow these steps to display subtotal text in ALV OO.
https://wiki.sdn.sap.com/wiki/x/PYPVAg
Regards,
Joy.
02-03-2009 3:00 PM
I am using method
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
i_default = 'X'
i_save = 'X'
is_layout = gt_layout
it_toolbar_excluding = gt_exclude
CHANGING
it_sort = gt_sort[]
it_fieldcatalog = gt_fieldcat[]
it_outtab = <gt_table>.
CREATE OBJECT g_handler.
SET HANDLER g_handler->handle_catch_doubleclick FOR g_grid.
SET HANDLER g_handler->subtotal_text FOR g_grid.
but as mentioned the event subtotal_text is not triggered.
Anybody knows which is the problem?
Thanks in advance.
regards.
03-30-2009 1:27 PM
Hi Experts,
I have a similar problem, Please provide me the solution
03-30-2009 4:32 PM