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.
Showing results for 
Search instead for 
Did you mean: 

Data element as ALV column header text

Former Member


I need to display the header of columns in ALV as in the labels of a data element .

say I have a data element : zzname

the labels are : name, Name_short,Name_long .

How can I have the column header as 'Name_long' ?

its possible for a table and its field as below :

t_fieldcat-ref_fieldname = 'VBELN'.

t_fieldcat-ref_tabname = 'VBAP'.

But I need to have the label of the data element as the header text.

The data element is not yet used in any table .

How can I do this ?

Thanks in advance !


Former Member
0 Kudos


t_fieldcat-ref_fieldname = 'VBELN'.

t_fieldcat-ref_tabname = 'VBAP'.

in that single quotation what ever you give that will displayed on the header

so give that tables names there in that single quation

Former Member
0 Kudos


you need to populate to the field catalog as below

lwa_fieldcatalog-fieldname = '<fieldname>'.

lwa_fieldcatalog-seltext_l = '<field label>'

reward if it helps,


Message was edited by:

Satish Panakala

Former Member
0 Kudos

Use table DD04V.


See this FM:


Pass just dataelement it gives you all the texts of dataelements.

after that use those texts in alv....

Active Participant
0 Kudos


In ALV, while preparing fieldcatalog you have an option of giving heading text, somethin like this...

x_fieldcat-col_pos = 1.

x_fieldcat-outputlen = '18'.

x_fieldcat-fieldname = 'MATNR'.

x_fieldcat-tabname = 'I_MATERIAL'.

x_fieldcat-seltext_m = 'Material'. "This is the header text, whatever you give here displays as a heading. Give the data element name here

APPEND x_fieldcat TO i_fieldcat.

CLEAR x_fieldcat.

0 Kudos


I got what you mention but that is not going to help as :

say I do smthing like :

x_fieldcat-seltext_m = 'Material'.

Here the text 'Material' will be displayed as header text .

but say I log in in DE, the same 'Material ' will come

which i don;t want .I want the translation in DE .

I have translated the label of the text-element in DE .

so where can I pass the data element as the header text ?

Hope, i m clear this time

0 Kudos

Then try to give the content into a temp location (work area) then assign it to the seltext_m.

something like this...

x_fieldcat-seltext_m = <work area>.

if u r in DE then try to give some condition, if its DE then convert to that else leave it...


You can populate the ROLLNAME field from the fieldcatalog to specify which data element you want your column to use, then set the DDICTXT to 'L' to specify that you want to use the long version of the data element's texts.