Application Development and Automation 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: 
Read only

Changing ALV Grid column name dynamically

Former Member
0 Likes
1,254

Hi,

I want to change the ALV grid column name dynamically to do so i have have tried changing the field catalog

declared a string1 and setting this string value based on my logic but this is not reflected and always the field lable of the data element is taken.

CASE <fs_fcat>-fieldname.

WHEN 'FIELD1'.

<fs_fcat>-reptext = string1.

<fs_fcat>-outputlen = 14.

i have called my set_table_for_first_display like this :

  • DISPLAY THE DATA ON THE GRID

CALL METHOD compare_grid->set_table_for_first_display

EXPORTING

i_structure_name = 'PSHLP_COMPARE_DRAFT_ST'

is_layout = compare_layout

it_toolbar_excluding = g_it_exclude

is_variant = ls_variant

i_save = 'A'

CHANGING

it_fieldcatalog = compare_fieldcat

it_outtab = l_compare[].

Table always take the field lable from the structue and ignores the fieldcatalog value, can you suggest what is wrong here.

Thanks for help in advance, full points for helpful answer.

Regards,

Harsh

3 REPLIES 3
Read only

Former Member
0 Likes
705

Hi Harsh,

Try seltext_l, or seltext_m instead of reptext.

I guess this should help you.

Thanks,

Arun

Read only

Former Member
0 Likes
705

Hi,

Pass the string to field seltext_m.

Regards

Aravind

Read only

Former Member
0 Likes
705

hi,

we have the attribute seltext_l,m use one of them.

regards,

sindhu