04-18-2008 5:55 AM
Hi,
I have done the subtotal and total operation in ALV report.
I wanted to display the text like
Subtotal: _______
Total : _______
I tried to give the text in th layout like..
GD_LAYOUT-TOTALS_TEXT = 'Total'.
GD_LAYOUT-subtotals_text = 'SubTotal'.
i passed this layout in REUSE_ALV_GRID_DISPLAY
but i am not getting the text in the output. what is wrong?
Can any one please tell me to place the text?
Regards,
Elanthendral.
04-18-2008 5:57 AM
04-18-2008 6:00 AM
04-18-2008 6:10 AM
Hi Murali,
Thanks for ur reply.
Already in SDN I hav seen the threads what u hav sent!
I wrote code with the help of that only.
But i am not getting the subtotal text in the output.
Is it enough to mention the subtotal text in the Layout alone?? or shld i add any more things to be done?? Guide me plz...
Regards,
Elanthendral.
04-18-2008 6:01 AM
Hi,
Check out the layout work area declaration and passing part. What u have mentioned should work. Try to debug and find it.
Find below the sample code.
DATA: wa_layout TYPE slis_layout_alv, "Layout structure
END-OF-SELECTION.
PERFORM build_layout.
FORM build_layout .
wa_layout-ZEBRA = 'X'.
wa_layout-NO_VLINE = 'X'.
wa_layout-NO_HLINE = 'X'.
wa_layout-CELL_MERGE = 'X'.
wa_layout-EDIT = 'X'.
wa_layout-WINDOW_TITLEBAR = ''.
wa_layout-NO_ULINE_HS = 'X'.
wa_layout-LIGHTS_FIELDNAME = ''.
wa_layout-LIGHTS_TABNAME = ''.
wa_layout-LIGHTS_ROLLNAME = ''.
wa_layout-LIGHTS_CONDENSE = 'X'.
wa_layout-NO_TOTALLINE = 'X'.
wa_layout-NO_SUBTOTALS = 'X'.
wa_layout-TOTALS_BEFORE_ITEMS = 'X'.
wa_layout-TOTALS_ONLY = 'X'.
wa_layout-TOTALS_TEXT = ''.
wa_layout-SUBTOTALS_TEXT = ''.
wa_layout-BOX_FIELDNAME = ''.
wa_layout-BOX_TABNAME = ''.
wa_layout-BOX_ROLLNAME = ''.
wa_layout-CONFIRMATION_PROMPT = 'X'.
wa_layout-HEADER_TEXT = ''.
ENDFORM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING
i_callback_program = gf_repid
is_layout = gwa_layout
it_fieldcat = gt_catalog
TABLES
t_outtab = gt_line
EXCEPTIONS
program_error = 1
OTHERS = 2.
Regards,
ramya
04-18-2008 6:06 AM
For getting text in output for subtotals and totals you have to use FM: SPELL_AMOUNT