cancel
Showing results for 
Search instead for 
Did you mean: 

ALV . One column always diplaying with output length 10

Former Member
0 Kudos

Hi ,

One column in ALV output is always displaying with output length of 10 . But i had set it as 50 in the field catalog . Other columns are coming right by the way .

  wa_fieldcat-fieldname   = 'GGRUP'.
  wa_fieldcat-seltext_m   = 'Group'.
  wa_fieldcat-col_pos     = 3.
  wa_fieldcat-outputlen   = 50.
  append wa_fieldcat to int_fcat.
  clear  wa_fieldcat.

What could be the reason . Any guess ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Linda,

Please provide the code and your screen shot to help your further.


With regards,

Jayraj Joshi

Former Member
0 Kudos

Hi Jayraj,

Following is the code.

   data:
        int_fcat type slis_t_fieldcat_alv,
        wa_fieldcat type slis_fieldcat_alv,

   wa_fieldcat-fieldname   = 'GGRUP'.
  wa_fieldcat-seltext_m   = 'Group'.
  wa_fieldcat-col_pos     = 3.
  wa_fieldcat-outputlen   = 50.
  append wa_fieldcat to int_fcat.
  clear  wa_fieldcat.

and here is the output

so the third field named Group is being assigned output length 50 as shown above , but its outputting with length 10 only . but all other fields are being displayed with whatever the length specified . Need to do it through coding .

Thanks

0 Kudos

Hi Linda,

Just change the field length in your data definition. i.e. in your internal table where you have declared the GGRUP.

The data dictionary length of the field GGRUP is 10 characters only hence alv is displaying that.

With regards,

Jayraj Joshi

Former Member
0 Kudos

Ahh okk .

Thanks a lot i try .

Thanks

Former Member
0 Kudos

Hi jayraj,

Thanks . it worked . First it was of type string and i made it to char50 and it worked .

Point Rewarded . Thanks 

Answers (3)

Answers (3)

Former Member
0 Kudos

I'm leaving this here in case anyone else has this related problem:

I found this thread while debugging the same problem, I had a string field that was truncated in the ALV output.  In my case the fix was to clear the contents of the ALV field EDIT_MASK that was set for the previous field within a loop.  That EDIT_MASK was 6 characters long, limiting the length of my new field.

0 Kudos

If in the layout structure of your ALV grid, you have set CWIDTH_OPT attribute please remove it. In alternate way it can also be set through display tab of change layout option.

With regards,

Jayraj Joshi

Former Member
0 Kudos

Hi jayraj,

In the display there is definitely a way in the change layout . I can give the output length here . But i need to do it with programming . what do i need to set while creating field catalog .

with catalog of type SLIS_T_FIELDCAT_ALV , there is no optimize length field . Any other help please .

Thanks

0 Kudos

Hi linda,

If optimized column length is set than this could be possible.

Regards,

Jayraj Joshi

Former Member
0 Kudos

Hi Jayraj,

whats the name of this attribute . i did nt find any with optimized length in SLIS CAT .

Thanks