

" External command u have createdĬONSTANTS: c_extcom TYPE sxpgcolist-name VALUE 'ZDJ_ENCRYPTPDF', L_data_tab LIKE rcgrepfile OCCURS 10 WITH HEADER LINE,Ĭommand_list-name = 'ZDJ_ENCRYPTPDF'. DATA: BEGIN OF command_list OCCURS 0.Ĭommandname LIKE sxpgcolist-name VALUE 'ZDJ_ENCRYPTPDF',ĭATA: v_dir_input TYPE sxpgcolist-parameters. Use the below source code and get external commands from Transaction SM69, and encrypt the file with a password using SXPG_COMMAND_EXECUTE Function module. Refer to the below screenshot for information to be maintained as part of the configuration. Ĭonfigure the external command using the transaction SM69. WRITE : / 'operating system could not open file'. OPEN DATASET l_file FOR OUTPUT IN BINARY MODE. REPLACE ALL OCCURRENCES OF '''' IN l_file_zip WITH space. REPLACE ALL OCCURRENCES OF '''' IN l_file WITH space. DATA: l_file TYPE string,ĬONCATENATE '/tmp/' wa_final-pernr '''.PDF' INTO l_file.ĬONCATENATE '/tmp/' wa_final-pernr '''.zip' INTO l_file_zip. In the below scenario we are moving the file to /tmp/ directory in AL11 Transaction, One in.

Move the PDF file to the Application server. I_tline TYPE TABLE OF tline WITH HEADER LINE, You are able to generate a smartform with OTF dataĬonvert OTF of a smartform to PDF file DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,.Generate a payslip using smartform, encrypt it with a password and send it to the employee via email. Without using any third-party tool, we can password protect the ZIP file (pdf file inside the ZIP folder) and send it via email using SAP. Normally, we have a scenario where we convert the OTF output of a Smartform, or a spool request to PDF. This blog describes the procedure to email a ZIP file (PDF file inside ZIP folder) with password protection, as an attachment.
