cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to attach the document in SAPTM while autopopulation for PPF Action/ PPF Output/ PDF Forms

abilash_cj
Discoverer
0 Likes
970

How to attach the document in SAPTM while autopopulation for PPF Action/ PPF Output/ PDF Forms.

I have used the IO_SEND attribute and set_document. Still the mail is not attached in the output.

Accepted Solutions (0)

Answers (2)

Answers (2)

abprad
Active Participant
0 Likes

Use the BCS Document Class factory to get a reference document ,

data(lo_document) = cl_document_bcs=>create_document method ,

Then use the add attachment method of the returned reference

lo_document-> add_attachment

then , set this document to the io_Send reference available in the method

io_Send->set_document (lo_document).

This should work !

former_member809312
Contributor
0 Likes

Hi abilash.cj,

Check the blog:

SAP TM – Auto populate Email Receiver for PPF Action / PPF Output/ PDF Forms | SAP Blogs

Attach a document directly by using the method: CREATE_DOCUMENT of class: CL_DOCUMENT_BCS.

CALL METHOD cl_document_bcs=>create_document EXPORTING i_type = lv_type i_subject = lv_subject i_length = lv_bin_filesize i_hex = lt_binary_content RECEIVING result = lo_doc_bcs

Regards

Rogerio