Archive (extrenally) from spool?

Hi all,
i need to export printed documents (smartforms and Sapscripts) to an external archiving tool. all i really nee to do is to dump the doc as pdf in a special directory with certain parametrs in the filename. I tried a Fm that is called from within every smartform which archives the smartform. But for Sapscript this is not so easy.
So i'm looking for an alternative way.
is it possible to pick up the documents from the spool and then archive them according to certain parameters in the spooljob?
Is there a badi or exit in the spool program available to implement?
Or is there an other approach to this?
All suggestions are welcome, point will be awarded when usefull.
Thansk alot in advance,
Joris Bots

Joris
Please check the following links hope this helps you. 
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
http://www.sap-img.com/bc037.htm
You can also use FM CONVERT_ABAPSPOOLJOB_2_PDF to convert an spool into PDF file.
Hope this helps you.
Regards,
Gajendra
Message was edited by:
        Gajendra Bhatt

Similar Messages

  • Importing archived project from DVD

    I used burn disk to arcive a project to a DVD. That seemed to work fine.
    I then started a new project and tried to import the "archived project from the DVD and I keep getting this error:
    The file could not be imported: The file “Macintosh Hard Disk/Volumes/Media Drive/Home movies/Billie Jo awards” can’t be imported; QuickTime couldn’t parse it: -43
    So far I am unable to import this DVD or anything else into iMovie
    Any Ideas?
    David

    Your Archived DVD Project will only open in iDVD.
    To access the video you will need the burned copy of the DVD
    To import your DVD you will need a DVD ripper. I use Mac the ripper http://www.versiontracker.com/dyn/moreinfo/macosx/22715.
    If you want to only import the video (to edit or watch on your computer) chose in mode chapter extraction and select the ones you want (yes you can select them all). Then you will need to condvert the .VOB file (found in the video_TS file) to a .MOV or H264 using FFMpegX http://ffmpegx.com/download.html. If the binaries dont work just press cancel (you dont need them for this conversion). Then import your .MOV or .MP4 file into iMovie.
    That should do it
    eMac   Mac OS X (10.4.8)   1.42Ghz PPC G4

  • Convert OTF to PDF and print PDF from Spool

    Hi,
    I have searched all the forums and service market place but could not find solution to my problem.
    I am using Function module
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = p_spool
          no_dialog                = 'X'
          dst_device               = 'ISJB'
          pdf_destination          = 'S'
        IMPORTING
          pdf_bytecount            = lv_bytecount
          pdf_spoolid              = lv_spoolid
          otf_pagecount            = lv_pagecount
          btc_jobname              = lv_jobname
          btc_jobcount             = lv_jobcount
        TABLES
          pdf                      = gt_pdf
        EXCEPTIONS
          err_no_otf_spooljob      = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_dstdevice        = 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 sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    this generates spool in SP01. Ideally it should generate a PDF spool file but it generates a BIN file of Format G_RAW. When I display the spool it displays all kinds of japanese characters which does not make sense,.
    I setup printer ISJB with device type JPPDF (PDF converted for Japanese characters). Does any one know where the problem could be? Why I could not print the Spool in PDF?
    Thank you,
    Jagadish

    Hi,
    check out this program which will convert spool to pdf
    REPORT  zsmartform_spool_g.
    *************Types Declaration ****************************
    TYPES : BEGIN OF gty_tab,                          " Spool Requests
            rqident   TYPE tsp01-rqident,              " Spool request number
            rqdoctype TYPE tsp01-rqdoctype,            " Spool: document type
            rqo1name  TYPE tsp01-rqo1name,             " TemSe object name
           END OF gty_tab.
    *********Work Area ****************************************
    DATA: form_name TYPE rs38l_fnam,      " Used to get the function module of Smartform
          wa_outopt TYPE ssfcompop,       " SAP Smart Forms: Smart Composer (transfer) options
          gs_tab    TYPE gty_tab.         " Spool Requests
    *******Internal Table Declarations ************************
    DATA: gt_tab TYPE STANDARD TABLE OF gty_tab,       " Spool Requests
          gt_pdf TYPE STANDARD TABLE OF tline,         " SAPscript: Text Lines
          gt_spoolid TYPE tsfspoolid,                  " Table with Spool IDs
          gt_otfdata TYPE ssfcrescl.                 " Smart Forms: Return value at end of form prnt
    *********Variable Declarations ****************************
    DATA: gv_bytecount   TYPE i,               "#EC NEEDED " PDF Byte Count
          gv_file_name   TYPE string,                    " File name
          gv_file_path   TYPE string,                    " File Path
          gv_full_path   TYPE string,                    " Path
          gv_binfilesize TYPE i,                         " Bin File size
          gv_rqident   TYPE tsp01-rqident,               " Spool request number
          gv_name TYPE tst01-dname,                      " TemSe object name
          gv_objtype TYPE rststype-type,                 " TemSe: Object type name
          gv_type TYPE rststype-type.                    " TemSe: Object type name
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZPDF_G'
        IMPORTING
          fm_name            = form_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *Get Spool IDs
      wa_outopt-tdnewid = 'X'.
      wa_outopt-tddest = 'LP01'.
      CALL FUNCTION form_name
        EXPORTING
          output_options   = wa_outopt
          user_settings    = 'X'
        IMPORTING
          job_output_info  = gt_otfdata
        EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 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.
    *Assign the spool id
      gt_spoolid = gt_otfdata-spoolids.
    Generate spool and pdf for the output of the form
      PERFORM sub_generate_spool_pdf.
    END-OF-SELECTION.
    *&      Form  sub_generate_spool_pdf
          Generate Spool and PDF output
    FORM sub_generate_spool_pdf .
      DATA: ls_spoolid LIKE LINE OF gt_spoolid.
    *----Get the Spool Number
      CLEAR ls_spoolid.
      READ TABLE gt_spoolid INTO ls_spoolid INDEX 1.
      IF sy-subrc = 0.
        gv_rqident = ls_spoolid.
      ENDIF.
      CLEAR gt_tab.
      SELECT  rqident rqdoctype rqo1name INTO TABLE gt_tab
               FROM tsp01 WHERE rqident = gv_rqident.
      IF sy-subrc = 0.
        CLEAR gs_tab.
    Get the TemSe: Object name into variable gv_name
        READ TABLE gt_tab INTO gs_tab INDEX 1.
        IF sy-subrc = 0.
          gv_name = gs_tab-rqo1name.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
        EXPORTING
          authority     = 'SP01'
          client        = sy-mandt
          name          = gv_name
          part          = 1
        IMPORTING
          type          = gv_type
          objtype       = gv_objtype
        EXCEPTIONS
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 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.
    Check if temse object name type is 'OTF' or 'LIST'
      IF gv_objtype(3) = 'OTF'.
        PERFORM get_otf_spool_in_pdf.
      ELSE.
        PERFORM get_abap_spool_in_pdf.
      ENDIF.
    Generate F4 functionality from spool to pdf
      PERFORM write_pdf_spool_to_pc.
    ENDFORM.                    " sub_generate_spool_pdf
    *&      Form  get_abap_spool_in_pdf
          Generate the Spool number
    FORM get_abap_spool_in_pdf .
      REFRESH gt_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = gv_rqident
        IMPORTING
          pdf_bytecount            = gv_bytecount
        TABLES
          pdf                      = gt_pdf
        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 sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " get_abap_spool_in_pdf
    *&      Form  get_otf_spool_in_pdf
          Generate OTF data from the Spool Number
    FORM get_otf_spool_in_pdf .
      REFRESH gt_pdf.
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = gv_rqident
        IMPORTING
          pdf_bytecount            = gv_bytecount
        TABLES
          pdf                      = gt_pdf
        EXCEPTIONS
          err_no_otf_spooljob      = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_dstdevice        = 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 sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " get_otf_spool_in_pdf
    *&      Form  write_pdf_spool_to_pc
          Generate PDF format
    FORM write_pdf_spool_to_pc .
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        CHANGING
          filename             = gv_file_name
          path                 = gv_file_path
          fullpath             = gv_full_path
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ----DOWNLOADING THE PDF DATA***
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = gv_binfilesize
          filename                = gv_full_path
          filetype                = 'BIN'
        TABLES
          data_tab                = gt_pdf
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " write_pdf_spool_to_pc

  • Regarding reading the data from spool

    Hi Experts,
    How can i read the data from spool?
    I need to read the data from the spool and should display on the screen?
    Is there any FM to read the data from spool?
    Sruthi.

    hi please use this..
    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = v_spool
        TABLES
          buffer               = it_spool
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7

  • In PL-SQL archive data from a table to a file

    I am currently developing a vb app where I need to archive data from a table to a file. I was hoping to do this with a stored procedure. I will also need to be able to retrieve the data from the file for future use if necessary. What file types are available? Thanks in advance for any suggestions.

    What about exporting in an oracle binary format? The export files cannot be modifiable. Is there a way to use the export and import utility in PL/SQL?
    null

  • How to download data from spool to excel file

    Hi,
    I have requirement like....i need to download data from spool to excel file.
    Please let me know the process how to download...
    <removed by moderator>
    <removed by moderator>
    Thanks,
    Khasimsa
    Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
    locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

    Hi try this way..
    *FM called that returns the Spool Request Number data into and internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool                     "Spool Request Number
          first_line           = 1
        TABLES
          buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          OTHERS               = 8.
    *To convert the spool data into excel format
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_spool_xls               "Internal table having spool data
          objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data
    "call GUI down Load by passing  it_xls_spool
    Prabhudas

  • Program to Print Preview from Spool

    Hello gurus,
    I hope you guys could help me out...my requirement is to write an ABAP program that receives a spool number and displays its print preview to the user from there user can choose to print or delete the spool number
    Any advices ?:)

    Hi ..
    Call this FM to generate the Print preview from SPOOL
        CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
          EXPORTING
            spool_request_id = hrqident
          EXCEPTIONS
            OTHERS           = 0.
    <b>REWARD IF HELPFUL</b>

  • Download Tab Delimited file from spool!

    Hi Experts,
    Is there any way to download tab delimited txt file from spool?
    Spool is created for Statements and Invoices from Sap Script and Smartform which is in OTF format.
    I am able to download this in Text file but I need this file in tab delimited format.

    I don't understand what you want to do as it seems impossible : the spool contains miscellaneous data, not compatible with tab delimited files which are used to store 2-dimensional tables (columns, rows).

  • While Changing ABAP List from Spool to PDF Whole List is not displaying

    Hi,
    There is Z Program to convert Payslip ABAP List to PDF, when it is generating in PDF from Spool, I cannot view whole Payslip.
    Previously it is dislpaying fully in PDF file, But not Now.
    Please Help me...............
    With Regards,
    Gaurav.

    Hi,
    Thank you very much. My problem has been solved
    Thanks & Regards,
    Gaurav Mittal

  • Printing SFP ADOBE generated pdf from spool.

    I am trying to print ADOBE PDF file to HP Designjet Z5400 plotter.  It successfully writes a pdf file to the spool.  When I either release that spool file to print or have the print job set to print immediately I get a spool error - unable to read format G_RAW l_rc =128.  However I can print the pdf from preview.  It is NOT an issue with the printer printing the pdf file as I can do this.  My issue is that I cannot print directly to the printer via the SAP spooler.  I have entered incident to SAP with specific example of my program that produces the pdf spool file.  I am directed to read notes that imply I have ADS problem which is ridiculous as I have plenty of SFP generated pdf files printing to HP and Canon laser printers.  Again i am trying to print a very large label 2 X2 foot to HP Designjet Z5400 plotter directly via spool.  My task is to direct label to different printers based upon MATNR field.
    I would appreciate response from only people who have printed SPF ADOBE pdf to plotters.
    The pdf that was created file size 5.7 KB.
    SPAD settings
    Device Type  HPGL HPGL  : Bus.Graphics:  HP/GL plotter Device Class Standard printer
    Model        HP Designjet Z5400
    Host Spool Access Method  G G: Frontend print with control technologie

    new component SAPPDFPRINT, interactive forms can be printed on any Windows printer just like all of the other spool requests with the SAPWIN device types.
    Refer to SAP notes:
    1444342 - Device type-independent printing of ADS forms
    968394 - Forms Printing from spool and from Preview PDF differ
    1630403 - Mass printing of Adobe documents
    Regards
    Sandy

  • How can I prevent my Camera Archive import from being interrupted by timecode breaks?

    I'm trying to create Camera Archives from my old mini-dv tapes. I have a Sony Handycam DCR-TRV22 connected via FireWire. When I start the Camera Archive import process, everything is fine for a while but then the process stops with a message about a break in the timecode preventing the archiving from completing.
    Solutions to this problem I've seen online relied on changing import preferences in Final Cut 7. Unfortunately, I only have Final Cut Pro X and I'm not sure how to control this setting.
    I don't really care about timecodes, I just want to dump the entire tape to disk so I have a backup of the tape but the timecode break is interrupting the process and making me get involved a lot more often during the import process.
    Does anyone know how to force Final Cut Pro X to push through timecode breaks in a Camera Archive import?

    To clarify, this problem is not simply making me get involved more, but is preventing the Camera Archive operation from completing.

  • How can I import my archived emails from Microsoft outlook to my MAC Book Pro using MAC OS?

    How can I import my archived emails from Microsoft outlook to my MAC Book Pro using MAC OS?

    Do you have contacts turned on using the iCloud control panel in Windows control panel?

  • Report to Print from SPOOL to Printer

    Dear SDN users,
    is there any function module for print the report from SPool to

    Hi Surendra ,
    Once you check the given link:
    Spool to Print
    I think you may get some help.
    Thanks,
    sarita

  • Determine size of pdf from spool

    All,
    does anyone know how to determine size of pdf from spool.
    i'm using RSPO_RETURN_ABAP_SPOOLJOB to get pdf file, but i want to know its size.
    any idea?

    Assume the PDF data is in internal table gt_messg_att.
    MOVE p_spoolno TO lv_spoolno.
    * CONVERT THE SPOOL TO PDF
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid                    = lv_spoolno
          no_dialog                      = lc_no_dialog
    *     DST_DEVICE                     =
    *     PDF_DESTINATION                =
       IMPORTING
         pdf_bytecount                  = lv_bytecount
    *     PDF_SPOOLID                    =
    *     OTF_PAGECOUNT                  =
    *     BTC_JOBNAME                    =
    *     BTC_JOBCOUNT                   =
       TABLES
         pdf                            = gt_pdf_output
       EXCEPTIONS
         err_no_otf_spooljob            = 1
         err_no_spooljob                = 2
         err_no_permission              = 3
         err_conv_not_possible          = 4
         err_bad_dstdevice              = 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 sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
    * Transfer the 132-long strings to 255-long strings
        LOOP AT gt_pdf_output INTO wa_pdf_output.
          TRANSLATE wa_pdf_output USING ' ~'.
          CONCATENATE v_buffer wa_pdf_output INTO v_buffer.
          MODIFY gt_pdf_output FROM wa_pdf_output.
          CLEAR wa_pdf_output.
        ENDLOOP.
    * TO CONVERT THE DATA INTO PDF FORMAT ELSE THE PDF FILE
    * WON'T OPEN & REPORT WOULD GIVE A MESSAGE THAT
    * THE FILE IS DAMAGED & COULD NOT BE OPENED
        TRANSLATE v_buffer USING '~ '.
        CLEAR : wa_messg_att,
                gt_messg_att.
        DO.
          wa_messg_att = v_buffer.
          APPEND wa_messg_att TO gt_messg_att.
          SHIFT v_buffer LEFT BY 255 PLACES.
          IF v_buffer IS INITIAL.
            EXIT.
          ENDIF.
          CLEAR wa_messg_att.
        ENDDO.
      ENDIF.
    * Get size of attachment
      DESCRIBE TABLE gt_messg_att LINES lv_cnt.
      READ TABLE gt_messg_att INTO wa_messg_att INDEX lv_cnt.
      lwa_doc_data-doc_size =  ( lv_cnt - 1 ) * 255 + STRLEN( wa_messg_att ).

  • Some columns missing from spool

    Hi All,
    we have one Z- program, that wil create spool out put,
    but 2  cloumns are missing from spool out put,
    how can we increase the size of the spool ouput?
    Regards,
    Suresh.D

    Hi All,
    I think suresh is asking about spool Request not general output.
    Suresh You need to talk to your basis consultant to increase the size(I forgot the technical name of this size, sorry).
    But Natuarally they never accept your request.
    Thanks,
    Krishna.

Maybe you are looking for

  • How do I export to PDF in InDesign without the hidden layers

    Hi there This is probably a simple solution but I am trying to export a document to PDF in InDesign without the hidden layers. i.e - I have created a document that includes images etc from an existing PDF. When I open the new PDF and use the 'find' t

  • Itune wont open...

    k ive been looking through most of the threads here about itunes not opening, havent seen anyhting with the same problems that i have... whenever i try to run itunes i get the message that it's encountered an error and needs to close, yeah thats one

  • Problem with action events........ :(

    hi all, there is a strange problem which me and my colleagues are facing now-a-days...... For some odd and unknown reason, the links on the page suddenly stops woking... it goes like this.... we write events (buttons or action links) .... we test the

  • Can't edit in Address Book

    My Address Book stopped accepting any editing whatsoever. I have a MacBook Intel Core, I work with Tiger 10.4.11, and run address book version 4.0.4. For a few weeks now, when I get into Address book the Edit button is dimmed, and no change is possib

  • Upgrade Program with other function

    hi disowned married woman i would like to know your name if you want to deepen our conversation with interesting solution you are for me a interesting subject to share my problem if is possible naturally. You are much kind one to respond answer to me