Regular Distribution of Forms via Email (e.g.Payslip)`

Many forms like Payslips, Travel reports, Invoices, Purchase Orders, etc have to be distributed on a regular basis to a selected audience. The easiest way is to send these forms by mail. A PDF attachment is readable by many different devices and operatig systems. To protect the PDF it has to be encrypted.
The sample report Encryption of Smartforms and Sending it via email shows the general procedure:
  • Retrieve the data for the Smartform
  • Call the Smartform function module and retrieve the OTF
  • Convert the OTF to PDF
  • Generate a password or use a stored password
  • Encrypt the PDF (RC4 or AES)
  • Determine the email addresses of the recipients (Basis - ADR6 or HR - Infotype 105/0010 )
  • Attach the encrypted email and send the mail

The following screenshots show it from the user perspective:

Start the report

Start of Report

After execution of report, we get some kind of log:

Result of Report

We find the result in transaction SOST:

Mail Overview

The mail contains the password and the PDF attachment:



Opening the PDF file requires to enter the correct password:



If the correct password is entered the PDF opens:

Open Mail


Some final remarks

The password can be generated or stored in SAP (e.g. custom subtype of infotype 105). If the password is generated, you should consider to send the password over a different channel to ensure the security of the PDF file. On the other hand a stored password has to be stored encrypted. You may use the public and private key of the SAP system (STRUST).

The recipients can be selected by variants, authorizations (AUTHORITY-CHECK OBJECT object for user), Organizational Management or other options, which have to be investigated directly on the customer system.



Back