‎2009 Aug 24 9:55 AM
Dear Experts,
in the below codings when the text values increases beyond certain value texts are truncated i need full text to be displayed....
TYPES: BEGIN OF ty_outtab,
value1 TYPE string,
value2 TYPE i,
END OF ty_outtab.
DATA: it_outtab TYPE TABLE OF ty_outtab,
wa_outtab TYPE ty_outtab.
DATA: it_fcat TYPE lvc_t_fcat,
wa_fcat TYPE lvc_s_fcat.
DATA: wa_layo TYPE lvc_s_layo.
wa_outtab-value1 = 'Lorem ipsum dolor'.
wa_outtab-value2 = 1.
APPEND wa_outtab TO it_outtab.
wa_outtab-value1 =
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidun sap asdfas asdfa asdf asfd adf asdf asdf fas afj ash kajfh kajh akjlh akjh akjl hakjh fakj h.'.
wa_outtab-value2 = 2.
APPEND wa_outtab TO it_outtab.
wa_fcat-fieldname = 'VALUE1'.
wa_fcat-tabname = 'IT_OUTTAB'.
wa_fcat-scrtext_s = 'Value 1'.
wa_fcat-outputlen = '1000'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
wa_fcat-fieldname = 'VALUE2'.
wa_fcat-tabname = 'IT_OUTTAB'.
wa_fcat-scrtext_s = 'Value 2'.
wa_fcat-outputlen = '1000'.
APPEND wa_fcat TO it_fcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_grid_title = 'TEST'
is_layout_lvc = wa_layo
it_fieldcat_lvc = it_fcat
TABLES
t_outtab = it_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
WRITE 'Something went wrong!'.
ENDIF.
thanks and regards.
Thirukumaran. R
‎2009 Aug 24 10:02 AM
As per SAP NOTE 422660, ALV grid: Field lengths are limited to 128 characters
Summary
Symptom
The ALV cuts off field contents after 128 characters. However, you can enter more than 128 characters in these field in the input-enabled grid.
Additional key words
ABAP List Viewer, SAP List Viewer,
ALV grid control, CL_GUI_ALV_GRID,
Field length restriction, field length
Cause and prerequisites
The restriction to 128 characters is due to technical reasons and cannot be avoided. If the input-enabled grid is used, more characters can be entered.
Solution
Maintain the source code corrections outlined in the correction instructions.
‎2009 Aug 24 10:02 AM
As per SAP NOTE 422660, ALV grid: Field lengths are limited to 128 characters
Summary
Symptom
The ALV cuts off field contents after 128 characters. However, you can enter more than 128 characters in these field in the input-enabled grid.
Additional key words
ABAP List Viewer, SAP List Viewer,
ALV grid control, CL_GUI_ALV_GRID,
Field length restriction, field length
Cause and prerequisites
The restriction to 128 characters is due to technical reasons and cannot be avoided. If the input-enabled grid is used, more characters can be entered.
Solution
Maintain the source code corrections outlined in the correction instructions.
‎2009 Aug 24 10:05 AM
can u make changes in my code.,
Thanks and Regards,
Thirukumaran. R
‎2009 Aug 24 10:08 AM
Hi,
The truncation occurs when length exceeds 142 .
In your case , the string length is more than this, so it was truncated.
‎2009 Aug 24 10:10 AM
i need whole text what ever is there in ouput.
Thanks and Regards,
Thirukumaran. R
‎2009 Aug 24 10:54 AM
As it has been said, you have a restriction on length. So cut the string into multiple columns and assign accordingly in field catalog.
Or have multiple rows for bigger texts in ALV by putting blanks for other fields in those extended rows.
Regards,
Sumit