Skip to Content
0
Former Member
Aug 18, 2005 at 06:42 AM

Send the report through mail in diff. format

32 Views

Hi all,

I have given below the conversion rule in SCOT.

ALI HTM 2 SX_OBJECT_CONVERT_ALI_HTM

ALI PDF 1 SX_OBJECT_CONVERT_ALI_PRT

ALI PS 4 SX_OBJECT_CONVERT_ALI_PRT

ALI RAW 8 SX_OBJECT_CONVERT_ALI_RAW

As per the above , all the attachements sending in PDF format , If I change the rank 1 for HTM the attachements sending in HTM.

But our requiremnts is some mails attachment have send as PDF and some mails have send in HTML format . How to do it .

I am also pasting below the part of my prog. for your understanding.

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.

Please Help.

regards

Manicveera