OTF formatted Spool and ABAP spool to be merged into a pdf

I am creating a program which merges two spools into one pdf document. Now, the two spools are different, one is in otf format since its a SAP script. Other is a ABAP list. I use function modules CONVERT_ABAPSPOOLJOB_2_PDF & CONVERT_OTFSPOOLJOB_2_PDF to get data in internal table in pdf format. Then I append one after the other & then download. The problem with this is only one of the spools can be seen in output(pdf file) and not both.
Can somebody assist.
Thanks.
Shiv

Hi Shiv,
We have similar issue when merging two smartforms.
We have applied the following logic :
First populated an internal table OTFDATA1 with OTF data of both forms:
Ex:
    LOOP AT JOB_OUTPUT_INFO-OTFDATA INTO WA_OTFDATA.
      APPEND WA_OTFDATA TO OTFDATA1.
      CLEAR OTFDATA1.
    ENDLOOP.
The we have called the following function:
First populated an internal table
     CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = G_FILESIZE
        TABLES
          OTF                   = OTFDATA1
          LINES                 = I_PDF_TAB
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          ERR_BAD_OTF           = 4.
Then send to File syatem :
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
    EXPORTING
      LOGICAL_PATH               = L_LOGICALPATH
      FILE_NAME                  = L_INFILE
    IMPORTING
      FILE_NAME_WITH_PATH        = L_FILE
    EXCEPTIONS
      PATH_NOT_FOUND             = 1
      MISSING_PARAMETER          = 2
      OPERATING_SYSTEM_NOT_FOUND = 3
      FILE_SYSTEM_NOT_FOUND      = 4
      OTHERS                     = 5.
  IF SY-SUBRC <> 0.
    MESSAGE S000(ZV) WITH 'Unable to download PDF file'.
  ELSE.
    MESSAGE S000(ZV) WITH 'PDF file downloaded Successfully'.
  ENDIF.
May be this will help.
Lanka

