cancel
Showing results for 
Search instead for 
Did you mean: 

HRFORMS-PDF from Spool to UNIX

Former Member
0 Kudos

Hello everyone,

I am a bit confused; I already started this discussion on monday, got some answers and tried yesterday to send a screenshot form my own spool-file to illustrate the situation. This reply was rejected (I do not understand, which rule I have broken) and now I cannot continue the discussion anymore.

So I try again from beginning;

I use the new HRFORMS formular SAP_PAYSLIP_DE_P; this creates a PDF in the spool. I want to transfer this PDF toUNIX to get it via AL11.

Yesterday I got an answer giving some ABAP-Code, but this requires SAPScript in the spool request.

I try to describe the content of the spool request. Maybe then it becomes clearer what I need.

The spool-entry says:  1. Column (Spool Number) :  SpoolID

                                 2. Column (Type)               :  PDF-Icon (ADOBE)

                                 7. Column (Title)                :  HRFORM PDFP /1PYXXFO/ACS

I can download this PDF to my desktop via menu Spool Request -> Forward -> Export as PDF.

I need to do this in background and to server, using some ABAP program.

Can anyone help?`

Thanks a lot in advance

Angelika

Accepted Solutions (0)

Answers (3)

Answers (3)

marc_augustin2
Active Participant
0 Kudos

Hi Angelika,

I also created a payslip PDF form in my spool, it should look like yours:

I've then written a small report to fetch this spool request and store it somewhere on the application server, so that I can download it via AL11 or move it around in the directories. Here is the report:


REPORT  Z_PDF_TEST.

DATA: request LIKE TSP01-RQIDENT,

       path(14) TYPE C,

       pdf type FPCONTENT.

   request = '6232'.

   CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'

     EXPORTING

       i_spoolid               = request

       i_partnum               = '1'

     IMPORTING

       E_PDF                   = PDF.

   path = '/tmp/test.pdf'.

   OPEN DATASET path FOR OUTPUT IN BINARY MODE.

   TRANSFER pdf TO path.

CLOSE DATASET path.

I hope this helps.

Regards,

Marc

marc_augustin2
Active Participant
0 Kudos

Hi Angelika,

maybe this discussion might help you. It's about reading PDF spools and storing them on the server.

In general, I would suggest to write a report that fetches the spool job and stores it. But I will look again if there might be some other solution. So far, you can try the solution here:

Marc

Former Member
0 Kudos

Hello All,

I have the same Problem. Is there anybody who has a solution? 🙂

Kind regards

Marc