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

Fm TABLE_COMPRESS

Former Member
0 Likes
1,305

Hi,

I tried to use function module TABLE_COMPRESS, while system giving a message that

"function module TABLE_COMPRESS is obsolate" I like to know what will be the new function module to this.

Sa_R

Hi,

I tried to use function module TABLE_COMPRESS, while system giving a message that

"function module TABLE_COMPRESS is obsolate" I like to know what will be the new function module to this.

Sa_R

4 REPLIES 4
Read only

Former Member
0 Likes
840

hi

good

go through this code

  • Receivers

receiver_list-recextnam = '[email protected]'. "-->

  • EMAIL ADDRESS

RECEIVER_list-RECESC = 'E'. "<-

RECEIVER_list-SNDART = 'INT'."<-

RECEIVER_list-SNDPRI = '1'."<-

APPEND receiver_list.

  • General data

w_object_hd_change-objla = sy-langu.

w_object_hd_change-objnam = 'Object name'.

w_object_hd_change-objsns = 'P'.

  • Mail subject

w_object_hd_change-objdes = 'Message subject'.

  • Mail body

APPEND 'Message content' TO message_content.

  • Attachment

CALL FUNCTION 'SAVE_LIST'

EXPORTING

list_index = '0'

TABLES

listobject = listobject.

CALL FUNCTION 'TABLE_COMPRESS'

IMPORTING

compressed_size = compressed_size

TABLES

in = listobject

out = compressed_attachment.

DESCRIBE TABLE compressed_attachment.

CLEAR packing_list.

packing_list-transf_bin = 'X'.

packing_list-head_start = 0.

packing_list-head_num = 0.

packing_list-body_start = 1.

packing_list-body_num = sy-tfill.

packing_list-objtp = 'ALI'.

packing_list-objnam = 'Object name'.

packing_list-objdes = 'Attachment description'.

packing_list-objlen = compressed_size.

APPEND packing_list.

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

object_hd_change = w_object_hd_change

object_type = 'RAW'

owner = sy-uname

TABLES

objcont = message_content

receivers = receiver_list

packing_list = packing_list

att_cont = compressed_attachment.

thanks

mrutyun^

Read only

Former Member
0 Likes
840

have a look at class

CL_ABAP_GZIP

*********************************

what you could do is using call transformation transform your itab to XML form and then use CL_ABAP_GZIP to zip it.

to read it back, unzip using CL_ABAP_GZIP and then again use call transformation and XSLT program to convert it to your itab format.

Since you are new to SDN have a look at the following weblog to find out SDN way of saying thanks.

/people/mark.finnern/blog/2004/08/10/spread-the-love

Regards

Vasu

Read only

0 Likes
840

Hi,

You solved my problem.



try.
call method cl_abap_gzip=>compress_text
  exporting
    text_in                     = xsccpvapitem
  importing
    gzip_out                   = it_attach2
    gzip_out_len             = 255.
    .
endtry.


I am just sending a text file > 255 length as attachment in mail using CL_BCS class

Sa_R

Read only

0 Likes
840

hi Sa_R ,

you said that your problem is solved,

according above link (mrutunjaya tripathy)

CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.

how to pass thse fields to our method.

regards

Edited by: sai on Sep 18, 2008 11:02 AM