2022 May 27 10:09 AM
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
2022 May 27 10:20 AM
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
2022 May 27 10:28 AM
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.