PDF document in Spool

Hello all,
I have a PDF document in spool. I want to read this and archive it. I tried using CONVERT_ABAPSPOOLJOB_2_PDF but in this case the spool already contains a PDF document and I am assuming this function only helps if its some kind of ABAP report or something (to convert to PDF). In this particular case PU19 is run for generating a PDF document. Can we still use this function? or is there any other function available?
thanks

Hi Narshimha,
Thanks for the reply. What is the way to read this PDF document. I think its enough if I can read this PDF document from spool into a text or binary foramt then I can use the ARCHIVOBJECT_CREATE_TABLE function to archive it. However I am not able to read this PDF document from spool. If use CONVERT_ABAPSPOOLJOB_2_PDF and archive I am not seeing any PDF document in the archive. I am not sure if this function is really reading the PDF document.
thanks...

Similar Messages

  • Problem in getting complete display in pdf document from spool

    Hi,
    I have a report1 which calls another report2 in the background. The report2 which is run in the background produces some output and thus generated a spool.
    Report1 then gets the spool number generated from report2 and converts it to a pdf document .
    The problem is that the complete width of data in spool is not coming on pdf.
    Forex , if the spool contains following records:
    1. AAAAAAAABBBBBBBBBBCCCCCCCCCCCCCDDDDDDDDDDDDD
    2. SSSSSSSSEEEEEEEEEETTTTTTTTTTTTTTTTTUUUUUUUUUUUUU
    when this is converted to pdf, the pdf doc will display data as:
    1. AAAAAAAABBBBBBBB
    2. SSSSSSSSEEEEEEEE
    Complete width is not coming in the pdf document.
    Any ideas on how to resolve this issue? Can this be handled by ABAP or BASIS team needs to be include to solve this..All ideas are welcome...
    Harmeet Singh.

    Hi,
        Im also facing the same problem of truncation.
         can someone please reply back if there's a solution ?
    Thanks
    Sourav

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

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

  • HP Laserjet pro p1102 kills spooler when printing PDF documents

    I have a HP laserjet pro p1102 running on Win7 63x PC.
    When I print PDF documents nothing happens on the printer side.
    Instead the spooler is killed.
    When checking the spool file I can see that the documents have been spooled to the printer.
    New driver install done, aswell as firmware upgrade.
    Acrobar pro 11.0.07.
    Please assist.

    Hi @UFS-HYRAX,
    I see by your post that when printing a PDF the Print Spooler Crashes. I can help you.
    Do you have the same results when printing something else, other then a PDF?
    Clear the Spool folder and restart the Print Spooler.
    How to Clear Current Print Queue In Windows Vista & Windows 7.
    Run the Adobe Updates, the latest version is 11.0.09.
    Print the PDF file as an "image".  From the Adobe print screen, select the button "Advanced",  on that screen you see the box for "print as image". Click on that check it. This should resolve the issue.
    If you need further assistance, just let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Issue with getting the entire spooled job into the pdf document

    Hi All,
    My scheduled job runs fine and completes successfully but it appears to have some issues with getting the entire spooled job into the pdf document which it sends to a an end user.Has anyone encountered it before.Your kind assistance would be appreciated.
    Thank you.
    Regards,
    John

    Hi,
    Please read below link for your query:-
    http://help.sap.com/saphelp_nw04/helpdata/EN/85/54c73cee4fb55be10000000a114084/content.htm
    Regards,
    Anil

  • Download spool to PDF document on application server

    Hi,
    I am using function CONVERT_OTFSPOOLJOB_2_PDF to convert a sapscript spool and then downloading the internal table provided to a pdf file on the application server. The sapscript form contains company logos.
    After transferring the file from the application server to PC and then opening the pdf document I get the following message:
    "There was an error while trying to parse an image."
    The PDF doc contains everything except the company logo.
    I noticed that this works (i.e. company logo is present in the downloaded file) when I transfer the internal table that contains the PDF contents onto my PC using GUI_DOWNLOAD using mode 'BIN'. However, when I transfer the contents of the same internal
    table to a file on the application server using abap statement:
    'Open Dataset <filename> FOR OUTPUT IN BINARY MODE'
    I get the problem described above.
    I noticed that SAP has provided standard program RSTXPDFT4 to convert a spool and download it into a PC file. However is there a similar program that downloads a spool onto the application server? Perhaps there is a 'special' way in downloading PDF documents onto the application server?
    I don't this problem with sapscripts that do not have a company logo.
    Is there a certain restriction on 'Open Dataset'with transfering logos in PDF documents?
    Any help would be greatly appreciated in the form of reward points.
    Thanks
    Liam

    Hi,
    We convert some of our spools to pdf and store them on the app server using following high level process.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid = p_spool
                no_dialog   = 'X'
                dst_device  = 'LOCL'
           TABLES
                pdf         = lt_pdf
           EXCEPTIONS
                OTHERS      = 0.
    Write PDF file
      CALL FUNCTION 'GUID_CREATE'
           IMPORTING
                ev_guid_32 = l_guid.
      CONCATENATE '/your_path_goes_here/'
                  l_guid
                  INTO l_filename.
      CONCATENATE l_filename '.pdf' INTO l_filename.
    Store
      OPEN DATASET l_filename IN TEXT MODE.
      IF NOT sy-subrc IS INITIAL.   " only write pdf if new
        LOOP AT lt_pdf.
          TRANSFER lt_pdf TO l_filename.
        ENDLOOP.
      ENDIF.
      CLOSE DATASET l_filename.
    If it doesn't work, I would 1st try and play with image type. I'm wondering if it's tripping on image conversion. Perhaps revert to 1st principles and try monochrome bitmap and a few variations thereof. I stand by my code above. Definitely works. HTH, Dave

  • PDF document to SAP SPOOLER:

    Hello everyone,
    There are many many examples of objects outputted to PDF. ALV lists, grids, and also SAP Spooler.
    Has anyone run across a way to send a pdf to SAP spooler to print out? I know that
    Adobe Forms is currently doing this in some manor.
    Is it possible to customize that functionality?
    Thanks for any help on this.
    Steve

    I am not an expert, but I hope it will help you:
    1) SAP is able to convert ABAP lists and OTF documents (sapscript, smart form) into PDF binary, but it is not able to send this binary to printers. PDF1 device is a converter but I think it can't be used with printers. PDF conversion is only used to create files, attach PDF to mails, and so on.
    2) SAP sends documents to printers by first converting them into PCL, PS, Prestige, etc. PDF is not used.
    So I think that printing directly a PDF by sending it to a printer is not possible: it must be first converted to PCL, PS, etc. For that, you may use softwares like Ghostscript...

  • Convert multipage Spool (ALF)  into separated PDF documents

    Hi,
    is it possible to convert one multipage ABAP spool(ALF) into separated PDF documents. For example: I have a spool with 3 pages and want to convert it into 3 different PDF documents.
    With function 'CONVERT_ABAPSPOOLJOB_2_PDF' I can only convert into one PDF document.
    Thanks in advance,
    René

    hi,
    Welcome to SDN forum.
    Refer to these links
    Re: ALV List as PDF
    Re: Print to PDF file
    Reward with points if it is helpful
    Regards
    Alfred

  • When I try to open Adobe Acrobat XI Pro it just freezes, it also freezes when opening a PDF document. What can be done to resolve this or troubleshoot this?

    Adobe Acrobat Pro XI is having some issues. When just the base program opens it freezes before I can even do anything with preferences. The same thing happens when I open a PDF document from anywhere. I have cleared the %temp% directory and repair installed the program with no success in finding a resolution to this issue. I have removed Adobe AIR as a thread indicated that this program could be the cause of some issues. I even restarted the print spooler as that was mentioned in a different post on Adobe Support Forums.

    I would suggest rebooting (particularly if you have not) and log in as the administrator. Also, it sounds like you can open Acrobat, but then it locks up when you try to do the preferences. So in that case go to Help>Repair and apply that. Then repeat the process with Help>Updates to get current. See if that resolves the issues. Since you mentioned %temp%, I assume you are on a windows machine, but which one?

  • Why can't I print a 3 page pdf document?

    I have an HP Laserjet P1102W. I am trying to print a 3 page pdf document. The print preview looks correct but when I go to print it prints a blank first page. The second page prints correctly but the 3rd page won't print at all and I get a error light on the printer. I think it might have something to do with the spooler settings but I don't knowthat much about it. Does anyone have any ideas?

    Hey hoganhead!
    I'd recommend taking a look at this article:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02726548&cc=us&dlc=en&lang=en&lc=en&product=411...
    This links to a diagnostic utility supplied by HP to test the printer for issues.
    Pending the results, I'd love to get more info regarding the issue such as the error lights and what they look like.
    Hope this helps!
    Help the community by marking this post as a solution if it solved your issue!.
    If my post helped you in any way, please click the blue KUDOS star under my name! It would mean a great deal.

  • How to generate a PDF document from ABAP program

    Hi experts,
    I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT.
    A pdf document is successfully created, but unable to open it because of some error. I guess some encryption is missing.
    As an alternative I have created a smartform and generated its OTF data in my program and created a PDF. This is working fine.
    But as per my requirement, i cannot go for a smart form.
    Any help to resolve this issue will be highly appreciated.
    Thanks & regards,
    Asrar Ahamed MA
    Infosys Tech. Ltd. INDIA

    Hi Asrar ,
    create a report with this Copy and give your program name in the selection screen whose output need to be in PDF.
    *report  zanusha_spool_to_pdf.
    ---TABLES----
    tables:
      tsp01.
    ---STRUCTURES---
    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.
    *-- 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.
    *-- 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.
    *-- 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.
      submit (p_repid) to sap-spool without spool dynpro
                       spool parameters mstr_print_parms
                       via selection-screen
                       and return.
    *-- Find out the spool number
      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.
    *-- Download the file
      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(9)
                  f_uname+0(3)
        into lc_rq2name.
      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
    Thanx
    Anusha.

  • Sending a PDF document to printer directly

    Hi,
    can any one help me in printing a PDF file stored in the system to be sent to printer from abap code.
    thanks in advance.

    hi here is the program to print the pdf document directly..
    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

  • Certain PDFs do not spool

    The printer in question is a Kyocera 3050ci and the environment is a mixed Windows XP-7 / Mac 10.6-10.8
    Printing this particular pdf from every version of Windows spools in seconds and prints out no problem.
    In EVERY Mac case this PDF never completely spools - it stops at about 25% (printing 1 page out of 4 anywhere between 5-20 minutes).
    I am able to reproduce this using another Kyocera on a different network.  The Macs have no problems printing other large pdfs (50 pages of a service manual spooled in seconds).
    This document prints out just fine using a Canon or Samsung.
    The drivers installed are the latest ones from the Kyocera website. I have used generic drivers and open source drivers without success.
    The problem persists regardless of wether I am printing from Preview or Adobe Reader/Pro, and regardless of what settings I have chosen (for example selecting "print as image" or setting the color reproduction to allow the printer to determine colors)
    The source of the pdf is from an external company which emails the file, so I have no knowledge or say in how the pdf itself is made.
    A temporary workaround I have found is to export the pdf using Preview to a TIFF file and printing that document, however I would like to know what the issue could be.
    I am fairly certain that the issue lies within this particular pdf and its interaction between the driver and the Mac OS. But what is so special about this 4-page file (2.24mb)? Why only Kyocera? Why only Mac?

    StolzeR wrote:
    If I disable the PlugIn in IE11 and activate again it works again indefinitely.
    This, to me, sounds like it's working.  Or perhaps a problem with the translation?

  • Extract PDL from a PDF document

    Hello,
    I'm trying to perform the following task but doesn't find a solution.
    I have a PDF stored on my Content server (KPRO) and want to print it using the SAP spool(SP01).I have try to use the FM ADS_SR_OPEN of creation of spool directly but i need the content of the PCL file.
    Do you have any idea how to achieve this?
    Thank you for your help,
    Pelaez Lopez Philippe
    Edited by: Philippe Lopez on Mar 13, 2008 5:24 PM

    Hello Bertrand,
    The printing in background of pdf document is not possible in DMS. DMS always use the client computer to print pdf document and the printing of PDF document must be done manually by the user.
    So there is no solution to this question except some third party applications.
    Kind regards,
    Pelaez Lopez Philiipe