Similar Messages

  • Why is Merge into single pdf using InDesign CS3 and not CS4 ?

    I'm new to this so the question may be trivial, but it beats me:
    I've created some InDesign files in CS4 and want to combine them into one PDF. So I opened Acrobat 9 Pro and
    navigated to "Merge files into single pdf". I chose the CS4 InDesign files to Add and clicked the Combine Files button.
    BUT, this starts up InDesign CS3 and not InDesign CS4 and returns a pop-up saying "unidentified error".
    Why is starting CS3 InDesign and not CS4, and what is the "unidentified" error ! ?
    As background I intially installed CS3 and then updated to CS4, leaving the CS3 applications intact. When I initially
    bought CS3, just before CS4 was released I may have created pdfs from InDesign as an experiment, but it is possible I have not done this
    since upgrading to CS4.
    Thanks for any help

    Thanks Michael, I was not aware of quality issues. Actually this is not really significant for my usage this time. What I'm doing is just using ID to capture notes/images/links etc in several free format ID documents. I then planned to merge them quickly into one pdf using Acrobat. I can easily shuffle the file order around to create a handy portable pdf reference document with the Merge feature.
    Doing something similar from ID seemed to me to require me to create pdfs for each ID doc and them to merge them in Acrobat. I did start to write a simple script to do this in ID, but I then realised that I wanted the ordering to vary and the ID files would likely to change. Then I found the merge and bingo, that solved it..... Well it solved it on another CS4 installation that had never seen CS3, but not on my machine which had been upgraded from CS3.
    I tried looking in the registry for obvious entries that might point Acrobat to use ID CS3 rather than CS4, but couldn't spot anything. I wonder if there is something buried in there ?
    Thanks again for helping
    Regards.

  • I have Adobe Pro 9 and I can't insert pages into a PDF created by Adobe Pro 8

    I've looked at the other discussions about not being able to insert pages into a PDF, and tried all the suggestions, but to no avail. I think the problem is that the original PDF was created in Adobe 8, and I have Adobe 9. When I open the PDF in Adobe Pro 9, the security screen says that editing is not allowed, and the screen is greyed out so that I can't change the settings. When I open the same PDF in Adobe Pro 8, the security screen says "No Security". 
    I also checked the "Documents" screen in Edit -> Preferences, and changing the "View Documents in PDF/A" to Never doesn't help.
    Does anyone have any suggestions?

    That would be a question for Adobe support. Firefox does advise users when their Acrobat plugin is out of date, but the actual update is done by Adobe.

  • Exporting 400 emails and merging into 1 pdf

    I have to export 400 or so emails from Mail into one PDF document to enter into evidence for a legal case. Does anyone know how I would go about this? Many thanks in advance for the loan of your esteemed brains.
    Message was edited by: Living In A Box

    You could try this, and it's probably better if you have these messages stored offline. (A bit quicker)
    In Mail, select all the messages you wish to 'export'.
    Create a new mail - it doesn't have to have an address.
    Click in the main body of the mail (the message section.)
    If all your mails are still selected, go to 'Edit > Append Selected Messages'.
    This should add your selection to your new mail, though it might take some time with 400 messages.
    Now choose to print this mail.
    In the print dialogue box at bottom left, you should see a button marked 'PDF'. If you click on this, you'll see an option to 'Save as PDF'

  • Cut and copied data now to merge into just 1 table?

    I have lots of data from about 10 different Numbers spreadsheets, however I want to just merge like the 10 table into just 1, so I can make it look neater!
    I can't seem to find a function for it and fairly new to Numbers
    Any help will be much appreciated
    Thanks

    Hi macwhore,
    Copy/Paste is what I would do.
    quinn

  • ABAP spool to OTF format

    Hi,
    Is there any function module available to convert ABAP spool Job to OTF format?.
    Final requirement is to convert this to PDF, however CONVERT_ABAPSPOOLJOB_2_PDF  is not found suitable for this requirement, since the converted output needs to be of  type  XSTRING.
    For WebDynpro, application, I have one solution. Please see the below URL
    http://****************/Tutorials/Smartforms/SFinEPasPDF/Page1.htm
    I could convert ABAP spool to RTF format, now I would like to have a solution for converting this RTF file to OTF and then use function module CONVERT_OTF. This function module give converted result in export parameter of type XSTRING.
    Please advice any solution for this
    Regards
    Sujith

    Hi,
    Try with the report program RSTXPDFT4(ECC6).
    With Regards,
    Sakthi

  • Convert ABAP Spool to PDF and display in BSP

    Hello SDNers,
    I have a requirement to display an R/3 report in Portal as PDF. I have chosen the route of creating a BSP which will show the report as PDF.
    I will then create a BSP iView in Portal pointing to this application.
    I am following the weblog /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    and few SDN forums:
    Display result of standard report RPTEDT00 within BSP
    Re: PDF Output
    I am new to BSP development and I am not able to put all the pieces of code together.
    I would really appreciate if you can help me put the pieces together and help me out with this.
    More details:
    This custom report displays the summary of Benefits Cost Accounting (by PERNR and current year).
    Once the report is run, I would like to get hold of the spool and convert the spool to PDF.
    In my BSP I would like to get the spool (or the binary of the PDF) and display the report as PDF in the BSP application.
    I have created the BSP application using the code given in the above weblog.
    I am not sure how to proceed further with the requirement.
    Looking forward for your suggestions and help.
    Thanks,
    Kalyan

    Hi kalyan,
    go thru this wiki and you will have what you need all at one place. the piece you might want to look at is ABAP spool to PDF. It even contains complete code.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bsp/pdf
    hope this helps.

  • Converting spool request into multiple pdf formated documents

    Hi Guys,
                 I am designing a report with several pages of output and running it in background.
    Is there a possibility to convert each page into an separate pdf format document ?
    If I use ALV report as output, if its more than page, do I face any issue with pdf conversion.
    Thanks

    Check the Following code, This might be helpful:
    form rstxpdft4 using filename.
    * Read spool job contents (OTF or ABAP list) and convert
    * to PDF, download PDF
      data: download  value 'X'.
      data: lv_filename like rlgrap-filename.
      lv_filename = filename.
      data otf like itcoo occurs 100 with header line.
      data cancel.
      data pdf like tline occurs 100 with header line.
      data doctab like docs occurs 1 with header line.
      data: numbytes type i,
            arc_idx like toa_dara,
            pdfspoolid like tsp01-rqident,
            jobname like tbtcjob-jobname,
            jobcount like tbtcjob-jobcount,
            is_otf.
      data: client like tst01-dclient,
            name like tst01-dname,
            objtype like rststype-type,
            type like rststype-type.
      select single * from tsp01 where rqident = gt_rq-rqident.
      if sy-subrc <> 0.
        write: / 'Spool request does not exist', gt_rq-rqident
                color col_negative.
        exit.
      endif.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      call function 'RSTS_GET_ATTRIBUTES'
           exporting
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           importing
                type          = type
                objtype       = objtype
           exceptions
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4.
      if objtype(3) = 'OTF'.
        is_otf = 'X'.
      else.
        is_otf = space.
      endif.
      if is_otf = 'X'.
        call function 'CONVERT_OTFSPOOLJOB_2_PDF'
             exporting
                  src_spoolid              = gt_rq-rqident
                  no_dialog                = ' '
             importing
                  pdf_bytecount            = numbytes
                  pdf_spoolid              = pdfspoolid
                  btc_jobname              = jobname
                  btc_jobcount             = jobcount
             tables
                  pdf                      = pdf  .
      else.
        call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
             exporting
                  src_spoolid              = gt_rq-rqident
                  no_dialog                = ' '
             importing
                  pdf_bytecount            = numbytes
                  pdf_spoolid              = pdfspoolid
                  btc_jobname              = jobname
                  btc_jobcount             = jobcount
             tables
                  pdf                      = pdf
    *************** download PDF file ***********
    v_filename = lv_filename.
    *  call function 'WS_DOWNLOAD'
    *       exporting
    *            bin_filesize            = numbytes
    *            filename                = lv_filename
    *            filetype                = 'BIN'
    *       tables
    *            data_tab                = pdf
    *       exceptions
    *            file_open_error         = 1
    *            file_write_error        = 2
    *            invalid_filesize        = 3
    *            invalid_type            = 4
    *            no_batch                = 5
    *            unknown_error           = 6
    *            invalid_table_width     = 7
    *            gui_refuse_filetransfer = 8
    *            customer_error          = 9
    *            others                  = 10.
    *  if sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  else.
    *    gv_count = gv_count + 1.
    *  endif.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE                    = numbytes
        FILENAME                        = v_filename
        FILETYPE                        = 'BIN'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = pdf .
    *   FIELDNAMES                      =
    Thanks.

  • Submit program to send a smartform to the spool and obtain a PDF

    Hi all,
    I wanna know if there is a way to submit (execute) a program that print a smartform for print this smartform to the spool and then obtain a PDF file from the spool order.
    I wanna do this because the program that allows to print the smartform is already implemented and its logic is complicated, and I need to get the smartform as a PDF to show it into a WDP Java application.
    If it's posible to do this, could you explain me how can I do it?
    Regards,
    Gregory.

    Hi,
    To get the PDF format output of smartform you can try with the following Function Module.Before that you have to declare the function module for calling the smartform.
    DATA:
      W_bin_filesize TYPE i,                            " Binary File Size
    Internal table to hold the OTF data*
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data record from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Suvajit

  • Link between spool request & abap program

    Hi all,
    I m looking for the link table between a spool request and the corresponding job and abap program.
    I want to select all spool requests generated via een job via een abap program.
    Some suggestions?
    Thanks in advance,

    Hi,
    Spool request is a document for which a print function has been selected. However, it has not yet been output to a printer or another device. The output data for the print document is stored partly formatted in a data store until an output request is created, that is, until it is sent to a particular output device.
    The spool system uses a spool request to store the print data temporarily and to access it. The data is stored in a temporary format. You can also display the print document. The system automatically assigns a 10-digit ID number to a spool request.
    Spool requests can be viewed via tcode SP01, the number will be there, programatiically it is sometimes populated in the system field SY-SPONO.
    It will take input parameters through the selection screen variants and process the code normally as foreground when we are writing the output to list it will generate the spool.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • How to combine ABAP spools into a single PDF

    Hi
    I have some ABAP spools each with different no-of fields with different formats(Colors of ALV)
    I need to combine all these sppols into one PDF without disturbing their formats.
    Canu plz write ur suggestions.
    Narendra

    Hi,
    Use this FM
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = gd_spool_nr
    no_dialog = c_no
    dst_device = c_device
    IMPORTING
    pdf_bytecount = gd_bytecount
    TABLES
    pdf = it_pdf_output
    EXCEPTIONS
    err_no_abap_spooljob = 1
    err_no_spooljob = 2
    err_no_permission = 3
    err_conv_not_possible = 4
    err_bad_destdevice = 5
    user_cancelled = 6
    err_spoolerror = 7
    err_temseerror = 8
    err_btcjob_open_failed = 9
    err_btcjob_submit_failed = 10
    err_btcjob_close_failed = 11
    OTHERS = 12.
    If you have 2 spools in a single PDF,
    DO 2 TIMES.
    Call the same  FM and create an internal table, in another internal table append the data.
    ENDDO.
    Regards,
    Pankaj

  • Converting spool of line width more than 850 char to PDF format in ECC 6.0.

    Hello Experts.
    I am facing problem while trying to convert a spool (generated from background scheduling of an ALV ) to PDF format in ECC 6.0.
    The ALV has 45 columns. Using SAP note no 1226758 I am able to increase the spool width but when I am converting the spool  to PDF using FM 'CONVERT_ABAPSPOOLJOB_2_PDF' the end caharacters are getting truncated .
    Please reply ASAP . Any suggestion/Hint will be appreciated.
    Thanks and Regards
    Arvind Kumar Yadav

    Hi Aravind,
    go to SPAD transaction --> and change the printer which supports more than 45 columnsand 256 cahracters..
    according to the printer setting the output is created.
    choose any below format TYPES...X_65_256/2
    ABAP list: At least 65 lines 2*128=256 double columns (SAPLPD only)
    see th following link for result..
    <a class="jive_macro jive_macro_message" href="" __jive_macro_name="message" modifiedtitle="true" __default_attr="7318557"></a>
    Regards,
    Prabhudas

  • Print an existing spool in ABAP program.

    Hi Experts, 
    I have a problem to print an existing spool. 
    I need print many an existing spools in ABAP program 
    - I used the SHDB and call transaction with BDC data but work only for 1st. 
    - I tried use the RSPO_RPRINT_SPOOLREQ function but don't work.

    I resolved my own problem.
    I use the function RSPO_OUTPUT_SPOOL_REQUEST...
    The only parameters to this functions was spool_request_id  - ID spool.
    Thanks for  help!

  • Get HTML spool and save it as html on a server directory (in batch)

    Hi all,
    I wrote a program which permits to get a spool an send it per mail as attachment or save it as file in a directory.
    It musst be available to start the program in batch mode.
    I've no problem to get the spool (type HTML) and send it via mail with the HTML file as attachment.
    But by getting the spool and saving it in a directory insteed sending it via mail, I've a corrupted file. Does anybody know how to solve the problem ?
    I did following :
    get the spool :
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
           rqident              = iv_spool
         IMPORTING
           real_type            = lv_real_type
         TABLES
           buffer               = lt_soli
    * convert the file :
      lt_solix = cl_bcs_convert=>soli_to_solix( lt_soli ).
    *Transfert the file:
        OPEN DATASET lv_dataset FOR OUTPUT IN LEGACY BINARY MODE.
       LOOP AT lt_solix INTO ls_solix.
         TRANSFER ls_solix TO lv_dataset.
       ENDLOOP.
       CLOSE DATASET lv_dataset.
    Some other informations :
    - I do not want a spool in text mode (RAW). I want to get the HTML file.
    - I allready tried to do an open dataset in text mode -> didn't work.
    thank in advance for any advice.
    Fred

    i'm sorry, i'm pretty dumb and missed the change into solix table.
    try give a look here
    Spool to HTML Function Module
    ABAP Utility : Print-Screen to HTML

  • Invoice not appearing properly in Polish lang. for Spool and PDF

    Hi,
    We have created an invoice layout in English with font HELVE and HELV_17, the same layout and style is being called for polish language.
    It is working fine for English; however the same font is not working for Polish language in Spool and PDF formats though we are using the code page 8859-2 LATIN-2 as stated in notes 96953.
    It is highly appreciated, if you throw some light on this issue with respect to font appearing in polish . We are expecting the font HELVE in Spool and PDF formats for Polish language.
    Regards
    Harikrishna
    Edited by: Harikrishna yoganarasimhaiah on Apr 14, 2009 5:20 AM

    Without access to the files it's impossible for us to help. Acrobat will be displaying the PDF "correctly", but why the page contents are shifted is anyone's guess.
    When you save as "Photoshop PDF" and choose the "Preserve Photoshop Editing Capabilities" option, it embeds a copy of the PSD file into the PDF and will open that whenever you try to open the PDF in Photoshop, which is why you don't get the import dialog. Photoshop never even reads the PDF page contents. Turn off that option, save to PDF again, and then open it in Photoshop - you'll see the true PDF page being imported as a graphic, and it'll match what Acrobat is displaying.

