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: 

Set Encrypt password to a .CSV zip file to be send as an email attachment

vinanti_kanago
Explorer
0 Kudos
705

Using class how to encrypt a .CSV zip file with passwords to be send as an email attachment.

I found using SM69 config. & FM SXPG_COMMAND_EXECUTE, but it is not working.

Please help me with any class or method to encrypt zip file.

Thank you.

4 REPLIES 4

FredericGirod
Active Contributor

vinanti_kanago
Explorer
0 Kudos
557

matt
Active Contributor
557

"Not working" is not a very informative error condition.

Sandra_Rossi
Active Contributor
0 Kudos
557

In the blog post you have tried, there are 2 things, and so your issue can be at one of the two levels, or both:

  1. Using the command at Operating System level, which is zip -P "password" "zip_file.zip" "file_to_be_zipped" (unix - how to create a file in shell script with specific password - Stack Overflow)
  2. Using SM69, SXPG_COMMAND_EXECUTE, to execute the OS command from an ABAP program

You should first test the command at OS level (what OS is running SAP software?) to make sure that zip -P "password" "zip_file.zip" "file_to_be_zipped" and unzip work as you expect. Ask your admin if you can't do it yourself.

SM69 customizing depends on your OS type and you have SAP notes to help you for troubleshooting. And there's the way to pass the argument via SXPG_COMMAND_EXECUTE.

So, please explain what you tried, what happened, where the exact issue is.