Maybe you are looking for

  • [SOLVED] system very slow after upgrade

    I did today pacman -Syu after some time. I have Dell D630 laptop, Core 2 Duo 2x1.8GHz, 2GB RAM, VGA: Intel X3100. Now the whole system is really slow. I mean REALLY slow. Even opening terminal (urxvt) takes time. Browsing is slow. Mplayer can not han

  • [SOLVED] No ALSA

    I've installed the 5/14 release on an Acer C720 Chromebook according tom directions found at https://wiki.archlinux.org/index.php/Ac - Chromebook and https://wiki.archlinux.org/index.php/Beginners%27_Guide.  All seems well except that I can't find AL

  • Blocking of phone

    my phone is blocking its self and i have to plug it in again in order to un block it but when i take the cord back off it turns off again, i have reset it and it works for a few hour then it does the same, i live in mexico and it used to be TelCel an

  • [FIXED] Keyboard localisation issues.

    Hi, all. I've recently installed Arch for the first time. I'm using openbox as my window manager. The output of localectl is: System Locale: LANG=en_GB.UTF-8 VC Keymap: uk X11 Layout: uk However my keyboard is using a US layout. The "loadkeys uk" doe

  • Synchronized or not synchronized?

    Suppose to have the class: public class Myclass // not synchronized public void foo() // syncrhonized public syncrhonized void boo() and now assume that a thread is into foo. Another thread try to enter into boo. Could the second thread enter? Note t