Maybe you are looking for

  • How i know Authorization object in system?

    Hi all, i create new BAdi with Enhancement Spot: ZWORKORDER_GOODSMVT (copy WORKORDER_GOODSMVT in standard SAP) now i have Badi definition: ZWORKORDER_GOODSMVT with Interface: ZIF_EX_WORKORDER_GOODSMVT all ok. now how i can see authorization object in

  • Exporting to PDF generating duplicate pages

    Post Author: raja6791 CA Forum: Exporting Hi, I have a crystal report which includes 4 sub reports. The report contains 9 pages. Which is exported to PDF. It is working fine till last week.  Now  it is generating around 60 duplicate pages of same con

  • Windows BDOS When Coming Out of Sleep

    Hey guys, so I recently updated to Windows 8.1, and now when I come out of Sleep Mode, my computer gets a BSOD I havent been able to figure out why yet though but heres the minidump of the crash report Microsoft (R) Windows Debugger Version 6.2.9200.

  • Screen sharing only works for some computers

    I have 3 computers on the same network.  For this thread I will refer to them as C1, C2 & C3.  All computers show in the sidebar as shared and I can look at all the files within these computers. C1 and C2 can see C3 with screen sharing but no other c

  • Phone number links in iCal

    Hello all; In Mail, phone numbers turn into links which when tapped dial the call. In iCal, even if I put a phone number in the event name or notes and view it on the iPhone, it is not a link. So I transcribe it on paper (yuck!) then dial it manually