PGP File Encryption, Decreption using SM 69 in ABAP
Hi Friends,
Here, i would like share he can we do the file PGP Encryption and Decryption by using SM69 in SAP ABAP.
To access the PGP commands from the SM69 first PGP s/w has to install on UNIX server.
If the pgp s/w is not installed on the your server you can’t able to access the pgp commands.
File Encryption:
command: pgp -e <filename> -r <username>
when u are executing the command in the additional parameters you have to pass the <filenmae> -r username.
In your ABAP pgm you can call the FM SXPG_COMMAND_EXECUTE by passig the above external command ZUNIX_COMMAND_EN.
File Decryption
command: command: pgp –decrypt <filename.pgp> –symmetric-passphrase ‘test’ –overwrite remove –outputfile <outputfolder>
when u are executing the command in the additional parameters you have to pass the <filename.pgp> –symmetric-passphrase ‘test’ –overwrite remove –outputfile <outputfolder>.
In your ABAP pgm you can call the FM SXPG_COMMAND_EXECUTE by passig the above external command ZUNIX_COMMAND_EN.
Regards,
Santhoshi.
One thing I noticed on the parameters is that I need not specify the quotations like I had to running the direct command in linux, I used this with gpg to encrypt bank files.
Hi Santhoshi
I had the same requirement to do but, my client is not interested to install any third-party tool or with PI, is there any way to do this in ABAP end..
Please let me know.