‎2009 Oct 06 11:49 AM
I want to insert blank row in internal table (all the fields are numeric).
I m using ALV grid.
I want to display data like :
Name Amount1 Amount 2 Amount 3
A 1.00 7.00 3.00
B 4.00 1.00 8.00
C 5.00 9.00 8.00
<-----here i want to insert blank row
Total 10.00 17.00 19.00
and i m using :
APPEND INITIAL LINE TO ITAB_FINAL.
Output is :
Name Amount1 Amount 2 Amount 3
A 1.00 7.00 3.00
B 4.00 1.00 8.00
C 5.00 9.00 8.00
0.0 0.0 0.0 <----- Cause all the fields are currency type
Total 10.00 17.00 19.00
What should I do , please help me out.
Edited by: Pooja Rawat on Oct 6, 2009 4:20 PM
‎2009 Oct 06 11:57 AM
You did correctly with appending initial line, just set in fieldcatalog NO_ZERO = 'X'. it will suppress zeros output, hence will print empty line.
Regards
Marcin
‎2009 Oct 06 11:51 AM
‎2009 Oct 06 11:52 AM
‎2009 Oct 06 11:54 AM
If the field types are currency it wont be possible. One way is to declare another internal table with fields of type string and append the lines of the previous internal table to the new one and the try using APPEND INITIAL LINE TO ITAB_FINAL
‎2009 Oct 06 11:57 AM
You did correctly with appending initial line, just set in fieldcatalog NO_ZERO = 'X'. it will suppress zeros output, hence will print empty line.
Regards
Marcin
‎2009 Oct 06 12:04 PM
‎2009 Oct 06 12:09 PM
NO_ZERO is in fieldcatalog,
gs_fcat-no_zero = 'X'.
ths gs_fcat is of type slis_fieldcat_alv
‎2009 Oct 06 12:19 PM
‎2009 Oct 06 11:58 AM
You may try creating another internal table with all fields of character type and use the same for appending blank line. Hence pass this internal table to ALV.
Thanks,
Preyansh
‎2009 Oct 06 12:04 PM
Forget about the initial line and the total line. Use the ALV functionality to calculate any totals.
‎2009 Oct 06 12:29 PM
I m using 'REUSE_ALV_GRID_DISPLAY'
How can I use ALV functionality to calculate the total.
‎2009 Oct 06 12:42 PM
>
> I m using 'REUSE_ALV_GRID_DISPLAY'
>
> How can I use ALV functionality to calculate the total.
Sorry, but what you really need: add blank line or calculate total? I guess the initial question was different.
As for the component NO_ZERO, it it in SLIS type pool, more precisely type slis_fieldcat_main0 which is part of slis_fieldcat_alv . This one you used for typing fieldcatalog?
Regards
Marcin