2009 May 13 12:20 PM
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
2009 May 13 12:29 PM
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
2009 Jul 24 6:43 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |