Application Development 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: 

How to make single file from multiple PDF image?

Former Member
0 Kudos

Hi, it's my first question in SCN.

I promise my efforts for developing this site.

Lately, I made multiple PDF image by function 'CONVERT_OTFSPOOLJOB_2_PDF'.(each spool ID)

And I wanna make single .PDF file by merging these image in server directory(not local PC).

So I tried it following.

1. Each internal table resulted from CONVERT_OTFSPOOLJOB_2_PDF append one internal table.

   BL_PDF + MF_PDF → PDF

2. Excute following command.

  OPEN DATASET P_FILE FOR OUTPUT MESSAGE LV_MSG IN BINARY MODE.

  IF SY-SUBRC = 0.

    LOOP AT PDF.
      MOVE PDF TO FIELD.
      TRANSFER FIELD TO P_FILE.
      CLEAR PDF.
    ENDLOOP.

    CLOSE DATASET P_FILE.

  ENDIF.

But files was not merged, only last image was made as .PDF file instead.

How can I do it?

Thank you.

1 REPLY 1

Former Member
0 Kudos

Hi Sangrok,

Instead of preparing PDF multiple times, you can combine all the OTF data and then finally convert it into PDF. For saving the PDF onto application server, you can refer following report.

http://wiki.scn.sap.com/wiki/display/Snippets/To+convert+spools+to+PDF+and+place+it+in+Application+s...

Regards,

Aditya