Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAPScript to PDF (using DATASET)

Former Member
0 Likes
946

Hi,

I want to use OPEN DATASET pdf_file_name for the pdf file coming out from SAPScript.

Here is an overview ...

OPEN_FORM

CLOSE_FORM

FM - CONVERT_OTFSPOOLJOB_2_PDF

Now I want to use OPEN DATASET pdf_file_name FOR INPUT IN BINARY MODE.

CLOSE DATASET pdf_file_name

Please suggest.

Thanks.

7 REPLIES 7
Read only

brad_bohn
Active Contributor
0 Likes
889

Your question doesn't make sense. Why 'FOR INPUT'? What is your actual requirement? To write the PDF file to the application server?

Read only

Former Member
0 Likes
889

Hi,

can you write your question clearly.........

Regards,

Madhu

Read only

0 Likes
889

hi,

I want to put sapscript to application server in pdf format.

Please suggest.

Read only

0 Likes
889

hi gaurav,

there is a simple solution for your problem, first make the pdf from your sapscript then call the transaction cg3z and give the file path of the pdf file as the sorce and execute. the pdf will be uploaded in the app server. u can also call the cg3z tcode inside your program.

Regards,

Santoish

Read only

Former Member
0 Likes
889

Hi,

May be you can download the script output to PDF on presentation server and then upload it on the application server.

Use the following FM to convert it into PDF

CONVERT_OTF

use the following to download onto presentation server

GUI_DOWNLOAD

U can den use the cg3z transactiona nd specify your file path there.

Hope it solves ur problem

Regards,

Manish

Read only

brad_bohn
Active Contributor
0 Likes
889

You certainly DON'T need to use GUI_DOWNLOAD or a CALL TRANSACTION to CG3Z (to a transaction that requires a front-end file!!!) as suggested. Those options are absolutely unnecessary and don't work at all if the program is running in the background. You can write the PDF data you already have in the internal table format from your function call DIRECTLY to the application server using OPEN DATASET with FOR OUTPUT and BINARY mode.

Read only

Former Member
0 Likes
889

u can use FM CALL FUNCTION 'SSFCOMP_PDF_PREVIEW for sapscript to pdf