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: 

Header Text for Field Catalog ALV Grid doubt ..

former_member425121
Participant
0 Kudos

Hi everybody

I have an ALV Grid List Report (REUSE_ALV_LIST_DISPLAY)

but i have a trouble: the header texts for the fields are always truncated to 10 positions.

The code for fill the Field Catalog are:

CLEAR l_field_cat.

l_field_cat-COL_POS = 2.

l_field_cat-FIELDNAME = 'AVERAGE'.

l_field_cat-TABNAME = 'T_REPORT'.

l_field_cat-REF_TABNAME = 'RPSCO'.

l_field_cat-REF_FIELDNAME = 'WLP00'.

l_field_cat-SELTEXT_S = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'S'.

l_field_cat-KEY = ' '.

l_field_cat-KEY_SEL = ' '.

APPEND l_field_cat TO p_field_cat.

But, although the column appears with 20 characters lenght, the header text appears 'AverageAmo', and it is in the same way for all the fields, even with fields with 40 characters lenght.

What am i doing incorrect ?

Thanks in Advanced

Frank

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Frank,

modify this..

l_field_cat-SELTEXT_S = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'S'

to..

<b>L_field_cat-SELTEXT_l = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'L'</b>

regards

satesh

8 REPLIES 8

Former Member
0 Kudos

That is because of field I_field_cat-SELTEXT_S.

This will always display 10 char long text.

To avoid truncating you can specify length for the header.

Try this

x_fieldcat-seltext_l = TEXT-004.

x_fieldcat-outputlen = 20.

x_fieldcat-ddictxt = c_l.

Message was edited by: Ashish Gundawar

Message was edited by: Ashish Gundawar

0 Kudos

Instead of fieldcat-SELTEXT_S use fieldcat-SELTEXT_L.

It is because S - short text

0 Kudos

Thanks Ashish

What field can i use to assign the header text ?

I don't want to use OUTPUTLEN because this affects the output lenght for the column, and the columns have the right lenght (from Reference Fields) .

What can i do ?

Regards

Frank

0 Kudos

Hi Frank,

just do the following..

l_field_cat-SELTEXT_L = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'L'

fieldcat-OUTPUTLEN = 20

regards

satesh

0 Kudos

Thanks everybody for your answers

I tried the Satesh answer and it works right ;

(I suposed you wrote SELTEXT_I instead SELTEXT_L by error, but i got the idea)

Regards

Frank

Former Member
0 Kudos

Hi Frank,

modify this..

l_field_cat-SELTEXT_S = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'S'

to..

<b>L_field_cat-SELTEXT_l = TEXT-004. <- 'AverageAmount' 20 lenght

l_field_cat-DDICTXT = 'L'</b>

regards

satesh

0 Kudos

Instead of going for Short text, display medium or large text.

Former Member
0 Kudos

TEMP_CAT-SELTEXT_L = 'Company Code'.

TEMP_CAT-DDICTXT = 'L'.

  • TEMP_CAT-OUTPUTLEN = 15.

You may dont need to use output length in that case.

Just use L (Long text) and that would suffice..

Message was edited by: Wenceslaus G