Application Development 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: 

Fetch XLS or PDF File from Open Text and send the attachment through mail?

0 Kudos
321

Hello Experts,

I have a requirement where I need to attach the PDF or XLS file saved in Open text in a mail.

I am able to create the Mail body and everything and mail is getting triggered and sent to right user.

But I am not able to attach the File from open text.

Kindly help

2 REPLIES 2

abo
Active Contributor
0 Kudos
241

Could you show some code, to see what you tried?

Anyway, attaching files to email has been widely covered in the forum, you should be able to find some examples

0 Kudos
241

Hello, Thank you for the reply.

The requirement is as such that user has the file on their desktop and it needs to be uploaded in open text. I have used FM ARCHIVOBJECT_CREATE_FILE to load file in open text which generates a unique ID. Now this ID is saved in table TOA01 as well.

After this I am stuck.

CALL FUNCTION 'ARCHIVOBJECT_CREATE_FILE'
EXPORTING
archiv_id = 'A1'
document_type = 'PDF'
PATH = lv_file_path
VSCAN_PROFILE = '/SCMS/KPRO_CREATE'
IMPORTING
ARCHIV_DOC_ID = lv_doc_id
EXCEPTIONS
ERROR_ARCHIV = 1
ERROR_COMMUNICATIONTABLE = 2
ERROR_UPLOAD = 3
ERROR_KERNEL = 4
BLOCKED_BY_POLICY = 5
OTHERS = 6.