Conversion of spool to pdf format in landscape mode

Hi All,
I have a requirement where I need to print the output from a spool request in SAP to a pdf page .
The page has to be in landscape format.  Is it possible to create a pdf page which is always in landscape format?
I am using FM convert abapspool 2pdf for conversion of spool to pdf.
Does this require any setting from BASIS end?
Any ideas/thoughts are welcome..
Thanks -
Harmeet Singh.

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,
                      p_sender LIKE somlreci1-receiver,
                               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 appikonda

Similar Messages

  • Conversion of sap spool to pdf page in landscape mode.

    Hi All,
    I have a requirement where I need to print the output from a spool request in SAP to a pdf page .
    The page has to be in landscape format.  Is it possible to create a pdf page which is always in landscape format?
    I am using FM convert abapspool 2pdf for conversion of spool to pdf.
    Does this require any setting from BASIS end?
    Any ideas/thoughts are welcome..
    Thanks -
    Harmeet Singh.

    hi,
    plz check the exporting or importing options of FM so that u can change the page format in the PDF.
    please reward me if useful.
    gupta

  • 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

  • Converting Spool to Pdf format

    Hi,
    How do you convert a SAP Script Spool in TCode SP01 to a pdf format?
    Any helpw would be greatly appreciated.
    Thanks in advance.
    Mick

    Just today someone has posted this link somewhere
    https://wiki.sdn.sap.com/wiki/display/sandbox/Conversion%20of%20Spool%20Request%20Data%20into%20PDF%20and%20Excel%20Format%20and%20Send%20it%20into%20Mail

  • In spool to pdf format i am not getting the entire recod

    i am converting spool data into pdf format using the std program RSTXPDFT4 but i am not getting the entire data, the data is getting truncated side ways ie entire record is not getting generated.
    in the main prg is rstxpdf4 i have given line-size to 512, even thou, i am not getting the entire record

    Try the following:
    SELECT u_permit.DATE_APPLICATION_RECEIVED, u_permit.permit_status
      FROM U_PERMIT
    WHERE u_permit.date_application_received BETWEEN to_date('01/21/2008') AND to_date('12/31/2008')
       AND trim (upper(u_permit.permit_status)) = 'PENDING' ;You can also apply a date format in the TO_DATE if needed.
    eg:
    to_date('01/21/2008','dd-mon-yyyy')Hope this helps.
    Craig...

  • Conversion of smf to pdf format

    Hi ,
    I want to convert smartform (smf format) into pdf format. Please let me know which Function module I can use for this.
    Thanks,
    Sushant Singh

    hi
    refer this porgram
    *& Report  ZTEST_NREDDY1
    REPORT  ztest_nreddy1 NO STANDARD PAGE HEADING.
    DATA: it_otf   TYPE STANDARD TABLE OF itcoo,
          it_docs  TYPE STANDARD TABLE OF docs,
          it_lines TYPE STANDARD TABLE OF tline,
          st_job_output_info      TYPE ssfcrescl,
          st_document_output_info TYPE ssfcrespd,
          st_job_output_options   TYPE ssfcresop,
          st_output_options       TYPE ssfcompop,
          st_control_parameters   TYPE ssfctrlop,
          v_len_in                TYPE so_obj_len,
          v_language              TYPE sflangu VALUE 'E',
          v_e_devtype             TYPE rspoptype,
          v_bin_filesize          TYPE i,
          v_name                  TYPE string,
          v_path                  TYPE string,
          v_fullpath              TYPE string,
          v_filter                TYPE string,
          v_uact                  TYPE i,
          v_guiobj                TYPE REF TO cl_gui_frontend_services,
          v_filename              TYPE string,
          v_fm_name               TYPE rs38l_fnam.
    CONSTANTS c_formname          TYPE tdsfname VALUE 'ZTEST'.
    CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
      EXPORTING
        i_language    = v_language
        i_application = 'SAPDEFAULT'
      IMPORTING
        e_devtype     = v_e_devtype.
    st_output_options-tdprinter = v_e_devtype.
    *st_output_options-tdprinter = 'locl'.
    st_control_parameters-no_dialog = 'X'.
    st_control_parameters-getotf = 'X'.
    .................GET SMARTFORM FUNCTION MODULE NAME.................
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = c_formname
      IMPORTING
        fm_name            = v_fm_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ...........................CALL SMARTFORM............................
    CALL FUNCTION v_fm_name
      EXPORTING
        control_parameters   = st_control_parameters
        output_options       = st_output_options
      IMPORTING
        document_output_info = st_document_output_info
        job_output_info      = st_job_output_info
        job_output_options   = st_job_output_options
      EXCEPTIONS
        formatting_error     = 1
        internal_error       = 2
        send_error           = 3
        user_canceled        = 4
        OTHERS               = 5.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    .........................CONVERT TO OTF TO PDF.......................
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = v_bin_filesize
        TABLES
          otf                    = st_job_output_info-otfdata
          doctab_archive         = it_docs
          lines                  = it_lines
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ........................GET THE FILE NAME TO STORE....................
      CONCATENATE 'smrt' '.pdf' INTO v_name.
      CREATE OBJECT v_guiobj.
      CALL METHOD v_guiobj->file_save_dialog
        EXPORTING
          default_extension = 'pdf'
          default_file_name = v_name
          file_filter       = v_filter
        CHANGING
          filename          = v_name
          path              = v_path
          fullpath          = v_fullpath
          user_action       = v_uact.
      IF v_uact = v_guiobj->action_cancel.
        EXIT.
      ENDIF.
    ..................................DOWNLOAD AS FILE....................
      MOVE v_fullpath TO v_filename.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = v_bin_filesize
          filename                = v_filename
          filetype                = 'BIN'
        TABLES
          data_tab                = it_lines
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDIF.

  • Convert spools to Pdf format

    Hi,
    I know a standard program  RSTXPDFT4 which converts a single spool to PDF.
    Do we have any thing for multiple spools? My requirement is I will key in Spool numbers via Selection options and I want Pdf file separetly to be dumped for each file
    in to folder on to my hard drive.
    Regards
    Vara

    You can start with this:
    PARAMETERS: spoolid LIKE tsp01-rqident OBLIGATORY.   "DEFAULT 9429.
    DATA BEGIN OF pdf_table OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA END   OF pdf_table.
    DATA pdf_fsize TYPE i.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
         EXPORTING
              src_spoolid   = spoolid
              no_dialog     = 'X'
         IMPORTING
              pdf_bytecount = pdf_fsize
         TABLES
              pdf           = pdf_table
         EXCEPTIONS
              OTHERS        = 0.
    CALL FUNCTION 'DOWNLOAD'
         EXPORTING
              bin_filesize = pdf_fsize
              filetype     = 'BIN'
         TABLES
              data_tab     = pdf_table.
    Rob

  • Create PDF export in landscape mode

    Hello!
    I am searching for a possibility to export a Xcelsius 2008 presentation to PDF in landscape mode. All exports are in portrait mode and I can`t find any settings within Xcelsius 2008 to change it.
    Does anyone know how to do it?
    Thanks in advance,
    Christian

    Hello Christian,
    As far as I know there is no possibility to have an influence on the appearance of the PDF.
    But you can export the dashboard as *.swf and use Adobe Acrobat to implement the dashboard in whatever format into a PDF.
    Regards,
    Ralf

  • Can a PDF file in landscape mode have two pages open at once

    I notice when I use ibooks to read a pdf document on my ipad that in normal mode it woks just like a book with one page open, but when I turn to landscape mode, the document just greatly reduces in size, and centers on the screen, where as a book opens two pages side by side, that still turn like a normal book. Is there any way or app that will allow a PDF document to act like a book does in landscape mode, where two pages are open at once side by side and still a decent size. I know it will have to be smaller than it would be in regular mode, but a book works great in Landscape mode.

    Get a free DropBox account.
    Drag the files into DropBox and you can get a link to send to your friend to download.
    Another option with DropBox is to use a Shared folder. If you share files a lot with your friend, setup a Shared folder and everything in the folder will be shared. Obviously they also need to setup a free DropBox account (works on Windows). Just keep the folder size under the 2GB free limit.
    For the future... OS X Yosemite Mail coming this fall, will offer a way to share files like DropBox.
    Mail Drop allows you to attach large files via iCloud.
    Attachments can be up to 5GB in size. -new feature in OS X 10.10 Yosemite Mail

  • Filling out PDF forms in Landscape Mode

    I have used Preview to fill out PDF forms in Portrait mode and it's very nice because I can save the modified file and email it to others, or just keep it for reference. Anyway, I downloaded a PDF form and tried to fill out the text. It highlights the form fields just right, with the blue glowy rectangle and everything, and when I type in the text it appears just fine, until that field loses focus, then the text goes goofy--it shows up starting at the right hand side of the field and goes in the wrong direction. It's as if Preview still thinks that the PDF is in portrait mode even though it's in landscape mode. Do you know what I'm doing wrong or if there's a fix out there?

    http://www.graniteschools.org/C13/Professional%20Growth%20and%20Evalua/Document% 20Library/SEWE20050602.pdf

  • How to do Landscape style in PDF format.

    Hi, i encountered the problem with doing Landscape style for my report, and export the report in PDF format with Landscape, any tips? Thanks.
    Joe

    Hi,
    Check the below link you will get step by step procedure for your issue.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    Cheers!!
    VEnk@

  • Problem in converting Spool to PDF file, having non-English characters

    Hi All,
            I have problem in converting Spool to PDF format.
    Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF  FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
    I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
    Regards,
    Navin.

    Hi All,
            I have problem in converting Spool to PDF format.
    Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF  FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
    I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
    Regards,
    Navin.

  • Spool to pdf to email

    hi gurus
    I have used function module CONVERT_ABAPSPOOLJOB_2_PDF  for converting  spool to pdf format , now i need to send email using methods and class ( not with FM SO_DOCUMENT_SEND_API1 ) .
    iam useing
    TRY.
        -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
          CALL METHOD document->add_attachment
            EXPORTING  i_attachment_type = 'RAW'
                       i_attachment_subject = 'My attachment'
                     <b>  i_att_content_hex    = gti_contents_hex.</b>
          CALL METHOD send_request->set_document( document ).
          sender = cl_sapuser_bcs=>create( sy-uname ).
          CALL METHOD send_request->set_sender
            EXPORTING
              i_sender = sender.
          recipient = cl_cam_address_bcs=>create_internet_address(
                                            '[email protected]' ).
        add recipient with its respective attributes to send request
          CALL METHOD send_request->add_recipient
            EXPORTING
              i_recipient = recipient
              i_express   = 'X'.
          CALL METHOD send_request->set_send_immediately( 'X' ).
        ---------- send document ---------------------------------------
          CALL METHOD send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = sent_to_all ).
          IF sent_to_all = 'X'.
            WRITE text-003.
          ENDIF.
          COMMIT WORK.
        CATCH cx_bcs INTO bcs_exception.
          WRITE: 'Fehler aufgetreten.'(001).
          WRITE: 'Fehlertyp:'(002), bcs_exception->error_type.
          EXIT.
      ENDTRY.
    In the above code iam unable to convert pdf( out put of FM) out to gti_contents_hex.
    rewarded with points

    Hi,
    plz check the below link..
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    reward if helpful.
    Regards,
    Nagaraj

  • Downloading spool to PDF background

    Hi friends
    How can i downlaod spool to PDF format in back gorund.
    i know we cna download background into server as we required in PDf format.
    i am able to downlaod but when i go to AL11 tcode and open i am not able to see in PDF format..
    is there any way to downlaod to front end PC through back ground ..
    if the file store in application server how user can view the PDF document.
    Please help

    Hi Ramesh,
    Check the Sample programs:
    RSTXPDFT4
    RSTXPDFT5
    The FM is: CONVERT_ABAPSPOOLJOB_2_PDF
    check this link as well.
    http://help.sap.com/saphelp_47x200/helpdata/en/85/54c73cee4fb55be10000000a114084/frameset.htm
    <b>Reward points if this helps.
    Manish</b>

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

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

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

Maybe you are looking for

  • Adobe Premiere Pro CC does not open project - just hangs, no error message

    I've just finished editing a project in PP CC, saved it, then tried to reopen it and the program shows a blank page, then hangs.  I get no error message. The project is based off a PP 5.5 timeline.  It updates fine (and in fact I can open and convert

  • Xcelsius with SAP R/3 Datasource

    Hello, I want to create Xcelsius Dashboard based on SAP R/3 Data. I have no possibility to access on a Business Warehouse. So I thought, I can create a suitable Crystal Report and create a connection on Xcelsius to this report. Now I read that Live O

  • Can't create PDF from Scanner

    If I launch Acrobat 9 (all updates applied) of CS5, select "Create new PDF" -> "From Scanner", the HP OfficeJet 6500 scanner scans multiple pages (with page feeder) and then nothing happens. Nothing. The program window is empty: http://screencast.com

  • Generating wsdl for the adapters in soa 11g

    Hi, how can we generate a wsdl only for the adapter that we use in soa 11g?? for eg.. my scenario is frm the previous posts it was said that we need to generate the wsdl for the adapter and should import it in OSB for proxy services... (so this is in

  • Flex Time and Groupings

    Is there a way of keeping Flex Timing from editing all the tracks that are within the same grouping other that removing the group from the track being modified? I think it's a great idea for Flex Timing to modify all grouped tracks simultaneously, bu