cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, everyone, how to name the pdf file name when I email my smartform?

Former Member
0 Kudos

how to name the pdf file name when I email my smartform? and how to give the email some content such as "Dear customer, this is the process order, you can print it by yourself, best regards!". thank you in advance!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi dawson,

REFRESH :

i_reclist,

i_objtxt,

i_objbin,

i_objpack.

CLEAR w_objhead.

i_objbin[] = i_record[].

DESCRIBE TABLE i_objbin LINES v_lines_bin.

i_objtxt = 'Find attached the output of the smartform.'.

APPEND i_objtxt.

i_objtxt = 'Regards,'.

APPEND i_objtxt.

i_objtxt = 'Sravanthi'.

APPEND i_objtxt.

DESCRIBE TABLE i_objtxt LINES v_lines_txt.

w_doc_chng-obj_name = 'Smartform'.

w_doc_chng-expiry_dat = sy-datum + 10 .

w_doc_chng-obj_descr = 'Smart form output'.

w_doc_chng-sensitivty = 'F'.

w_doc_chng-doc_size = v_lines_txt * 255.

CLEAR i_objpack-transf_bin.

i_objpack-head_start = 1.

i_objpack-head_num = 0.

i_objpack-body_start = 1.

i_objpack-body_num = v_lines_txt.

i_objpack-doc_type = 'RAW'.

APPEND i_objpack.

i_objpack-transf_bin = 'X'.

i_objpack-head_start = 1.

i_objpack-head_num = 1.

i_objpack-body_start = 1.

i_objpack-body_num = v_lines_bin.

i_objpack-doc_type = 'PDF'.

i_objpack-obj_name = 'Smartform'.

CONCATENATE 'smartform output' 'pdf'

INTO i_objpack-obj_descr.

i_objpack-doc_size = v_lines_bin * 255.

APPEND i_objpack.

CLEAR i_reclist.

i_reclist-receiver = ''." -


> email id

i_reclist-express = 'X'.

i_reclist-rec_type = 'U'.

APPEND i_reclist.

Regards,

Sravanthi

former_member196280
Active Contributor
0 Kudos

This varies from each tcode, if your email program is 100% customized then you should maintain the header,body and footer text in your custom driver program. You can get very good sample code in this forum.

For example, if you want to add this header, bodt and footer text for standard program, example.. PO form. goto NACE transaction code and select the corresponding application type and maintain your required description, file name etc.

Regards,

Sairam

Former Member
0 Kudos

ld_mtitle = l_text.

ld_format = 'PDF'.

ld_attdescription = i_mhnk1-kunnr. Here you can give the pdf file name

ld_attfilename = gd_attachment_name.

ld_sender_address = p_sender.

ld_sender_address_type = gd_sender_type.

wa_mess_bod = 'Please ignore this payment reminder if payment has already been made.'.

APPEND wa_mess_bod TO it_mess_bod.

wa_mess_bod = 'Yours faithfully,'.

APPEND wa_mess_bod TO it_mess_bod.

wa_mess_bod = 'Credit Management Team'.

APPEND wa_mess_bod TO it_mess_bod.

regards,

Madhu

Edited by: Madhu on Dec 29, 2008 10:36 AM