1

I'm currently doing Invoicing and Printing setup on a SAP demo system. I've managed to create Smart Forms based on the standard ones. The problem starts with printing using FPCOPARA transaction and LP01 as Output device. I was able to generate a spool (was able to view it as well) but not printed (no actual file).

as you would see in this screenshot, it only keeps on that status

I just want to have a file from that Smart Form stored in AL11 and be able to archive it later on. Do you have idea on how can I proceed with this?

Thanks

Philipp
  • 67,764
  • 9
  • 118
  • 153
RALF
  • 33
  • 6
  • 1
    your question seems contradictory. First you say you want to print (I assume on paper), and then you write you want the output as a file. Which one is your actual goal? – Philipp Aug 02 '21 at 14:16
  • No. I meant to create the output file as PDF and stored in application server – RALF Aug 03 '21 at 08:44
  • I updated the title of your question to better reflect what you meant. – Philipp Aug 03 '21 at 08:48
  • Thanks, do you have idea on how? – RALF Aug 03 '21 at 08:52
  • I posted an answer. – Philipp Aug 03 '21 at 08:53
  • actually if you need just your outputs as PDF files you do not need a spool at all, you can print into PDF directly – Suncatcher Aug 03 '21 at 13:43
  • Yes, but the thing we need to execute print correspondence and with that I'm using a standard forms, so I can't create user exit within the forms and the only thing left for me is the spool. But thanks to @Philipp I've managed to store it in our application server – RALF Aug 03 '21 at 14:06

1 Answers1

1

We actually have an inhouse-developed program for this exact task. I don't have permission to publish the sourcecode of the program, but it involves:

  • Reading the list of spool requests from database table TSP01
  • Using the function module RSTS_GET_ATTRIBUTES to obtain the type of the spool request.
  • Calling the function modules CONVERT_OTFSPOOLJOB_2_PDF or CONVERT_ABAPSPOOLJOB_2_PDF, depending on the type determined by the previous function module. They return a table containing the content of the spool request in the PDF format.
  • Writing the table returned by the previous function modules to a file using the ABAP statements OPEN DATASET and TRANSFER
Philipp
  • 67,764
  • 9
  • 118
  • 153
  • Yes! thank you. Almost the same thing I've been trying to make by copying the report RSTXPDFT4 but I'm currently struggling on posting it in application server as I'm still learning what internal tables/data from FM's will be passed on open dataset – RALF Aug 03 '21 at 09:07
  • @RALF There are quite a lot of questions on this website which deal with internal tables and file access in ABAP. If you have any questions about these subjects which were not asked and answered yet, feel free to post them. – Philipp Aug 03 '21 at 09:32