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: 

output lenght in ALV with FM REUSE_ALV_GRID_DISPLAY

former_member1038687
Active Participant
0 Kudos

Hi people! I need some help!

I trying to set output lenght of a field to better view. I used in fieldcatalog OUTPUTLEN and set it to 50, but doesn't work...

Anyone can give me a tip?

Thanks!

i = i + 5.

CLEAR ltype_fieldcat.

ltype_fieldcat-col_pos = i.

ltype_fieldcat-fieldname = 'SOMA_6190'.

ltype_fieldcat-tabname = 'T_FINAL'.

  • ltype_fieldcat-ref_fieldname = 'DMBTR'.

  • ltype_fieldcat-ref_tabname = 'BSAD'.

  • ltype_fieldcat-seltext_s = 'Value Total Cod 6190'(025).

  • ltype_fieldcat-seltext_m = 'Value Total Cod 6190'(025).

  • ltype_fieldcat-seltext_l = 'Value Total Cod 6190'(025).

ltype_fieldcat-reptext_ddic = 'Value Total Cod 6190'(025).

ltype_fieldcat-outputlen = 50.

APPEND ltype_fieldcat TO t_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = l_repid

  • i_callback_pf_status_set = 'STATUS_GUI'

  • i_grid_title = 'Relatório de retenções de órgãos públicos'(021)

  • is_layout = l_layout

it_fieldcat = t_fieldcat[]

i_default = 'X'

i_save = 'X'

  • is_variant = l_variante

  • is_print = l_print

TABLES

t_outtab = t_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

also supply the intlen ,and ddic_outputlen.

ltype_fieldcat-reptext_ddic = 'Value Total Cod 6190'(025).
ltype_fieldcat-outputlen = 50.
ltype_fieldcat-intlen = 50.
ltype_fieldcat-DDIC_OUTPUTLEN = 50.
APPEND ltype_fieldcat TO t_fieldcat.

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

also supply the intlen ,and ddic_outputlen.

ltype_fieldcat-reptext_ddic = 'Value Total Cod 6190'(025).
ltype_fieldcat-outputlen = 50.
ltype_fieldcat-intlen = 50.
ltype_fieldcat-DDIC_OUTPUTLEN = 50.
APPEND ltype_fieldcat TO t_fieldcat.

Former Member
0 Kudos

If you have marked colwidth_optimize with an 'X' in the IS_LAYOUT structure the output lenght in fieldcat will not work.

See on your code if it is happening this.

Andrew83.

former_member1038687
Active Participant
0 Kudos

Thanks! Work adding intlen e dddic_len.

Thanks too for tip of optimized in layout structure!