cancel
Showing results for 
Search instead for 
Did you mean: 

PGP file encryption from SAP

SAPSupport
Employee
Employee
0 Kudos

We are generating DMEE payment file from SAP system.

Bank need encrypted file to be send via SAP server.

Can you please suggest how to encrypt a DMEE payment file from SAP.

Note :-

File should be send in PGP encryption format.


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.
View Entire Topic
tobias_setzekorn
Explorer

We had a similar requirement some time ago. I think the more standardized way would be to get the encryption done by a middleware (e.g. a PI system). If you like to do it directly on the SAP server, SAP is not offering a solution out of the box.

We did it like this:

  1. We used gpg on the underlying Linux operating system to create and maintain the relevant PGP keys
  2. We created an "external operating system command" in transaction SM49, which is calling gpg with the respective parameters for encryption a file (e.g. "gpg --trust-model always –recipient recipient@address -v –encrypt")
  3. We created another "external operating system command" in transaction SM49 to call the "mv" command in order to be able to move files from one folder to another
  4. We created an enhancement at the end of function module "FI_PAYM_MEDIUM_CLOSE" which is calling the above mentioned system call, passing over the file name as parameter and moving the file to the right outbound folder

With this setup, the file is created as usual on the given output folder, afterwards our custom code is triggering the encryption of the file and moving the file to our expected outbound folder where it is getting picked up by our PI solution and sent to the bank.

We also implemented a custom table to maintain some parameters to be more flexible when calling the system command, but this is optional.

I hope you got an idea how this could be solved.