10-10-2008 8:20 AM
Good day,
I have a issue with a custom created table.
There is a custom table which has a field of 600 characters. But when i am viewing the contents of the field, I am just able to see 250 characters. I have tried to download the same in to a excel sheet. Still not able to see the 600 characters value.
The field has values of around 580 characters
How do i view the full values.?
Please advice...
Kripa
10-10-2008 8:47 AM
I don't have a table with one or more fields that are that long to test this with but you could try using the following code. It uses the factory ALV class to display the data from any table, the table name is given as a parameter.
PARAMETERS:
p_table TYPE tablename.
DATA:
gt_tab TYPE REF TO data,
go_alv TYPE REF TO cl_salv_table.
FIELD-SYMBOLS:
<gt_tab> TYPE ANY TABLE.
CREATE DATA gt_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN gt_tab->* TO <gt_tab>.
SELECT * FROM (p_table) INTO TABLE <gt_tab>.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = <gt_tab>.
go_alv->display( ).
Edited by: Steve Higton on Oct 10, 2008 9:49 AM
10-10-2008 9:02 AM
If the ALV factory class doesn't display the data correctly then the following code will display the data and then download it to a tab delimited file that can be viewed in Excel.
PARAMETERS:
p_table TYPE tablename.
DATA:
gv_file TYPE string,
gv_path TYPE string,
gv_fullpath TYPE string,
gt_tab TYPE REF TO data,
go_alv TYPE REF TO cl_salv_table.
FIELD-SYMBOLS:
<gt_tab> TYPE ANY TABLE.
CREATE DATA gt_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN gt_tab->* TO <gt_tab>.
SELECT * FROM (p_table) INTO TABLE <gt_tab>.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = <gt_tab>.
go_alv->display( ).
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = gv_file
path = gv_path
fullpath = gv_fullpath.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = gv_fullpath
filetype = 'DAT'
CHANGING
data_tab = <gt_tab>.