cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Downloding PDF document from Spool request

Danish
Explorer
0 Likes
22,667

Hi,

My requirement is - i have generated interactive form lets say my form contains 3 pages and each one has a picture and some text on it.

what i need to do is to save all these 3 pages into a single file on my PC, so what i did, i created a spool request from FP_JOB_OPEN.

The solution i thought was to create a spool request of the form and download this to my PC as the spool contains all three pages of my interactive form , however i am unable to download this file on my PC, is there any possible way to download spool to PC?

Cordially,

Danish

View Entire Topic
Former Member
0 Likes

Hi,

Since you said it is a PDF spool, after generating the PDF spool, go to transaction SP02 within the SAP,

There copy your PDF spool number,

Now go to the transaction SE38, enter program name RSTXPDFT4 , execute it and it will as for the spool number, paste the spool number and execute it, a SAVE AS wind will pop up asking you to save the PDF file on your desktop.

If this doesnu2019t help, please revert back.

Regards,

Rajeev

Danish
Explorer
0 Likes

Hi Rajeev,

Thanks for your reply.

The program which you have mentioned RSTXPDFT4 does not work for spools generated from an Adobe forms, it only works for spools generated by smartforms.

Cordially,

Danish

OttoGold
Active Contributor
0 Likes

Hello,

I have check this for you, but did not try the whole scenario.

Try this:

- go to SP02

- find some PDF spool

- jump into, right before the PDF starts opening

- use /h to start debugging

- you will get into: SAPLSPOOL_SP01R / LSPOOL_SP01RO02, form: PDF_SHOW and things around

I would concentrate on FM: ADS_SR_READ_CONNECTED_CONTENT and stuff.

If this code can display the form, that means it can read the PDF, that means you can get the PDF file/content/rawstring.

Would be great to get some feedback from your side it that worked.

Regards Otto

Former Member
0 Likes

1. using FM CALL FUNCTION 'RSTS_OPEN_RLC'

CALL FUNCTION 'RSTS_READ'

CALL FUNCTION 'RSTS_CLOSE'

Build part list for the spool

2. Get Directory path using CALL FUNCTION 'ADS_GET_PATH'

3.Build Filename for each part by combining spoolno( FromTSP01) , partnum with COA extension

4. If the part has only one page use CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL' to get PDF data

Otherwise use CALL FUNCTION 'ADS_SR_READ_CONNECTED_CONTENT' for each page in the part to get PDF data

5. you can transfer the PDf spool page by page this way.

Former Member
0 Likes

Hi Danish,

Did you fix you issue ? i have the same problem .

Thanks in advance

Soufiene

Danish
Explorer
0 Likes

Hi Soufiene,

No the issue is not resolved yet. If you get something let me also know.

-Danish

former_member198834
Participant
0 Likes

Hi Danish,

If you find the solution , Please share here

Suresh

Former Member

There is a simple way to do it, and it was mentioned in this thread however only the correct report program was missing.

Run report RSPO0020 in transaction sa38 or se38, you need to enter the spool ID (which you can get from transaction sp02). Through this report you can access the 3 files the original poster mentioned.