Skip to Content
Former Member
Dec 29, 2010 at 09:33 AM

Archiving Printdata although extracting OTF-Data


Hello there everybody,

right now I'm facing an very awful problem. My task is to create a report that should be run by RSNAST00 for a certain message type. The report should create a invoice document with the help of SAP-script, but it should create this invoice document under certain conditions. If the invoice should send by mail, I have to receive the OTF-data. After that the data should be converted to binary data and attached as a PDF-File to the mail. The previous results a very satisfying, everything works. The mail is send to the receiver. The attachments are part of the mail. BUT during my test I recognized that the invoice document is not archived to our digital file archive. The normal case is that an printed invoice document is stored in the archive as a PDF-file. I searched for a solution and found the reason why I these document is not stored in the archive. If you extract the OTF-Data while creating the invoice document by SAP-script, the function "OPEN_FORM" will not archiving the following document. I found an evidence for this assumption, as i debugged through the "OPEN_FORM"-function.

"threat GETOTF like preview: no archiving, no data is sent to spool
if itcpp-tdgetotf = 'X'.
     itcpp-tdpreview = 'X'.
Here is my question! How do I archiving the invoice document although I extract the OTF-Data? (ATTENTION! Any spools should be created) Greetings GollmerBZ UPDATE: I use the FM "CONVERT_OTF" to create bin data for the PDF-attachment. This FM owns a parameter called archive_index. Am I able to archive the invoice with the help of the FM CONVERT_OTF??? Edited by: GollmerBZ on Dec 29, 2010 11:28 AM