Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make smartform password protected?

0 Kudos

Hello Friends,

We have requirement, in one of our client that, we are sending customer statement to client every month through email attachment.

Now they want this pdf attachment as a password protected.

We are sending smartform in email as a attachment.

So basically we want to send smartform as a pdf protected through email.

I have searched a lot for the solution but not able to find the proper one.

Please help me to solve this.

Thanks.

1 REPLY 1

DoanManhQuynh
Active Contributor
0 Kudos

I suppose you export the data to PDF file through smartforms then send PDF to customer. As far as I know SAP doesnt support to encrypt PDF file with password and you need 3-party (usually cost some money) to archive that. But I think there is workaround that you compress PDF file and set password to compress file and there are alot of compress tool can do that (zip, 7z...). The ideal is like below:

1. Export PDF to compress folder.

2. Use fm: SXPG_COMMAND_EXECUTE to call compress tool's command and compress abow folder from abap.

This example explain how to use SXPG_COMMAND_EXECUTE:

https://wiki.scn.sap.com/wiki/display/ABAP/Creation+of+External+Commands+with+the+help+of+UNIX+Codin...

About command of compress tool, you can read this thread:

https://stackoverflow.com/questions/18180060/how-to-zip-a-file-using-cmd-line