Skip to Content
0
Former Member
Aug 27, 2009 at 03:28 AM

Change Subtotal Text for ALV List Append

95 Views

Hi,

I would like to display a few ALVs using REUSE_ALV_BLOCK_LIST_APPEND. WIthin these ALVs, I have to do some subtotals for a few fields. I would like to change the subtotal text displayed in the ALV. Currently, the subtotal text is displaying as ** and I would like to change it to e.g. 'Subtotals for City', 'Subtotals for State'. I have tried using the event SLIS_EV_SUBTOTAL_TEXT and coded its subroutine as per below. However, the subtotal text does not get changed. Any idea why?

FORM BUILD_EVENTS .

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_TOP_OF_LIST.

GW_EVENT-FORM = 'TOP_OF_LIST_P1_U1'.

APPEND GW_EVENT TO GT_EVENTS_p1_u1.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_SUBTOTAL_TEXT.

GW_EVENT-FORM = 'SUBTOTAL_TEXT_SET'.

APPEND GW_EVENT TO GT_EVENTS_p1_u1.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_TOP_OF_LIST.

GW_EVENT-FORM = 'TOP_OF_LIST_P0' .

APPEND GW_EVENT TO GT_EVENTS_p0.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_SUBTOTAL_TEXT.

GW_EVENT-FORM = 'SUBTOTAL_TEXT_SET'.

APPEND GW_EVENT TO GT_EVENTS_p0.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_TOP_OF_LIST.

GW_EVENT-FORM = 'TOP_OF_LIST_S0'.

APPEND GW_EVENT TO GT_EVENTS_S0.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_SUBTOTAL_TEXT.

GW_EVENT-FORM = 'SUBTOTAL_TEXT_SET'.

APPEND GW_EVENT TO GT_EVENTS_S0.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_TOP_OF_LIST.

GW_EVENT-FORM = 'TOP_OF_LIST_S1'.

APPEND GW_EVENT TO GT_EVENTS_S1.

CLEAR GW_EVENT.

GW_EVENT-NAME = SLIS_EV_SUBTOTAL_TEXT.

GW_EVENT-FORM = 'SUBTOTAL_TEXT_SET'.

APPEND GW_EVENT TO GT_EVENTS_S1.

ENDFORM. " BUILD_EVENTS

----


  • SUBTOTAL_TEXT_SET *

----


  • ........ *

----


FORM SUBTOTAL_TEXT_SET CHANGING p_total TYPE any

p_subtot_text TYPE slis_subtot_text.

IF p_subtot_text-criteria = 'CITY'.

p_subtot_text-display_text_for_subtotal = 'Total City'

ENDIF.

IF p_subtot_text-criteria = 'COUNTY'.

p_subtot_text-display_text_for_subtotal = 'Total State'.

ENDIF.

ENDFORM.