Printing binary data in PDF format

HI all,
  Any idea on how to print Binary content in a PDF format
I have read a PDF format from application server in a Binary format, I need to print the binary content on a printer in PDF format
Any help on this is appreciated <REMOVED BY MODERATOR>
Thanks
Aakash
Edited by: Alvaro Tejada Galindo on Jun 9, 2008 3:15 PM

Hi papick,
this may be easier than expected for a million dollar erp system:
You need a PDF printer.
When I played around with adobe interactive forms our basis guys created a new printer in SPAD with
Device Attributes
Device Type PDF1
Device Class Stabdard Printer
location PDF-Frontend printer = Standard printer for workstation
Access Method
Host Spool Access Method FF
Host printer                          PDF
Then need some expremimenting with Functions
RSPO_OUTPUT_DEVICEDATA Spool Output Control of an Internal Table with Formatted Data
or something alike (see function group SPOD)
Then you should be able to create an entry in spooler (SP01) with spool request type adobe pdf document.
Sorry, I don't have this problem, thus I did not check out the details yet.
But I'm convinced it should work that way because the ADS server creates a complete PDF binary and it can be printed using the above described printer - actually a HP Laserjet V was configured as frontend printer and it can print the pdf.
Regards,
Clemens

Similar Messages

  • Convert Binary Data into Pdf & send it as attachment in a mail in Workflow

    Hi,
    Scenario:
    The interactive form saved in WebDynpro Application is sent to R/3 in binary format. It has to be converted into pdf and sent it as an attachment in mail to the respective person in workflow.
    Kindly help on these issues :
    1. How to receive the binary data in R/3 sent by the WebDynpro Application ?
    To my knowledge we can receive the binary in XSTRING data type. Plz correct me if am wrong.
    2. How do i convert the received binary data into pdf ?
    Thanks,
    Bharath Kaushik

    Hi Bharath,
    I think you should try to write dat being sent to R/3 to spool first, as in R/3 there is FM <i>CONVERT_ABAPSPOOLJOB_2_PDF</i> , with the help of which you will be able to convert Binary data to PDF format.
    Pls find one of the threads related to this , and see if this is useful to you.
    Problem in CONVERT_ABAPSPOOLJOB_2_PDF.
    Hope this atleast helps to start off.
    Regds,
    Akshay Bhagwat
    PS: Some points would be nice if it helps:)

  • Convert TIF Binary data to PDF Binary data

    Hi All,
    I have uploaded TIF file into table in system in Binary format.
    I need to create a spool from this Binary data, the spool should open in TIF format or PDF format.
    Can you help me in doing this.
    As I knw how to convert PDF to Spool, it would be even helpful, if you tell me how to convert TIF binary data into PDF binay data.
    Thanks in advance.
    Abhay

    Hi Sandra,
    Below is the requirement from Client:
    1. PDF and Tif files will be attached to order (transaction CRMD_ORDER).
    2. I have to pick the PDF and TIF attachments mentioned above using a batch report.
    3. Then this batch report will create a spool for the PDF file and TIF file attachements.
    4. Then the spool will be picked by another program and print them together in night.
    I hope it is clear now?
    Things I have done:
    1. Created report ZPDF_TIF which is copy of RSPO0023.
    1. Used the report ZPDF_TIF to pick up the PDF and TIF file in binary format from the order (transaction CRMD_ORDER).
    2. Able to Convert PDF to spool.
    I hve problem for:
    1. I want to use the program ZPDF_TIF to work for both PDF and TIF file.
    2. I have the TIF data in Binary (1022) into internal table picked using the report ZPDF_TIF.
    2. I want to convert TIF to spool which is problem child for me as of now.
    I hope the details are clear now.

  • How to display the data in PDF format : problem is splitting into 2 lines

    Hi ,
    I developed one report which downloads the data into PDF format and saved in C drive but my problem is
    in my program : Line size of the report is 255 in PDF it is splitting into 2 lines. it has to show in a single line. how to do it. how to reduce the width of the output? i am sending my code below. anybody can suggest me how to do it. if possible please send me the code.
    my code:
    report zmaheedhar.
    maheedhar-start
    TABLES : vbak.
    parameters : p_vbeln type vbak-vbeln.
    data : begin of itab occurs 0,
            vbeln type vbak-vbeln,
            ERDAT type vbak-erdat,
            ERZET type vbak-erzet,
            ERNAM type vbak-ernam,
            ANGDT type vbak-angdt,
            BNDDT type vbak-bnddt,
            AUDAT type vbak-audat,
            VBTYP type vbak-vbtyp,
            TRVOG type vbak-trvog,
            AUART type vbak-auart,
            AUGRU type vbak-augru,
            GWLDT type vbak-gwldt,
            SUBMI type vbak-submi,
            LIFSK type vbak-lifsk,
            FAKSK type vbak-faksk,
            NETWR type vbak-netwr,
            WAERK type vbak-waerk,
            VKORG type vbak-vkorg,
           end of itab.
    maheedhar-end
    DATA: pripar TYPE pri_params,
          arcpar TYPE arc_params,
          lay TYPE pri_params-paart,
          lines TYPE pri_params-linct,
          rows TYPE pri_params-linsz.
    DATA: val(1), val1(1).
    *---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
    DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
    DATA: name TYPE pri_params-plist VALUE 'Testing'.
    DATA: i_pdf TYPE STANDARD TABLE OF tline.
    DATA: spono TYPE tsp01-rqident.
    maheedhar-start
    top-of-page.
    write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
           'Date','Document Date','SD document category','Transaction group','Sales Document Type',
           'Order reason'.
    start-OF-SELECTION.
          select vbeln  ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
                  VBTYP  TRVOG AUART AUGRU GWLDT SUBMI LIFSK
                  FAKSK  NETWR WAERK VKORG from vbak
            into table itab
            where vbeln = p_vbeln.
    maheedhar-end
    --- Retreive local printer details
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = dest
        no_dialog              = 'X'
        immediately            = ' '
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- Set Spool printer details w.r.t local printer
    pripar-prdsn = 'DSN'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_archive_parameters    = arcpar
        in_parameters            = pripar
        no_dialog                = 'X'
        list_name                = name
      IMPORTING
        out_archive_parameters   = arcpar
        out_parameters           = pripar
        valid                    = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found   = 1
        invalid_print_params     = 2
        invalid_archive_params   = 3
        OTHERS                   = 4.
    IF sy-subrc EQ 0.
    ---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
      NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS pripar
      ARCHIVE PARAMETERS arcpar
      NO DIALOG.
    ELSE.
      WRITE:/ 'Unable to create spool'.
    ENDIF.
    *--- Output statements
    *WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
    *WRITE:/ 'Second Line'.
    LOOP at itab.
    write: itab-vbeln,
            itab-ERDAT,
            itab-ERZET,
            itab-ERNAM,
            itab-ANGDT,
            itab-BNDDT,
            itab-AUDAT,
            itab-VBTYP.
    ENDLOOP.
    "---> Close spool
    NEW-PAGE PRINT OFF.
    spono = sy-spono.
    Convert ABAP Spool to PDF
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid                    = spono
        no_dialog                      = 'X'
    TABLES
       pdf                            = i_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 PDF contents to presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\test.pdf'
        filetype                        = 'BIN'
      TABLES
        data_tab                        = i_pdf
    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.
    thanks,
    maheedhar

    hi tripat,
    actual problem is what u said it is decreased the wiidht of the output.
    now the output is:
    Sales Document C Date Entry time Created By Quotation date Date Document Date
    SD document category Transaction group Sales Document Type Order reason
    62741 07/29/1996 11:54:38 DARLENE 00/00/0000 00/00/0000 07/29/1996 C
    actual output is:
    output should come in a single line. it is splitting into 2 lines.
    thanks,
    maheedhar

  • How to convert binary data to PDF and attach to the particular po

    our client wants to attach the pdf coming from portal as attachment to that particular PO. From portal the pdf will come in binary format. Find how will we convert that binary data back to pdf and attach to the PO in R/3?

    Hi,
    You can downlaod Binary data into PDF using GUI_DOWNLOAD...pass the binary data and the BINSIZE...
    santhosh

  • Convert Binary Data into Pdf & send it as attachment in a mail

    Hi Friends,
    Scenario :
    The interactive form saved in WebDynpro Application is sent to R/3 in binary format. It has to be converted into pdf and sent it as an attachment in mail to the respective person.
    Kindly help on these issues :
    1. How to receive the binary data in R/3 sent by the WebDynpro Application ?
    2. How do i convert the received binary data into pdf ?
    Regards & Thanks,
    Bharath Kaushik Krishnan

    Check thread Data Conversion
    if it is useful for you.

  • Convert Binary Data into Pdf & send it as attachment in a mail from R/3

    Hi,
    Scenario:
    The interactive form saved in WebDynpro Application is sent to R/3 in binary format. It has to be converted into pdf and sent it as an attachment in mail to the respective person in workflow.
    Kindly help on these issues :
    1. How to receive the binary data in R/3 sent by the WebDynpro Application ?
    To my knowledge we can receive the binary in XSTRING data type. Plz correct me if am wrong.
    2. How do i convert the received binary data into pdf ?
    Thanks,
    Bharath Kaushik Krishnan

    HI Bharath,
    I think You can reuse teh XString for binary data.there are certain function modules in R/3 for creating pdf/for sending it as pdf attatchment.please search in abap forums you will find more information
    With Regards
    Naidu

  • I can no longer print any document in PDF format. Not sure why

    I can no longer print any document in PDF format. Not sure why? When I try to print, the document saves to my hard drive as a PDF and will not allow me to print? Never had this issue before. Any thoughts?

    Print to file is in the main print dialog (on Acrobat 9.x) as opposed to under Advanced

  • Print BDS document(in PDF format) from SAP R/3

    Hello ,
    I have a requirement to print BDS document(in PDF format) from SAP R/3 without user interaction.
    In simple way, if I execute the program - PDF document will get printed on local default printer.
    Please help me if anybody worked on similar requirement.
    Thank you very much,
    Liliya

    Hi Liliya,
    First you should create a smartform for BDS  Layout and give output parameter like this..
      wa_param-langu     = sy-langu.
      wa_param-no_dialog = 'X'.
      wa_param-getotf = 'X'.
      wa_param-DEVICE = '     '.                               " (here you can give the path of your printer)
      lv_output_options-tdnewid = 'X'.                      "Print parameters,
      lv_output_options-tddelete = space.                "Print parameters,
      lv_output_options-tdnoprev    = 'X' .
       lv_output_options-TDIMMED    = 'X' .               " it will give the immediate output of form in given output device
    I hope it will help you.....
    Enjoy...

  • How to convert the alv list data into pdf format

    Hi Expersts,
                      Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
    thanks in advance,
    Regards,
    Samad

    hii samad,
    you can go through these link.i hope it ll solve your purpose
    How to convert list output to PDF
    Display ALV list output in PDF format
    regards,
    Shweta

  • How to convert internal table data to PDF format

    HI,
         I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
    Kishore

    In which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
    Smartform to PDF to EMAIL
    This shows convertion of smartform to pdf and send it through email
    Regards,
    Abhishek

  • Converting binary data into pdf and placing into application server

    Hi Friends,
    I am able to get PO details in binary format and then using GUI_DOWNLOAD  with file type with 'bin' and file name with 'sample.pdf' extension , got  PO in pdf  format.
    But i need to get with pdf extension in application server without using GUI_DOWNLOAD.
    Is there any functional modules for it?
    With Warm Regards,
    Madhu!!!

    Hi Madhu,
    Check this code.
    *& 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.
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Binary Data to PDF

    Dear All,
    I need some assistance in here. There is another system that changes the PDF file into Binary format (RAW) into a table in a field called LRAW. How do I convert the Binary Data which is stored in LRAW format back into PDF?
    Any clues or hints would be helpful and if you do have some sample codes I could refer to would even be better.
    Thank you in advance.

    Hi Durairaj,
    I have a FM "CVALE_CHECKOUT_TO_TABLE" which returns a table with data type LRAW.
    I need to convert this data into PDF.
    How will I able to convert this into binary ??
    I need a PDF output.
    regards,
    Vaibhav

  • P.O print o/p in PDF Formate

    Hi,
    We are using std. O/P type NEU and one customize ZNEU  O/P paper is 12 inch paper  i want to know how to convert this Po o/p in pdf copy to save the document .
    regards,
    zafar

    There are two ways.
    1. tocde : SA38 and run pgm RSTXPDFT4.
    2. in Messages while making PO, in medium, it should be external send. Put printer name and in further data select  send immediately option. spool will go to one tcode  SOST and from that it gets send to vendor's email in pdf format  provided correct email address is maintained in vendor master record.
    Regards,

  • Print Report Output in PDF Format

    :-) Hiee E'body
    I generated the output of a Report(developed in Report Builder 6i) in PDF format.
    The output file is created properly and the PDF file gets displayed on the screen in proper format but when i try to print the PDF file it gets printed across the page instead of printing
    it straight.
    I have checked all page and printer settings but cannot find the reason for this.
    If anybody is aware of the solution to this problem please guide me for the same.
    Have a nice day !!
    Thanking You ..
    Vivek Kapoor

    hello,
    sounds like you have a problem with portrait/landscape orientation of your document.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Ipod Touch does not want to turn on after I Restored from Backup to recover notes

    I was trying to restore a note in the notes app and followed these instructions If you synced your notes from iPhone while these notes were still on it and you haven't synced again since they were deleted, you may be able to recover them by restoring

  • Mac mini with a 24" display or a new iMac 24"?

    Hi, Since Apple releases the new iMac, and at the same time, updated the mini, I'm wandering where my heart should go. I like the iMac, a little bit more powerful, better video card and not sharing memory with main memory, better BTO (bigger HD, fast

  • User Exits for FI transaction at time of 'Save'

    Hi All, I'm looking User Exits for the FI transaction - FBD1. I used CMOD to identify the user Exits available for the 'FBAS' package: F050S001 - FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment    F050S002 - FIDCC1: Change IDoc/do not send    

  • Love the iPod Nano

    Hate the negative comments on these forums. Can people use these forums to help / educate / share ideas / ask reasonable questions instead of bashing/complaining ?

  • Dbc file

    hi , where should i have to put my .dbc file in dicover server(location of discoverer please.) Thanks Prathap