read PDF (or WORD) file from application server and send as email attachmen
We've done the following:
1. read spool data and convert it to PDF, and send as email attachment
2. read a tab delimited file on application server, as send as email body.
Now we have a requirement to read and send as email attachment a existing PDF(WORD) file under a specified directory of application server.
Please kindly advice how should we do this.
Since the file (PDF or WORD) is on the application server, you need to use the OPEN DATASET and READ DATASET to process the contents into an internal table.
Hit Button F1 on DATASET to get more details.
Once the data is read on the internal table, you can use the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to maeil the contents as an atachment.
Hope this helps.