Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to get Subtotal text in ALV using OOPS

hi,

Can any one pls help me out getting <b>subtotals text</b> in ALV using OOPS concepts....Pls provide me if any of u have sample code for that......

my code:

data:gr_grid_d0100 type ref to cl_gui_alv_grid.

data : gr_events_d0100 type ref to lcl_events_d0100.

classes**********

class lcl_events_d0100 definition.

public section.

methods:

subtotal_text for event subtotal_text

of cl_gui_alv_grid

importing es_subtottxt_info

ep_subtot_line

e_event_data.

endclass.

*****************************

class lcl_events_d0100 implementation.

method subtotal_text.

perform d0100_event_subtotal_text using es_subtottxt_info

ep_subtot_line

e_event_data.

endmethod. "subtotal_text

endclass.

data : gr_event_handler type ref to lcl_events_d0100.

SET HANDLER gr_event_handler->subtotal_text FOR wcl_alv_grid_request

****************

FORM d0100_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.

DATA: l_text TYPE string.

l_text = es_subtottxt_info.

FIELD-SYMBOLS: <fs> TYPE ANY.

ASSIGN e_event_data->m_data->* TO <fs>.

<fs> = text-007.

Tags:
Not what you were looking for? View more on this topic or Ask a question