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

Similar Messages

  • How can I convert a report/ ALV in PDF format?

    Can you tell me how can I convert a report or ALV in PDF format?
    Regards,
    Subhasish

    hi ,
    check this..
    *& Report  ZSPOOLTOPDF                                                 *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program must be run as a background job in-order for the write *
    *& commands to create a Spool request rather than be displayed on      *
    *& screen                                                              *
    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Write statement to represent report output. Spool request is created
    if write statement is executed in background. This could also be an
    ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    Alternative way could be to submit another program and store spool
    id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
           to sap-spool
           spool parameters   %_print
           archive parameters %_print
           without spool dynpro
           and return.
    Get spool id from program called above
    IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
        if p_delspl EQ 'X'.
          PERFORM delete_spool.
        endif.
        IF sy-sysid = c_dev.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
        ENDIF.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      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.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
          FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    regards,
    venkat.

  • Converting oracle reports output  to excel format

    i am using Report Builder 9.0.2.0.3, and want to view the results of the report in excel format. I have gone through many discussion forums and don't wish to use the rep2excel software,as suggested in those forums. I wish to know, at the earliest in what way can this be achieved.

    Hello,
    Since Reports 9.0.2 , it is possible to execute a Reports as a JSP
    Go to :
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    Click on the link "Output to Excel with Oracle9i Report"
    (This slideshow steps you through creating Excel output from Oracle9i Reports.)
    Regards
    Message was edited by:
    dsegard

  • Reg: Convert the currency value into word formate.

    HI all,
    Is there any FM to convert the currency into word formate.
    Ex: 210
    o/p: two hundreden twenty ruppes..

    Hi,
    Try
    SPELL_AMOUNT
    also HR_IN_CHG_INR_WRDS
    Regards,
    Sachin

  • To convert a crystal report into word(*.doc) format

    Dear members,
    I have designed and generated a report using crystal as tool,but
    i want to convert this report into Microsoft word format(*.doc).
    Can anybody please help me in this regard?
    Thanks and regards,
    Venkatesh.R

    Hi
    Simple way is to you use Cristal Reports Designer: you can use CR Report convertion function.
    File/Export/Export Report... choose Word Document (rtf) modificable what can be opened with Word and saved how Word Document (.doc).
    Other way:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Dim CrxReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrxReport.ExportToDisk(CrystalDecisions.[Shared].ExportFormatType.RichText, _
                                        "c:\open_me_with_word.rtf")
    HTH
    Regards
    Sierdna S.
    Edited by: Sierdna S on Sep 24, 2008 12:49 PM

  • Converting a report into other format

    Hello everybody,
    I'm having a problem when I try to convert any report to any other format.
    From the report previewer I click the command at File\Generate to File, and whatever format I choose (PDF, HTML, RTF, ...), a Save dialog box appears to enter the file name. I enter the file name and click "Save". I always get an error message "Unimplemented Error", and the conversion doesn't perform.
    Could anybody help me, please.
    Note: At the server side I have Windows 2000 Server and Oracle 9i, and at the workstation side I have Windows XP and Oracle Forms/Reports Builder 6i.

    Hello,
    This problem has been reported as a bug in the First versions of Reports 6i.
    It has been fixed in the Patchset 3.
    Have you applied the latest patchset available for Reports 6i ?
    Regards

  • 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

  • Converting simple report output to PDF print layout issue

    Hi all,
    I am converted one report output to PDF format, it is working fine in one DEV sever, but when we moved it to other server the layout of output preview & font size  is not coming properly (as same in DEV server)  in the new server. I am using the below code, please check & correct me if anything is wrong.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
          EXPORTING
            copies                 = '1'
            cover_page             = space
            destination            = 'LOCL'
            expiration             = '1'
            immediately            = space
            mode                   = space
            new_list_id            = 'X'
            no_dialog              = 'X'
            user                   = sy-uname
            line_size              = 200
            line_count             = 65
    *        layout                 = 'Z_65_230'
            layout                 = 'X_58_170'
            sap_cover_page         = 'X'
          IMPORTING
            out_parameters         = mstr_print_parms
            valid                  = mc_valid
          EXCEPTIONS
            archive_info_not_found = 1
            invalid_print_params   = 2
            invalid_archive_params = 3
            OTHERS                 = 4.
        IF sy-subrc EQ 0.
    **--Creating Spool Request.
          CALL FUNCTION 'JOB_OPEN'
            EXPORTING
              jobname          = lv_job_name
            IMPORTING
              jobcount         = lv_job_count
            EXCEPTIONS
              cant_create_job  = 1
              invalid_job_data = 2
              jobname_missing  = 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.
          ELSE.
    **--Submitting the Report & Get the Output.
            SUBMIT  zpsr_submit_prcng WITH SELECTION-TABLE t_ebeln TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                                  SPOOL PARAMETERS mstr_print_parms
                                  USER             sy-uname         " User for runtime authorizations
                                  VIA JOB          lv_job_name
                                  NUMBER           lv_job_count
                                  AND RETURN.
            IF sy-subrc <> 0.
              MESSAGE ID    sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH  sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
              CALL FUNCTION 'JOB_CLOSE'
                EXPORTING
                  jobcount         = lv_job_count
                  jobname          = lv_job_name
                  strtimmed        = 'X'
                IMPORTING
                  job_was_released = lv_job_released.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
    Thanks & Regards
    Avish
    Moderator Message: Please use code tags when pasting code snippets. Also paste relevant portions of the code
    Edited by: Suhas Saha on Jul 13, 2011 3:05 PM

    Dear Alexander,
    Thanks for the reply.
    In this I am using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'. I have checked the settings from SPAD that is also same in both servers for particular output device. But the patches are diffrennt in both the servers, the server from which layout is not coming properly having the high level patches in compare to the other server(which is working fine).

  • Problem to export a report (to PDF) after converting my reports to CR13

    I have an old project with reports developped using Crystal Reports for Visual Studio 2003 (.NET 1.1). I want to convert them so I can now use Crystal Reports for Visual Studio 2010 (with .NET 3.5).
    I installed Crystal Reports for VS2010 and I converted my reports to the new format. Unfortunately, one of my reports is not working anymore.
    My ASP.NET application generate the report and export it as a PDF. I use CrystalDecisions.CrystalReports.Engine.ReportDocument.Export().
    Everytime I run this method, an exception is thrown...
    System.Exception was unhandled by user code
      Message=System.Runtime.InteropServices.COMException (0x80041004):
    Mémoire insuffisante pour l'opération.
       à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       à CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
       à CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
       à
      Source=GSPRapport
      StackTrace:
    I also tried to export the report (using PDF format) at design time with the "Export Report" button in Preview mode. It didn't work. But, I can export the report at design time using another format type (like XML).
    The old version of te report (using .NET 1.1, CR9) work fine. As I said, other reports in that same project work perfectly.
    Is someone have an idea of what's wrong!
    Thanks!
    Max.

    The most common cause of this problem is having very large detailed images, or lots and lots of images in your report. The Crystal Report engine changed a lot from 9.1 to 13. The big change was from 9.1 to 10 though when we started using the RAS InProc engine.
    The Crystal reporting engine is not efficient at handling the images and it can cause memory issues like you are seeing. As a test, try suppressing the images that show up frequently in your report and retry your export. If it works you'll have your answer and you'll need a new creative way to design your report without so many images.

  • Retrieve mail pdf attachment in xstrinf or otf format.

    Hi,
    as in the Subjesct I must retrieve from mail the attachments that are in pdf format and convert then in xstring or otf format, then archive the documents in DMS server.
    It's possible?
    Thanks for answers.

    Hi,
    In SAP we execute function SX_OBJECT_CONVERT_OTF_PDF which generates binary context for a PDF document.
    Or check the below code
    data: l_pdf_xstring  type xstring,
            lt_lines       type table of tline,
            ls_line        type tline,
            l_pdf_len      type i,
            itab           type TSFOTF,
            witab          type ITCOO,
            tmp_line       type STRING,
            tmp_header     type STRING.
      tmp_header = 'BSP to PDF'.
      tmp_line = file_content.
      CONCATENATE
        tmp_header
        tmp_line
      INTO tmp_line IN CHARACTER MODE.
      APPEND tmp_line TO itab.
      call function 'CONVERT_OTF'
           exporting
             format                      = 'PDF'
           importing
             bin_filesize                = l_pdf_len
             bin_file                    = l_pdf_xstring
          tables
             otf                         = itab
             lines                       = lt_lines
           exceptions
             err_max_linewidth           = 1
             err_format                  = 2
             err_conv_not_possible       = 3
             err_bad_otf                 = 4
             others                      = 5
      if sy-subrc EQ 0.
        response->set_header_field( name  = 'content-type'
                                    value = 'application/pdf' ).
        response->set_header_field(
                           name  = 'cache-control'
                           value = 'max-age=0' ).
          response->set_header_field(
                             name  = 'content-disposition'
                             value = 'attachment; filename=test.pdf' ).
        l_pdf_len = xstrlen( l_pdf_xstring ).
        response->set_data( data   = l_pdf_xstring
                            length = l_pdf_len ).
        navigation->response_complete( ).
      ENDIF.
    Edited by: Raj on Jul 26, 2010 2:02 PM

  • Report for converting the documents into the PDF format.

    Hello Experts,
    I need to know if any report/ T-code is available in SAP to convert the files into  PDF format.
    We are processsong these PDF's then into IXOS system.
    Regards,
    Anna.

    Hello ,
    You may check with the below programs:
    Program name                   Report title
    RSTXCPDF                       Routines for Converting OTF Format to PDF Format
    RSTXPDF2                       Administration/Upload of type 1 and TrueType font files
    RSTXPDF3                       Customizing for OTF-PDF Conversion
    RSTXPDF4                       Help Report from CONVERT_OTFSPOOLJOB_2_PDF
    RSTXPDF5                       Help Report from CONVERT_ABAPSPOOLJOB_2_PDF
    RSTXPDFT                       Test report for PDF conversion - converting standard texts to PDF
    RSTXPDFT2
    RSTXPDFT3                      Test
    RSTXPDFT4                      Convert SAPscript (OTF) or ABAP Lists Spool Job by PDF
    RSTXPDFT5                      Test: GUI Download of Spool Request
    Regards
    Ramesh Ch

  • Converting raw data from memory to OTF format

    hi all,
         i have a requirment where i need to submit a report and move the corresponding output to memory get the same back in OTF format and export it in an RFC.  i tried using different function modules but could not find the exact where i can convert from memory to OTF format or directly at the time of submit can store it in OTF format.
          tried converting list to asci but could not get the same report output,
    thanks,
    raju,

    Hi krishnam,
    You can try this function module
    SX_OBJECT_CONVERT_OTF_RAW
    Regards
    Sumit Bhutani

  • Classical List to ALV format in sap abap report

    Hi All,
    I have a requirement to change the existing abap report in which teh output is dispalyed in classical list format.
    I want to convert this list report output into ALV format.
    COuld anyone please help me how to convert this from Classical list to ALV format?
    Thanks,
    Komal.
    Moderator message: sorry, this not the place to teach the basics, please search for available information. If you understand the classical list and how to use ALV, then you can also do the transfer yourself.
    Edited by: Thomas Zloch on Aug 12, 2011 4:44 PM

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • Hi my question abt 2 convert a list into pdf format

    hi
    experts
    i had problem to convert displayed list into pdf format showing an error cannot open the file file format not supported, but i am have downloaded the file in .pdf format
    please help me
    thank you all

    Hi,
    check out this program. this might help:
    report zabap_pdf.
    tables:
      tsp01.
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i,
      mi_rqident       like tsp01-rqident.
    *-- INTERNAL TABLES
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    *-- SELECTION SCREEN
    parameters:
      p_repid like sy-repid, " Report to execute
      p_linsz like sy-linsz default 132, " Line size
      p_paart like sy-paart default 'X_65_132'.  " Paper Format
    start-of-selection.
    concatenate 'c:\'
                p_repid
                '.pdf'
      into mc_filename.
    *-- Setup the Print Parmaters
      call function 'GET_PRINT_PARAMETERS'
       exporting
         authority= space
         copies   = '1'
         cover_page                   = space
         data_set = space
         department                   = space
         destination                  = space
         expiration                   = '1'
         immediately                  = space
         in_archive_parameters        = space
         in_parameters                = space
         layout   = space
         mode     = space
         new_list_id                  = 'X'
         no_dialog= 'X'
         user     = sy-uname
       importing
         out_parameters               = mstr_print_parms
         valid    = mc_valid
       exceptions
         archive_info_not_found       = 1
         invalid_print_params         = 2
         invalid_archive_params       = 3
         others   = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      if mstr_print_parms-pdest = space.
        mstr_print_parms-pdest = 'LOCL'.
      endif.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      mstr_print_parms-linsz = p_linsz.
      mstr_print_parms-paart = p_paart.
      submit (p_repid) to sap-spool without spool dynpro
                       spool parameters mstr_print_parms
                       via selection-screen
                       and return.
    *-- Find out what the spool number is that was just created
      perform get_spool_number using sy-repid
                 sy-uname
        changing mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid= mi_rqident
          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.
    call function 'DOWNLOAD'
         exporting
              bin_filesize            = mi_bytecount
              filename                = mc_filename
              filetype                = 'BIN'
         importing
              act_filename            = mc_filename
         tables
              data_tab                = mtab_pdf.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    form get_spool_number using f_repid
         f_uname
                    changing f_rqident.
      data:
        lc_rq2name like tsp01-rq2name.
      concatenate f_repid+0(8)
                  f_uname+0(3)
        into lc_rq2name separated by '_'.
      select * from tsp01 where  rq2name = lc_rq2name
      order by rqcretime descending.
        f_rqident = tsp01-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear f_rqident.
      endif.
    endform." get_spool_number

  • 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.

Maybe you are looking for