Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

EVENT subtotal_text ALV OO

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

5 REPLIES 5

nkr1shna
Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

Hi Experts,

I have a similar problem, Please provide me the solution