on 09-05-2008 12:02 AM
Hi All,
I am using an output type with transmission medium as External Send inorder to send an email with a pdf attachment.
I want to change the name of the attchment document as per my requirement.
How do i go about this.
P.S. I am using (in NACE) Application - EF
I have created a new output type with the same program as for NEU.
Program Name: SAPFM06P ( i have created a Z program)
Regards,
Riya.
hiii
you can do it like following code
IF h_transf_type = 'X'. " Binary=PDF/ALI?
t_pak_list-transf_bin = 'X'.
t_pak_list-head_start = 1.
t_pak_list-head_num = 0.
t_pak_list-body_start = 1.
t_pak_list-body_num = h_tab_cntr.
t_pak_list-doc_type = h_real_type.
t_pak_list-obj_name = 'ATTACHMENT'. ---------------->>>>>here you can give name
t_pak_list-obj_descr = 'Document'(001). ---------------->>>>>here you can give description
t_pak_list-doc_size = ( h_tab_cntr - 1 )
* 255 + STRLEN( t_con_bin ).
ELSE.
DESCRIBE TABLE t_con_text LINES h_tab_cntr.
READ TABLE t_con_text INDEX h_tab_cntr.
t_pak_list-transf_bin = ' '. " Binary=RAW
t_pak_list-head_start = 1.
t_pak_list-head_num = 0.
t_pak_list-body_start = h_body_start.
t_pak_list-body_num = h_tab_cntr.
t_pak_list-doc_type = h_real_type.
t_pak_list-obj_name = 'ATTACHMENT'(002). ---------------->>>>>here you can give name
t_pak_list-obj_descr = 'Report'(003). ---------------->>>>>here you can give description
t_pak_list-doc_size = ( h_body_num - 1 )
* 255 + STRLEN( t_con_text ).
ENDIF.
APPEND t_pak_list.
ENDIF.
* Send the EMAIL out with SAP function...
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = h_doc_data
put_in_outbox = 'X'
* commit_work = 'X'
TABLES
packing_list = t_pak_list
contents_bin = t_con_bin
contents_txt = t_con_text
receivers = t_receivers
EXCEPTIONS
regards
twinkal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which function module is getting called while sending mail?
In object description, You can specify name of teh attachement; try it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.