Application Development 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: 

ALV REPORT : Can i fill my own string in one of the columns

Former Member
0 Kudos

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

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

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,

Former Member
0 Kudos

thanks for the help