Application Development and Automation 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: 
Read only

Alv text display

Former Member
0 Likes
449

Hi expert,

In alv report totals are displayed as "TOTAL", And i need to display grand total as "GRAND TOTAL" as a text, but it over write the text as "TOTAL" as "GRAND TOTAL".

I will write the code below.

FORM subtotal_text CHANGING p_total TYPE any

p_subtot_text TYPE slis_subtot_text.

DATA: text TYPE string.

data: v_len type i,

V_LINE TYPE I.

v_len = lines( it_output ).

IF p_subtot_text-criteria = 'LIFNR'.

LOOP AT it_output INTO wa_output.

ON CHANGE OF wa_output-lifnr.

CONCATENATE wa_output-name 'TOTAL' INTO text SEPARATED BY SPACE.

p_subtot_text-display_text_for_subtotal = text.

CLEAR text.

ENDON.

ENDLOOP.

ENDIF.

if sy-index = v_len.

p_subtot_text-display_text_for_subtotal = 'GRAND TOTAL'.

endif.

ENDLOOP.

Thank you,

Dinesh.B

Hi expert,

In alv report totals are displayed as "TOTAL", And i need to display grand total as "GRAND TOTAL" as a text, but it over write the text as "TOTAL" as "GRAND TOTAL".

I will write the code below.

FORM subtotal_text CHANGING p_total TYPE any

p_subtot_text TYPE slis_subtot_text.

DATA: text TYPE string.

data: v_len type i,

V_LINE TYPE I.

v_len = lines( it_output ).

IF p_subtot_text-criteria = 'LIFNR'.

LOOP AT it_output INTO wa_output.

ON CHANGE OF wa_output-lifnr.

CONCATENATE wa_output-name 'TOTAL' INTO text SEPARATED BY SPACE.

p_subtot_text-display_text_for_subtotal = text.

CLEAR text.

ENDON.

ENDLOOP.

ENDIF.

if sy-index = v_len.

p_subtot_text-display_text_for_subtotal = 'GRAND TOTAL'.

endif.

ENDLOOP.

Thank you,

Dinesh.B

2 REPLIES 2
Read only

Former Member
0 Likes
416

hi,

you can populate the text in the field catalog

Here's the sample code :

wa_layout-zebra = 'X'.

wa_layout-subtotals_text = 'Subtotals'

wa_layout-totals_text = 'Grandtotals'

wa_layout-numc_sum = 'X'.

and call the fm

thanks

Satish

Read only

Former Member
0 Likes
416

answered