PDF generation without spool requests

Hi gurus,
Can I generate a PDF document bypassing spool. Is there any way we can create PDF document without sending it to spool. If yes, just let me know about the procedure.
Thanks in advance,
D. Mallick

U can directly download an internal table in PDF format with FM GUI_DOWNLOAD
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                FILENAME                = 'C:\test.pdf'
                FILETYPE                = 'BIN'
           TABLES
                DATA_TAB                = ITAB
           EXCEPTIONS
                FILE_WRITE_ERROR        = 1
                NO_BATCH                = 2
                GUI_REFUSE_FILETRANSFER = 3
                INVALID_TYPE            = 4
                OTHERS                  = 5.
Regards,
Joy.

Similar Messages

  • How to submit a PDF document to spool request by coding

    Hi experts,
    I have a pdf document that is stored somewhere in SAP system, for example MIME repository. So I can read this PDF document and get its content as an xstring.
    I know SAP can print a smartform directly by calling its function module, or submit a program (list output) to SAP-SPOOL to generate a spool request.
    But how can I submit a document or an xstring which presents the content of a document to spool request in order to print it out?
    Or should I do it in some other way?
    Any of the suggestion or hint will be help.
    Thanks!

    We have checked it with SAP and it seems no solution for printing a pdf doc by coding.
    The final workaround is to use an virtual printer or some converter on PC to convert the pages in that pdf document into BMP files. Then upload those BMP files in t-code se78 and build a smartform to include them.
    It is convenient to use the printing function of smartforms in ABAP coding.

  • Generation of Spool Request in F110 automatic payment progrm transaction

    Hi All,
    I am facing a problem of spool request for t-code F110.
    for other transactions like F-58 and FBZ5 the spool request is getting generated.
    but not for F110 t code.
    I am creating a variant for each bank that I am using in F110.
    Seperate cheque printing forms have been customised for the client. One of them is given as default in the FBZP settings. For that particular bank whose cheque printing form has been defined as default in FBZP, I am not specifying the alternate from in the Varint settings for F110. For all other banks I am specifying the Details in the alternate form in the variant for F110
    But still spool request is not getting generated post the print command is given.
    Kindly provide a solution
    Thanks and Best Regards
    Kedar

    Hello
    I think you need to Unflag the print immediately in the variant.
    Thanks
    Assign points if useful

  • ITAB to PDF without spool request

    Hi Experts,
    I have a requirement where I need to convert internal table data into PDF format and send it as an E-Mail with PDF attachment.
    How do I achieve this .
    I dont have any smart form or SCript...
    In Fact I don't want to use SPOOL....
    Is there any way to convert Internal Table to PDF.....
    Please Guide....
    Edited by: Thomas Zloch on Sep 29, 2011 1:50 PM

    Hi,
    try below stuff,
    http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES
    some more info like this at ,
    http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage
    Thanks,
    Chandra
    Edited by: Chandrashekhar Mahajan on Sep 29, 2011 3:25 PM

  • Disabling spool request generation for a purchase order

    Hi,
    I have a requirement as follows :
    In ME22n, according to standard configuration for a purchase order whenever the indicators 'Deliv. compl' or 'invoice flag' is checked or unchecked and saved, a spool request is generated. This spool request can be viewed in messages tab of PO.
    My requirement is to disable the spool request generation on change of the above mentioned indicators.
    I have found a user exit 'EXIT_SAPMM06E_016' which is triggerred on clicking on 'SAVE' of PO.
    I am unable to find the field or structure with which i can disable the generation of spool request.
    Your help is much appreciated!
    Thanks & Regards,
    Richa Aggarwal

    Richa,
    you can replace 101 with your routine number. who said you cannot? in NACE, output procedure
    the code in 101.
    FORM KOBED_101.
      LOOP AT XNAST WHERE KSCHL EQ KOMT1-KSCHL AND
                          OBJKY EQ MSG_OBJKY   AND
                          AKTIV EQ SPACE       AND
                          VSTAT EQ '0'.
        EXIT.
      ENDLOOP.
      CHECK SY-SUBRC NE 0.
      SY-SUBRC = 4.
      CHECK ( KOMKBEA-DRUVO EQ NEU OR KOMKBEA-DRUVO EQ AEND ).
      CLEAR SY-SUBRC.
    ENDFORM.
    *       FORM KOBEV_101                                                *
    FORM KOBEV_101.
      LOOP AT XNAST WHERE KSCHL EQ T683S-KSCHL AND
                          OBJKY EQ MSG_OBJKY   AND
                          AKTIV EQ SPACE       AND
                          VSTAT EQ '0'.
        EXIT.
      ENDLOOP.
      CHECK SY-SUBRC NE 0.
      SY-SUBRC = 4.
      CHECK ( KOMKBEA-DRUVO EQ NEU OR KOMKBEA-DRUVO EQ AEND ).
      CLEAR SY-SUBRC.
    ENDFORM.
    so you can copy the code from these forms, and keep them before your code in your custom routine,.. like:
    FORM KOBED_901. "==> i am creating a new VOFM routine 901 here
      LOOP AT XNAST WHERE KSCHL EQ KOMT1-KSCHL AND
                          OBJKY EQ MSG_OBJKY   AND
                          AKTIV EQ SPACE       AND
                          VSTAT EQ '0'.
        EXIT.
      ENDLOOP.
      CHECK SY-SUBRC NE 0.
      SY-SUBRC = 4.
      CHECK ( KOMKBEA-DRUVO EQ NEU OR KOMKBEA-DRUVO EQ AEND ).
      CLEAR SY-SUBRC.
    "==> from here add your code.
    data:lv_subrc type sy-sibrc.
    if xyz NE asdasd "==> your validations..
    lv_subrc = 4.
    endif.
    sy-subrc = lv_subrc.
    ENDFORM.
    *       FORM KOBEV_901                                                *
    FORM KOBEV_901.
      LOOP AT XNAST WHERE KSCHL EQ T683S-KSCHL AND
                          OBJKY EQ MSG_OBJKY   AND
                          AKTIV EQ SPACE       AND
                          VSTAT EQ '0'.
        EXIT.
      ENDLOOP.
      CHECK SY-SUBRC NE 0.
      SY-SUBRC = 4.
      CHECK ( KOMKBEA-DRUVO EQ NEU OR KOMKBEA-DRUVO EQ AEND ).
      CLEAR SY-SUBRC.
    "==> from here add your code.
    data:lv_subrc type sy-sibrc.
    if xyz NE asdasd "==> your validations..
    lv_subrc = 4.
    endif.
    sy-subrc = lv_subrc.
    ENDFORM.

  • Convert Spool Request in chinese Language to PDF

    kindly help me to solve the issues.
    is there any way to convert the spool request which is in chinese langauge,
    Requirement is to download SAP Script to PDF, where the PDF file should be in Chinese format.
    i used the following FM
    1)CONVERT_OTFSPOOLJOB_2_PDF
    2)CONVERT_ABAPSPOOLJOB_2_PDF
    in the spool the chinese format is visible, but in the PDF instead of the chinese language, v r getting Junk values.
    Thanks in Advance.
    Kesav

    Hi,
    Try executing the Program: 'RSTXPDFT4'.
    This Program will generate a PDF file when spool request is given in the selection screen.
    Regards,
    Ravi Kiran..

  • Convert Spool request to PDF and send as e-mail

    Hi all,
    Can any one please provide me a  sample code for converting spool request to pdf?
    Thanks in advance,
    Suneela.

    HI,
    Try this
    Hi all,
    Can any one please provide me a  sample code for converting spool request to pdf?
    *& 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.
    Reward points if found helpfull....
    Venkoji.

  • Convert ABAP list output to PDF without spool

    Hi All,
    We have used the FM 'CONVERT_ABAPSPOOLJOB_2_PDF' to convert the list output to PDF. It creates the spool number in SP01 and PDF is getting generated.
    But, in our SAP ECC 6.0 server all spools are redirected to printer by default and get printed because it configured like that. We requested BASIS people to reconfigure but they said no for a single report.
    So we need to find the alternate solution to generate the PDF without spool. We have searched in sdn, but didnot get any alternate solution.
    Please help us in this regard.
    Thanks in advance.

    data: begin of i_list occurs 0,
    line(255),
    end of i_list.
    data:i_mara like mara occurs 0 with header line.
    parameters: p_matnr like mara-matnr.
    start-of-selection.
    set pf-status 'PDFFILE'.
    select *
         from mara
         into table i_mara
        where matnr = p_matnr.
    loop at i_mara.
      write:i_mara-matnr,i_mara-ernam,i_mara-pstat.
      endloop.
    at user-command.
    if sy-ucomm = 'PDF'.
    DO.
    READ LINE SY-INDEX.
    IF SY-SUBRC NE 0.
    EXIT.
    ELSE.
    I_LIST = SY-LISEL.
    APPEND I_LIST.
    ENDIF.
    ENDDO.
    NEW-PAGE PRINT ON DESTINATION 'LP03' IMMEDIATELY ' ' COVER TEXT ' ' KEEP IN SPOOL 'X' NEW LIST IDENTIFICATION 'X' LINE-SIZE 132 LINE-COUNT 65 NO DIALOG.
    LOOP AT I_LIST.
    IF I_LIST-LINE IS INITIAL.
    SKIP.
    ELSE.
    at first.
      write: TEXT-001.
      endat.
    WRITE: I_LIST-LINE+0(132).
    ENDIF.
    ENDLOOP.
    NEW-PAGE PRINT OFF.
    data:filename like RLGRAP-filename value 'C:\PDFFILE.PDF'.
    DATA: SPOOL TYPE TSP01-RQIDENT.
    SPOOL = SY-SPONO.
    SUBMIT rstxpdft4
    WITH spoolno = spool
    WITH download = 'X'
    WITH p_file = filename
    AND RETURN.
    if sy-subrc = 0.
    write: 'pdf file generated'.
    else.
      write:'pdf file not generated'.
      EXIT.
      endif.
          endif.
    please paste this code and check once ,if it works modify the code according to ur requirement.
    regards,
    padmaja

  • Always generation of new spool request when using message type WNAK

    Hey!
    I have one question regarding the printout of message type WNAK.
    In SAP standard the print program RWBNASTV and entry routine ENTRY_ABR_NATRAB is used.
    Now I want to ensure that at every printout generates a new spool request.
    Problem is that when a user prints a purchase order and after that a Sett. Crdt Agrmt (WNAK) the second printout is attached to the previous spool.
    How can I ensure that there is always a new spool file generated without copying the print program and the corresponding function modules before OPEN_FORM?
    In the print conditions I only know the function "Immediately print" but that is no help if the printout is attached to the purchase order which was printed before.
    Is there no flag which escpecially ensures that for this message type should be always be generated a new spool request?!?!
    I hope you know something else.
    With kind regards.
    Mark

    I alreadey copied the print program and the function modules but I am still looking for another solution because I think that is not the best solution for the problem.
    I changed following in include LWNPNFO0 (copied to LYWNPNFO0):
    --- Konvertierung der Kommunikationsdaten:                         --
      MOVE-CORRESPONDING pi_nast TO lvs_snast.
      MOVE sy-repid              TO lvf_program.
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
        EXPORTING
          pi_comm_type              = lvs_comm_type
          pi_comm_values            = lvs_comm_values
          pi_screen                 = pi_screen
    pi_newid                  = 'X'
          pi_country                = pi_tocountry
          pi_repid                  = lvf_program
          pi_snast                  = lvs_snast
        IMPORTING
          pe_itcpo                  = lvs_itcpo
          pe_device                 = lvf_device
          pe_mail_recipient         = lvs_recipient
          pe_mail_sender            = lvs_sender
        EXCEPTIONS
          comm_type_not_supported   = 1
          recipient_creation_failed = 2
          sender_creation_failed    = 3
          OTHERS                    = 4.
      IF sy-subrc <> 0.
        MOVE sy-subrc TO po_retcode.
        PERFORM error_message_arrang_append_sy TABLES ptx_error_messages
                                                    USING  pi_kona
                                                           dummy_vake.
      ENDIF.
      CHECK po_retcode = 0.
    *--- Öffnen des Formulars:
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          archive_index  = toa_dara
          archive_params = arc_params
          device         = lvf_device
          dialog         = ' '
          form           = pi_formular
          language       = pi_nast-spras
          OPTIONS        = lvs_itcpo
          mail_sender    = lvs_sender
          mail_recipient = lvs_recipient
        EXCEPTIONS
          canceled       = 1
          device         = 2
          form           = 3
          OPTIONS        = 4
          unclosed       = 5
          mail_options   = 6
          archive_error  = 7
          OTHERS         = 8.
      IF sy-subrc NE 0.
    Edited by: Mark Müller on Jul 30, 2009 10:36 PM

  • Problem in converting Spool Request into PDF format

    Hi,
      I am facing problem to convert spool request (which store output of sap script) in to PDF format. Actually I have converted it with function module 'CONVERT_OTFSPOOLJOB_2_PDF' and it is working properly but the problem occurs where the BOLD fonts are used. I am unable to see the Text/Address where i have used Bold Font in script (PDF FORMAT). Even though in (SPO1) spool request shows every thing perfectly (along with Bold Font). It will great if you could suggest me something.
    Thanks,
    Pradeep

    Hi Pradeep,
    Use ,
    Closing the Sapscript, we save data (OTF) in a table
    CALL FUNCTION 'CLOSE_FORM'
    TABLES
    otfdata = t_otfdata
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    OTHERS = 5.
    DATA: BEGIN OF t_otfdata2 OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA: END OF t_otfdata2.
    Move OTF data to another table with lenght 255
    LOOP AT t_otfdata.
    CONCATENATE t_otfdata-tdprintcom t_otfdata-tdprintpar INTO t_otfdata2.
    APPEND t_otfdata2.
    ENDLOOP.
    Convert OTF format to PDF
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = 'OTF'
    format_dst = 'PDF'
    devtype = 'PRINTER'
    FUNCPARA =
    len_in = len_in
    IMPORTING
    len_out = len_out
    TABLES
    content_in = t_otfdata2
    content_out = t_pdfdata
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    Have a look at Progs. RSTXPDF4 and RSTXPDFT2 for converting the Spool to PDF.
    Regards,
    Raj
    Message was edited by: Rajasekhar Dinavahi
    Message was edited by: Rajasekhar Dinavahi

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

  • Converting the spool request to PDF format

    Dear All ,
    I am using RSTXPDF4 to convert a spool request to PDF format , when I execute this program by giving the spool number and dstdevic as Local , its giving   the message as " Spool request XXXXX with PDF data created ".
    But the problem is when I open this spool request its printing the Junk characters ..!!!
    What could be the problem ?
    Please give me the solution for this...
    Thanks in advance.

    Hi Prem ,
    I have checked the tranx SCOT there I have  found the following settings..
    Output  Dev Type              USE
    format
    PCL     HPLJIIID     Not Yet Used in Node Maintenance
    PDF     PDF1             Already Used in Node Maintenance
    PS     POST2             Not Yet Used in Node Maintenance
    TXT     ASCIIPRI     Already Used in Node Maintenance
    Is this OK ...or am I need to do any changes in the settings...??
    One more thing when I tries to give this PDF1 Dev type in my RSTXPDF4 input parameters its not taking !!!
    Please help...

  • Converting spool request into PDF forms

    Hi gurus
    i am working on upgrade project from 4.6C to ECC 6.0. Business had the functionality developed in 4.6C to " Convert the spool request into PDF forms and can be downloaded into local PC".
    Moving to ECC 6.0, is there any standard functionality available in ECC 6.0 to "Convert spool request to PDF forms and download"?
    Any help towards this is appreciable.
    Thanks
    Aleem

    Hello,
    Yes. The program is RSTXPDFT4.
    Sourabh

  • How to convert spool request to pdf format (to send mail) - SAP 3.1H

    Hi,
       I am working in 3.1H version. How to convert spool request into pdf cormat to send a mail?. Spool request is in TEXT format.
    regards,
    sundaram J.

    Hi sundaram,
    1. I suppose u know how to send
        mail with attachment.
    2. If that is the case,
       then no need to do anything.
    3. Bcos
       There is setting in SCOT,
       for INTERNET
       ABAP List ---> PDF
       Raw TEXT  -
    PDF
      (Your basis team will help u)
    4.  text data will get automatically converted
       to pdf and get mailed.
    regards,
    amit m.

  • I want read PDF file from SAP directory and create a spool request or print

    Hi all,
    I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body  help me in this.
    Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
    Thanks in advance,
    Sunny

    Hi Sunny,
    Check these links.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    http://www.erpgenie.com/sap/abap/pdf_creation.htm
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

Maybe you are looking for

  • Photos in library missing from Events? I have a solution

    This is a continuation from an answered question here: https://discussions.apple.com/message/15830476#15830476, but with a new twist and a solution that I found myself. Hope it helps others: After doing a corrupt library rebuild, I noticed some photo

  • How to manually update Acrobat 9 in Windows 7

    In Windows 7, autoupdating  or  updating by Help>check for updater does not work. So I downloaded 5 incremental updaters from Acrobat download page. But none of them allowed me to updated.  Instead,  I got an error (see the attachment). Please advise

  • Js-confirm box with request and passing value: incorrect url

    Hi folks! Scenario: User clicks on link-column field in tablular form, Confirm box pops up with a confirmation message, with "OK" generates a request and should pass a value from the form into an item for further processing. The URL in the column lin

  • RosettaNet Plug in with Collaborate 1.0

    Has anyone gotten the RosettaNet plug in for Collaborate 1.0 to work? First I had problems with the deployment descriptor files for the EJBs. There was a problem with the weblogic-ejb-jar.dtd file. Now I'm having problems opening the jar files when s

  • Apex With AJAX Tutorials

    hi, i want to use ajax with apex.Please tell me some AJAX tutorials.