06-12-2008 11:17 AM
Hi,
I have a report that I need to email to certain users. The line length in the report is greater than 255 characters.
When I call fm TABLE_COMPRESS passing table it_table, the new table (it_list) comes back filled with funny characters.
My code is below ...
TYPES: BEGIN OF t_table,
line(1000),
END OF t_table.
DATA: it_table TYPE STANDARD TABLE OF t_table INITIAL SIZE 0 WITH HEADER LINE,
it_list LIKE solisti1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
in = it_table
out = it_list
EXCEPTIONS
OTHERS = 1.
Thanks
Lindy
06-12-2008 11:26 AM
Hi Lindy,
I had a similar issue with report sizes a while ago, although I didn't try Table_compress.
I rather used FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the email with an excel attachement, which allowed a much greater size.
Regards,
Tyrone.
06-12-2008 11:26 AM
Hi,
DATA:
LT_TABLE TYPE TABLE OF ABAPLIST.
DATA:
IT_LIST LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
IN = LT_TABLE
OUT = IT_LIST
EXCEPTIONS
OTHERS = 1.
Regards
Adil
06-12-2008 11:35 AM
Hi Adil,
I did try using ABAPLIST, but got an error when trying to load the table (it_table must be a character-type data object).
Here is my code for loading the table ...
CONSTANTS:
con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
CONCATENATE 'CUST NO' 'CUST NAME' 'MATERIAL'
'SUPP INV NO' 'SUPP INV DATE' 'BL NO' 'BL DATE'
'DOC TYPE' 'PMM PO NO' 'PO QTY' 'SHIP QTY' 'ORDER UNIT'
'INCOTERM' 'PO UNIT PUR PRICE' 'EDI INV UNIT PUR PRICE'
'POvsEDI' 'DIFF x SHIPQTY' 'VEND CODE' 'VEND NAME'
INTO it_table SEPARATED BY con_tab.
CONCATENATE con_cret it_table INTO it_table.
APPEND it_table.
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
IN = IT_TABLE
OUT = IT_LIST
EXCEPTIONS
OTHERS = 1.
Thanks
Lindy