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

Similar Messages

  • Convert spool to OTF format

    Hi All,
    My requirement:
    I have a report which generates PDF format for all the employees provided on the selection screen ,for this i used the FM :
    call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid = max_spool
          no_dialog  = space
          dst_device = mstr_print_parms-pdest
        importing
          pdf_bytecount                  = mi_bytecount
        tables
          pdf        = mtab_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.
    Now i want to create an RFC function module which has  to generate  PDF binary data using the PDF generation report .
    The process which i am following is :
    .       Creating  RFC function module with the import parameter u2018PERNRu2019
    ·         call this report YREPORT inside the RFC using the PERNR and receive the OTF data from report using buffer.
    ·         Then convert the OTF data into PDF lines using the function module u2018CONVERT_OTFu2019
    ·         And then convert the PDF lines in to PDF binary data.
    Please suggest how to get OTF data format from report using buffer .Please provide any FM for this & also provide PDF lines into PDF binary data
    Regards,
    Bharat

    what below code does is:
    1: it creates a job hence spool is generated.
    2: it call  a ADOBE form hence PDF object is generated . (which you may not need)
    3: it converts PDF to SOLIX or binary PDF for sending as an mail attachment.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = wa_outputparams
        EXCEPTIONS
          cancel          = 0
          usage_error     = 0
          system_error    = 0
          internal_error  = 0
          OTHERS          = 0.
    * Processing should continue inspite of errors
    * so made Sy-Subrc as 0
    * Set form language and country (->form locale)
      wa_docparams-langu   = lc_language.
      wa_docparams-country = lc_country.
    * Pass Data to the Form Interface
      CALL FUNCTION lv_form_name
        EXPORTING
          /1bcdwb/docparams  = wa_docparams
          t_stud_data        = wa_mailtab1
        IMPORTING
          /1bcdwb/formoutput = wa_pdfobject
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
    * Convert PDF Object to type SOLIX
      CALL METHOD cl_document_bcs=>xstring_to_solix
        EXPORTING
          ip_xstring = wa_pdfobject-pdf
        RECEIVING
          rt_solix   = it_attachment.
    ags.

  • Reg : Converting a report list to OTF format.

    Hi Folks,
        Is there any function module which converts spool of (report)  list type to OTF type? As we need to merge multiple spools (list types) into single PDF file. We have
    1) RSPO_RETURN_SPOOLJOB,
    2) CONVERT_OTF_2_PDF
    which can merge multiple spools  into single PDF file, but these function modules accepts only spools of OTF format.
    Any help will be rewarded.....

    Hi ,
    See this code , this gets smartform output pages into the jobinfo document "ls_job_info' , then converts it into OTF format and then PDF. See if this can  give u some idea.
    CALL FUNCTION lf_fm_name
          EXPORTING
            archive_index      = toa_dara
            archive_parameters = arc_params
            control_parameters = ls_control_param
            mail_recipient     = ls_recipient
            mail_sender        = ls_sender
            output_options     = ls_composer_param
            user_settings      = space
            is_bil_invoice     = ls_bil_invoice
            is_nast            = nast
            is_repeat          = repeat
          IMPORTING
            job_output_info    = ls_job_info
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = v_len_in
        TABLES
          otf                   = i_otf
          lines                 = i_tline
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc <> 0.
      ENDIF.
      LOOP AT i_tline.
        TRANSLATE i_tline USING '~'.
        CONCATENATE wa_buffer i_tline INTO wa_buffer.
      ENDLOOP.
      TRANSLATE wa_buffer USING '~'.
      DO.
        i_record = wa_buffer.
        APPEND i_record.
        SHIFT wa_buffer LEFT BY 255 PLACES.
        IF wa_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Attachment
      REFRESH: i_reclist,
      i_objtxt,
      i_objbin,
      i_objpack.
      CLEAR wa_objhead.
      i_objbin[] = i_record[].
    Create Message Body Title and Description
      i_objtxt = 'Invoice output Attached!'.
      APPEND i_objtxt.
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
      READ TABLE i_objtxt INDEX v_lines_txt.
      wa_doc_chng-obj_name = 'Invoice'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      wa_doc_chng-obj_descr = 'Invoice'.
      wa_doc_chng-sensitivty = 'F'.
      wa_doc_chng-doc_size = v_lines_txt * 255.
    Main Text
      CLEAR i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num = 0.
      i_objpack-body_start = 1.
      i_objpack-body_num = v_lines_txt.
      i_objpack-doc_type = 'RAW'.
      APPEND i_objpack.
    Attachment (pdf-Attachment)
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num = 0.
      i_objpack-body_start = 1.
      DESCRIBE TABLE i_objbin LINES v_lines_bin.
      READ TABLE i_objbin INDEX v_lines_bin.
      i_objpack-doc_size = v_lines_bin * 255 .
      i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = 'PDF'.
      i_objpack-obj_name = 'smart'.
      i_objpack-obj_descr = 'Invoice'.
      APPEND i_objpack.
    Regards,
    Uma

  • 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

  • ABAP Custom Report (ALV Format) in Background Processing

    Hi
    I am not the hardcore ABAP Person. But want to know about the detail fact of the ABAP Custome Reports. The question is can we do the background processing for the ABAP Custome Report in ALV Format.
    If Yes ..do we require to have any additional Function/code to get the spool in ALV Format. I saw the comments that the output will look like the mess.
    Please share your comment or any useful documenation on this. We are in ECC 6.0
    Thanks in advance..and yes it will be rewared by points.
    Navin

    You can use alv's in background using docking containers, but the display wont be interactive. If you search the forum you will see tons of threads which talk about running ALV's in background.
    For the output to be interactive, you can run the report in foreground and do the data processing in background.
    Refer this link:
    Displaying ALV Grid in Background Job

  • Error in converting Spool to HTML format.

    Hi Gurus,
    I am reading SPool and converting that into HTML formt. Please do find below code for the same.
    Submit report to convert the spool to HTML format
      SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
      WITH rqident = p_spoolno.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = gt_listobj
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Convert the spool to HTML format
      CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
       EXPORTING
       REPORT_NAME         =
         template_name       = 'WEBREPORTING_REPORT'
        TABLES
          html                = p_html_tab
          listobject          = gt_listobj.
    >>>>>>>>>>>>>>>>>>>
    And i send p_html_tab as attachement to email.
    When I opened the attachement, i can view only half page in htm.
    How can i get the full page in htm.

    First convert the spool to internal table by using FM
    RSPO_RETURN_ABAP_SPOOLJOB
    Next from internal table to HTML....
    Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html
    or try the following
    Please try the follwoing:
    1. define HTML internal table with ref to type W3HTML
    2. download it as BIN type and give total lenght of the strings as a parameter in the down load.
    See the code extract below:
    describe table html lines entries.
    read table html into w_html index entries.
    size = ( entries - 1 ) * 255 + strlen( w_html ).
    concatenate p_path file into file.
    call function 'WS_DOWNLOAD'
    exporting
    bin_filesize = size
    filename = file
    filetype = 'BIN'
    tables
    data_tab = html

  • Problem concerting spool to PDF format

    Hi all,
    I am trying a small program to write ABAP list to spool, and within the same program I am trying to convert the spool into PDF format. I am including all the code , please can any one check and tell me where I am going wrong. I am getting a message saying 0 bytes transferred.
    Even the contents of the table pdf_table is empty.
    REPORT ZWRITE_SPOOL .
    tables tsp01.
    DATA: val(1) TYPE c,
          pripar TYPE pri_params,
          arcpar TYPE arc_params,
          lay   TYPE pri_params-paart,
          lines TYPE pri_params-linct value 60,
          rows  TYPE pri_params-linsz value 80.
    data : w_spoolnumber like tsp01-RQIDENT.
    data : w_device like  tsp03-PADEST value 'H278' .
    data begin of pdf_table occurs 0.
            include structure tline.
    data end   of pdf_table.
    data : MI_BYTECOUNT type i ,
           MC_FILENAME LIKE RLGRAP-FILENAME.
    DATA: MTAB_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE .
    data pdf_fsize type i.
    DATA: MSTR_PRINT_PARMS LIKE PRI_PARAMS ,
          MC_VALID(1) TYPE C .
    CONCATENATE 'C:\TEMP\' sy-repid '.PDF' INTO MC_FILENAME.
    *---- Code added
    pripar-pdest = 'H278'.
    pripar-prcop = 001.
    pripar-plist = sy-repid.
    pripar-prnew = 'X'.
    pripar-pexpi = 8.
    pripar-linct = 65.
    pripar-linsz = 80.
    pripar-paart = 'X_65_80'.
    pripar-prsap = 'D'.
    pripar-prrec = sy-uname.
    pripar-prdsn = 'LIST1S'.
    pripar-ptype = 'TEXT'.
    pripar-armod = 1.
    *---- End of code
    perform format.
    select single RQIDENT from tsp01 into w_spoolnumber
    where RQ2NAME = sy-repid .
      NEW-PAGE PRINT OFF.
    write w_spoolnumber.
    perform spool_to_pdf.
         Form  format
    FORM format.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
                in_archive_parameters  = arcpar
                in_parameters          = pripar
                layout                 = lay
                line_count             = lines
                line_size              = rows
                no_dialog              = 'X'
           IMPORTING
                out_archive_parameters = arcpar
                out_parameters         = pripar
                valid                  = val
           EXCEPTIONS
                archive_info_not_found = 1
                invalid_print_params   = 2
                invalid_archive_params = 3
                OTHERS                 = 4.
      IF val <> space AND sy-subrc = 0.
        PERFORM list.
      ENDIF.
    endform.                    " format
    FORM list.
      NEW-PAGE PRINT ON
        NEW-SECTION
        PARAMETERS pripar
        ARCHIVE PARAMETERS arcpar
        NO DIALOG.
    write 'SAP PROGRAMMING USING ABAP'.
    ENDFORM.
         Form  spool_to_pdf
    form spool_to_pdf.
    call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
         exporting
              src_spoolid   = w_spoolnumber
              no_dialog     = 'X'
              DST_DEVICE    = w_device
         importing
              pdf_bytecount = pdf_fsize
         tables
              pdf           = pdf_table
         exceptions
              others        = 0.
    CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = MI_BYTECOUNT
    FILENAME = MC_FILENAME
    FILETYPE = 'BIN'
    IMPORTING
    ACT_FILENAME = MC_FILENAME
    TABLES
    DATA_TAB = MTAB_PDF
    EXCEPTIONS
    INVALID_FILESIZE = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    CUSTOMER_ERROR = 7
    OTHERS = 8.
    endform.                    " spool_to_pdf
    Thanks,
    Varun.

    hi Varun,
        Check for the <b>internal Table data/work area</b> as whether data is getting populated in to that or not.
    i.e,
    CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = MI_BYTECOUNT
    FILENAME = MC_FILENAME
    FILETYPE = 'BIN'
    IMPORTING
    ACT_FILENAME = MC_FILENAME
    TABLES
    <b>DATA_TAB = MTAB_PDF</b>
    EXCEPTIONS
    INVALID_FILESIZE = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    CUSTOMER_ERROR = 7
    OTHERS = 8.
    <b>check whether data is getting populated in MATAB_PDF in debug mode.</b>
    Regards,
    Santosh

  • Create Spool From OTF Data

    Hi all,
    Is there any way of creating a spool request or printing OTF data directly from an internal table.
    Scenario is that I have read a spool request with multiple pages into OTF format and now have an internal table with OTF data. I have then split the spool data at page level into another internal table.
    This table also contains OTF data . Is there anyway of printing this internal table directly to printer. If not is there any way of creating a spool request from this internal table?
    Regards,
    Preet

    May be i can help to some extent. I will just tell you how to convert a internal table into spool. I have done the coding
    REPORT  zpmm_pdf                                .
    TYPES : BEGIN OF itab,
            name(20) TYPE c,
            age TYPE i,
            *** TYPE c,
            END OF itab.
    DATA : gt_itab TYPE STANDARD TABLE OF itab,
           gw_itab TYPE itab.
    DATA : counter  TYPE i.
    ********************Data declaration for use in converting to pdf
    DATA : pripar LIKE pri_params.
    DATA : lw_space VALUE ''.
    DATA : itab_pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    <b>*To get spool info</b>
    DATA : rqident LIKE tsp01-rqident ,
           rqcretime LIKE tsp01-rqcretime .
    <b>DATA: spool_id LIKE tsp01-rqident.</b>
    DATA : numbytes TYPE i,
           cancel.
    DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
    ********************END of Data declaration for use in converting to pdf
                           START-OF-SELECTION
    DO 20 TIMES.
      gw_itab-name = 'swetabh_shukla'.
      gw_itab-age = counter + 1.
      gw_itab-***  = 'M'.
      counter = counter + 1.
      APPEND gw_itab TO gt_itab.
      CLEAR : gw_itab.
    ENDDO.
    <b>* Gt_itab is the internal table that we will write to spool</b>
    *Start
    SET PARAMETER ID 'ZPDF' FIELD lw_space.
    <b>CALL FUNCTION 'GET_PRINT_PARAMETERS'</b>
      EXPORTING
        in_parameters          = pripar
        line_size              = 255
        layout                 = 'X_65_132'
        no_dialog              = 'X'
      IMPORTING
        out_parameters         = pripar
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    <b>*********To write data in spool</b>
    NEW-PAGE PRINT ON PARAMETERS pripar NO DIALOG .
    RESERVE 5 LINES.
    <b>*********From here data will be written in spool</b>
    WRITE : 'Name',
            'Age',
    LOOP AT gt_itab INTO gw_itab.
      WRITE : / gw_itab-name,
                gw_itab-age,
                gw_itab-***.
    ENDLOOP.
    <b>*****To switch off spool writing</b>
    NEW-PAGE PRINT OFF.
    ************End of spool writing
    <b>******To get the latest spool id of spool written by us</b>
    SELECT  rqident  rqcretime FROM tsp01
                 INTO (rqident,rqcretime)
                 WHERE rqowner = sy-uname
                 ORDER BY rqcretime DESCENDING.
      EXIT.
    <b>********  It will just read the latest spool id and exit</b>
    ENDSELECT.
    MOVE  rqident TO spool_id. <b>" We get the spool id here of the spool we wrote</b>
    <b>*Now  spool_id contains the spool id. We can convert this spool to pdf also as given *below</b>
    ****************************************************To convert spool to pdf
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
             src_spoolid = spool_id
          NO_DIALOG =
          DST_DEVICE =
          PDF_DESTINATION =
          IMPORTING
             pdf_bytecount = numbytes
          PDF_SPOOLID =
          LIST_PAGECOUNT =
          BTC_JOBNAME =
          BTC_JOBCOUNT =
           TABLES
             pdf = itab_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.
                           END-OF-SELECTION
    To download the pdf file as local file
    CALL FUNCTION 'DOWNLOAD'
               EXPORTING
                    bin_filesize     = numbytes
                    filename         = gv_filename
                    filetype         = 'BIN'
                    filetype_no_show = 'X'
               IMPORTING
                    act_filename     = gv_filename
                    filesize         = numbytes
                    cancel           = cancel
               TABLES
                    data_tab         = itab_pdf.
    <b> I think i gave a lot of extra code, but i just gave it for proper understanding.
    Only a few days ago i came across this concept. So had the ready made code.</b>
    <b>Please do reward point if helpful</b>
    Regards
    swetabh

  • Convert SPOOL to BIN format

    Is there any function module to convert spool to BIN format
    Thanks,
    V

    Hi ,
    Try this link:
    https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-GettingPDFfilefromspooling+list
    This is a good example of saving files from splooing list.
    May it helps you.
    Regards.
    DS

  • How to merge 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
    Maybe this document will help you:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    Cheers,

  • 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

  • Need to Download Smartform Data from OTF format to CSV file

    Hi,
      I need to download smartform data from OTF format to CSV file. Is there any Function module to download Smartform data from
      OTF format to CSV file.
    Regards,
    Selvapriya S.

    Not that I know of.  There is a lot of data in the OTF file besides the field values you are printing (formats, headers. positions, fonts, etc).
    You might be able to use the CONVERT_OTF function module and take the default format of 'ASCII'.  Once it is converted to an ASCII data format, you might be able to write some ABAP code to strip off the extraneous data and parse the fields you need.

  • Convert the spool to xls format and email through attachment to the user

    Hi all,
    When I execute a report in background, I get spool. I need to convert the spool to xls format and email through attachment to the user.The xls file should not be saved on local system.
    If I use the Spool Recepient tab in SM37 it mails the spool list as .txt file to the mail receipient. But I need to send it as an .xls file.
    Can any one help me on this

    Did you get the solution? i have the same problem.

  • How to upload a PDF file and convert it to OTF format

    We have come across rquirements like converting OTF to PDF but my requirement is to read a PDF file in SAP and convert it to OTF format for printing.
    Can anyone please help me with the Function Modules to do so.

    Hello,
    Try the following FM:
    CONVERT_OTF Convert SAP documents (SAPScript) to other types.
    Example:
    CALL FUNCTION "CONVERT_OTF"
    EXPORTING FORMAT = "PDF"
    IMPORTING BIN_FILESIZE = FILE_LEN
    TABLES OTF = OTFDATA
    LINES = PDFDATA
    EXCEPTIONS ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    Hope this helps.
    Reward if helpful.
    Regards,
    Vasanth

  • Printing ABAP list in portrate format

    Hi,
      In one of requirement I wanted to print a report
      in portate format on A4 size paper. Report has been created with use of write statement only.
      When I checked print properties it shows only standard some page format(all are landscape).I even tried by creating custom portate format for ABAP list.
    Please anybody suggest the way to take printout of ABAP list in portrate format.
    Thanks in advance,
    Amit R

    Hi Amit,
    check the line count and  line size of your repor. And try with the line size = 80 and line count = 0. Then while printing the page format  will be determined based on these variable to print the report.
    If the report length is lange then you cannot print in the portate format.
    Hope this  will help you.
    Regards
    Satya.

Maybe you are looking for