03-17-2007 1:56 PM
Hello Friends
I have created an ALV report with 3 columns and the data is getting from a ztable. Now I want to create 4th column and want the string 'abcd' to be displayed in all the cells of this particular column. I don't have this field in the ztable. I just want to display this on ALV report as shown below.
NAME AGE SALARY COLUMN-4
Mike 40 40/hour abcd
Ben 30 39/hour abcd
Cathy 12 50/hour abcd
Can I do this? Any feedback will be greatly appreciated.
Thanks
Ram
03-17-2007 6:33 PM
Hi,
In your internal table add 4th field VTEXT of type c length 10.
In field catalog
wa_fcat-fieldname = 'VTEXT'.
wa_fcat-outputlen = '10'.
wa_fcat-seltext_l = 'column heading'.
append wa_fcat to i_fIELDcat.
clear wa_fcat.
call method grid1->set_table_for_first_display
exporting
is_layout = gs_layout
it_toolbar_excluding = gs_exclude
changing
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
it_sort = ls_sort
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
aRs,
03-18-2007 3:32 PM