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

Not able see Longchar data type data in table level

Former Member
0 Likes
1,734

Hi

How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is 1024characters.

I try to download into excel but some special characters coming instead of numbers.

Hi

How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is 1024characters.

I try to download into excel but some special characters coming instead of numbers.

2 REPLIES 2
Read only

Former Member
0 Likes
1,026

Hi,

the output size of the SE16 ALV is limit to standard size of ALV which is 128 char it will truncate further data.

Write a program to download it.

Regards

Read only

former_member209120
Active Contributor
0 Likes
1,026

Hi Chiranjeevi,

According to SAP Note 857823, ALV grid cannot display more than 128 characters per field and will truncate all the characters beyond.

So download alv using code like this

TYPE-POOLS : slis.

TYPES : BEGIN OF ty_final,
         sno TYPE i,
         longtext TYPE string,
         END OF ty_final.

DATA : it_final TYPE TABLE OF ty_final,
        wa_final TYPE ty_final.

DATA it_fieldcat TYPE slis_t_fieldcat_alv,
         wa_fieldcat TYPE slis_fieldcat_alv.

START-OF-SELECTION .
   PERFORM get_data .
   PERFORM disp_data .
   PERFORM gui_download.

*&---------------------------------------------------------------------*
*&      Form  GET_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM get_data .

   wa_final-sno      = '1'.
   wa_final-longtext = 'How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is 1024characters How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is'.
   APPEND wa_final TO it_final.
   CLEAR wa_final.

   wa_final-sno      = '2'.
   wa_final-longtext = 'How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is 1024characters How to see Extrctdata  field value in table j_2iextrct,it is  not showing full length actual size is'.
   APPEND wa_final TO it_final.
   CLEAR wa_final.

   wa_fieldcat-col_pos = 1.
   wa_fieldcat-fieldname   'SNO'.
   wa_fieldcat-seltext_m   'S.N0.'.
   APPEND wa_fieldcat TO it_fieldcat.
   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = 2.
   wa_fieldcat-fieldname   'LONGTEXT'.
   wa_fieldcat-seltext_m   'Long Text for Testing'.
   APPEND wa_fieldcat TO it_fieldcat.
   CLEAR wa_fieldcat.



ENDFORM.                    " GET_DATA
*&---------------------------------------------------------------------*
*&      Form  DISP_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM disp_data .
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       i_callback_program = sy-repid
       it_fieldcat        = it_fieldcat
     TABLES
       t_outtab           = it_final.

ENDFORM.                    " DISP_DATA
*&---------------------------------------------------------------------*
*&      Form  gui_download
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form gui_download .
CALL METHOD cl_gui_frontend_services=>gui_download
   EXPORTING
     filename              = 'D:/longtext.xls'
     write_field_separator = 'X'
     append                = ' '
   CHANGING
     data_tab              = it_final.
endform.                    " gui_download

ALV output


Download file


Option 2:

If you need to display total text in ALV then try with ALV list display as shown in this link.

http://wiki.sdn.sap.com/wiki/display/abap/displaying%2ba%2bparticular%2bcolumns%2bin%2bmultiple%2bli...

Output


Regards,

Ramesh.T