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

ALV

Former Member
0 Likes
599

What is the maximum number of characters that a field in ALv can accomodate?

Please give me exact answer.

I have an internal table .In that one field contains approx 200 characters.I want to display it in ALv.Is it possible?

5 REPLIES 5
Read only

Former Member
0 Likes
584

Reward Points..

Read only

Former Member
0 Likes
584

Hi,

It is possible. But the thing is set the layout's colwidth_optimize field to 'X'.

Regards,

Subramanian

Read only

Former Member
0 Likes
584

Hi,

Yus it is possible,Maximum number of character is 255.

Thanks

Ankur Sharma

Read only

0 Likes
584

I am usin the folloeing code.Her itab-text contains 200 characters.But it is displaying only 120 characters rest are not displayed.Can nyone tell me the modification in my code?Full pgm can also post here...

REPORT ZTEST_MM4 .

type-pools:slis.

types:Begin of x_itab,

text type char200,

name type char20,

end of x_itab.

data:it_itab type standard table of x_itab,

t_fieldcat TYPE slis_t_fieldcat_alv, "Field catalog

w_itab type x_itab,

g_matnr type matnr.

w_itab-name = 'Madan'.

w_itab-text = 'This is long text contains 200 characters. This is only a test whether we can print this in ALV or not.This is for requirement PGSR649 report.Example of legacy report to understand where PO Long text will have to be printed. The layo'.

append w_itab to it_itab.

select-options:s_matnhr for g_matnr.

write:' something'.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = sy-cprog

I_STRUCTURE_NAME = 'ZTEST_MM4'

CHANGING

ct_fieldcat = t_fieldcat[]

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_buffer_active = space

i_callback_program = sy-repid

i_structure_name = 'ZTEST_MM4'

it_fieldcat = t_fieldcat

TABLES

t_outtab = it_itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE i022 WITH 'REUSE_ALV_GRID_DISPLAY Failed'(026).

  • LEAVE LIST-PROCESSING.

ENDIF.

Read only

0 Likes
584

Hi ,

define ur fieldcat in ths way

WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.

WA_IT_FLDCAT-DATATYPE = 'CHAR'.

WA_IT_FLDCAT-SELTEXT = WA_FLNAME.

WA_IT_FLDCAT-INTLEN = 250.

WA_IT_FLDCAT-TABNAME = '<FS_2>'.

APPEND WA_IT_FLDCAT TO T_FLDCAT.

Thanks

Ankur Sharma