Line art problem outputting to pdf

I have a problem with exporting pages of a magazine going to print as pdf, relating to line art placed on the page as a bitmap tiff (typically at 1200 ppi). At present I have a workaround for an annoying problem that really needs clearing up ...
I'm using CS4 InDesign and Acrobat (files prepared in Photoshop). So, high-res bitmap tiff containing line art sized (that is, just placed - no resizing in Indesign) and placed in Indesign, looks fine on the page. Output to pdf using 'export' and the resulting file, when viewed on screen, has a thin line down the right-hand edge of any and all bitmap files.
To ensure no misunderstanding, the 'bitmap' reference is what Photoshop calls it - a bilevel file with black lines in it, which enables me easily to overlay other files such as a photo (because the file is black/transparent) and assign a colour or tint to the bitmap, or even a drop shadow etc. I've used this workflow for years, from Photoshop through Indesign, but the latter always gives me this line on the right edge, in the pdf. It did this in CS3 Indesign/Acrobat as well (but never in Pagemaker).
My workaround is to lay a white-filled box over the edge of the file, thus masking it. But of course, that also limits me to where I can place the file - not easily on a graded tint background, not on a photo and so on. So I'd like to solve this.
Any ideas? OS is Win XP Pro (all updates applied to this and the CS programs - I don't believe they make a difference to this problem, as it has existed through several iterations of both OS and CS).
Anyone else seen this effect? Or is it just me? And has anyone a potential solution?
Chris

I think by reason of not knowing what else I can do, I'm heading to the same conclusion - put up with it! I'll certainly try sending a line to print and see if it appears, but for on-screen stuff, I think I have to stick with the safe workaround I use and accept the layout limitations. (Or resort to Pagemaker for the pages that I just cannot do otherwise.)
Seems to me, if people have reported this for years, Adobe might have tried sorting it out. On screen or not, it still must be due to *something* in the file and/or Acrobat/Distiller to allow it to appear. If I create a white greyscale tiff with the same resolution etc, and place it on a page, there's no line down the edge on output - just a white page with a white (invisible) box. If I do this with an 'empty' bitmap file, a line appears ... Both files created in Adobe programs, so it's not me as a user ...
Just me whinging! I'm really coming from the angle that if this is indeed a display problem, it can only be a display problem if there is something in the file for the display to react to (badly phrased that!).
Thanks everyone for your support and ideas - I think that's me finished for now; I have files to upload and then sleep.

Similar Messages

  • Why problems outputing a PDF from Photoshop?

    I have Adobe Acrogat 9 Pro and Adobe Distiller 9 installed, so I've had great luck printing anything I wanted from its native format (like MS Word, Firefox, etc.) to PDF format. Recently I wanted to send someone a preview of a Photoshop document I've been working on really hard. When I chose the "Adobe PDF" option in the print dialog, things got real strange. Photoshop started telling me it could only do it if I ran the process in the "installer mode." Well, a box came on screeen saying that was going to take 45 minutes, so I cancelled it. Saved the PSD as a high-resolution JPEG instead and emailed it to the person I want to critique it. What's the reason for this? Is my PSD too complicated? Is it because I'm still on Photoshop 7?

    Actually PS is just trying to save your behind and is being overly smart about it. If I remeber correctly, al lversions before CS4 would try and prevent you from "printing" to PDF and rather ask you to save a PDF directly. Something to do with retaining vector data and text plus other stuff that may provide a better quality at smaller resulting PDF sizes.
    Mylenium

  • How do I set a PDF Export Preset to force a minimum line weight on output?

    How do I set a PDF Export Preset to force a minimum line weight on output?  I'm currently using one that came from a printer that works great - but I can't seem to find the option when creating one myself.  I have some placed Illustrator line art that is built with .25 line thickness and when I have it placed at 20% scale the lines are too thin to see in the PDF output.

    There is absolutely no way to force minimum line widths within InDesign itself, certainly not as part of the PDF export process!! And even one writes a script to go through every object within an InDesign document and both validate and fix line widths less than some particular threshold, such a script would be useless against placed artwork, the contents of which are not available for manual or programmatic inspection within InDesign.
    Note that one should be exceptionally careful in “fixing” hairlines, especially if you are placing vector artwork at very low magnification. It may actually be OK to let certain lines drop out. After a fixup on some content, you could end up with a messy mass of lines.
              - Dov

  • Problem in converting report output to pdf

    Hi,
    I'm managing to get the spool id and other requirements but could'nt get the output of the program converted to pdf format.When i'm trying to do this i'm getting the pdf format of the functional module which retrievs the header and item records and displays the numbers records in the header and item like for eg. header records 8 and item records 10 this its displaying in the format in which we get our funtional module output when we give some data into it.....
    Can any one please tell me how to solve this for ur information i'm using hierarchail squential report with multiple reports in the same report.............
    for instance i'm using the following coding please find the bug......
    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.

    Please  go throught the code    ... this  is  my salary sending  program to  all the employees   as pdf attach file of his  salary breakup ...... it was  so clear  how the   data  is converted in th  pdf   format   .... and more understanding way the internal tables are declared ....
    DATA W_OPTIONS LIKE ITCPO OCCURS 0 WITH HEADER LINE.
      DATA : z_itcpp LIKE itcpp OCCURS 0 WITH HEADER LINE.
      DATA : otfdt like ITCOO OCCURS 0 WITH HEADER LINE.
      DATA : pdfdt like TLINE OCCURS 0 with header line.
       DATA: NUMBYTES TYPE I.
      DATA: OBJPACK   LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
      DATA: OBJHEAD   LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
      DATA: OBJBIN    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST   LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
      DATA: DOC_CHNG  LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
      DATA: Begin of i_errors occurs 0,
            type(1) type c,
            descr(100) type c,
           End of i_errors.
        w_options-tdprinter = 'POSTSCPT'.
        W_options-TDRDIDEV = 'XP45'.
        W_options-TDGETOTF = 'X'.
        APPEND W_options.
        call function 'OPEN_FORM'
            exporting
                  device                      = 'PRINTER'
                  dialog                      = ' '
                  form                        = 'ZHRPAYSLIP'
                  language                    =  sy-langu
                  options                     =  w_options
    *      IMPORTING
    *         LANGUAGE                    =
    *         NEW_ARCHIVE_PARAMS          =
    *         RESULT                      =
           exceptions
                 canceled                    = 1
                 device                      = 2
                 form                        = 3
                 options                     = 4
                 unclosed                    = 5
                 mail_options                = 6
                 archive_error               = 7
                 invalid_fax_number          = 8
                 more_params_needed_in_batch = 9
                 others                      = 10 .
    CALL FUNCTION 'CLOSE_FORM'
    *    IMPORTING
    *         RDI_RESULT               =
        TABLES
             OTFDATA                  = otfdt
          EXCEPTIONS
               UNOPENED                 = 1
               BAD_PAGEFORMAT_FOR_PRINT = 2
               SEND_ERROR               = 3
               OTHERS                   = 4.
        EXPORT otfdt TO MEMORY ID 'PDFT'.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = NUMBYTES
    *   BIN_FILE                    =
      TABLES
        otf                         = otfdt
        lines                       = pdfdt
    * EXCEPTIONS
    *   ERR_MAX_LINEWIDTH           = 1
    *   ERR_FORMAT                  = 2
    *   ERR_CONV_NOT_POSSIBLE       = 3
    *   ERR_BAD_OTF                 = 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.
    ENDIF .
    Refresh OBJTXT. clear OBJTXT.
      Refresh OBJPACK. clear OBJPACK.
      Refresh objbin. clear objbin.
      Refresh OBJHEAD. clear OBJHEAD.
      Refresh RECLIST. Clear RECLIST.
    * Creation of the document to be sent
    * File Name
      DOC_CHNG-OBJ_NAME = 'PAYSLIP'.
    * Mail Subject
      DOC_CHNG-OBJ_DESCR = 'Payslip'.
    * Mail Contents
      OBJTXT = 'This e-mail was sent from an automated system...'.
      APPEND OBJTXT.
      OBJTXT = 'Do not reply to this message.'.
      APPEND OBJTXT.
      OBJTXT = 'Please open the attachment to view the Payslip'.
      APPEND OBJTXT.
      OBJTXT = ''.
      APPEND OBJTXT.
      if not msgtxt1 is initial.
      OBJTXT = msgtxt1.
      APPEND OBJTXT.
      endif.
      if not msgtxt2 is initial.
      OBJTXT = msgtxt2.
      APPEND OBJTXT.
      endif.
      if not msgtxt3 is initial.
      OBJTXT = msgtxt3.
      APPEND OBJTXT.
      endif.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    * Creation of the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
      OBJPACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
    * Creation of the document attachment
    CALL FUNCTION 'QCE1_CONVERT'
       TABLES
         t_source_tab         = pdfdt
         t_target_tab         = objbin
       EXCEPTIONS
         convert_not_possible = 1
         OTHERS               = 2.
    describe table objbin lines tab_lines.
    OBJHEAD = 'Payslip.PDF'.
    APPEND OBJHEAD.
    ** Creation of the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
      OBJPACK-DOC_TYPE = 'PDF'.
      OBJPACK-OBJ_NAME = 'Payslip'.
      OBJPACK-OBJ_DESCR = 'Payslip'.
      OBJPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND OBJPACK.
    * Completing the recipient list
    *  Read table i_pa0105 with key pernr = pernr-pernr binary search.
      loop at i_pa0105 where pernr = pernr-pernr and USRTY = '0010'.
      endloop.
      if sy-subrc = 0.
          RECLIST-RECEIVER = i_pa0105-USRID_LONG.
          RECLIST-REC_TYPE = 'U'.
          APPEND RECLIST.
      endif.
      if RECLIST[] is initial.
          loop at i_pa0105 where pernr = pernr-pernr and USRTY = 'MAIL'.
          endloop.
          if sy-subrc = 0.
              RECLIST-RECEIVER = i_pa0105-USRID.
              RECLIST-REC_TYPE = 'U'.
              APPEND RECLIST.
          endif.
      endif.
       if not RECLIST[] is initial.
    * Sending the document
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
           DOCUMENT_DATA = DOC_CHNG
           PUT_IN_OUTBOX = ''
           COMMIT_WORK = 'X'
        TABLES
           PACKING_LIST = OBJPACK
           OBJECT_HEADER = OBJHEAD
           CONTENTS_BIN = OBJBIN
           CONTENTS_TXT = OBJTXT
           RECEIVERS = RECLIST
        EXCEPTIONS
           TOO_MANY_RECEIVERS = 1
           DOCUMENT_NOT_SENT = 2
           OPERATION_NO_AUTHORIZATION = 4
        OTHERS = 99.
        CASE SY-SUBRC.
           WHEN 0.
                   LOOP AT RECLIST.
    *                   Concatenate pernr-pernr '-'  RECLIST-RECEIVER(48)
    into error1.
                       IF RECLIST-RETRN_CODE = 0.
    *                     Concatenate error1 ': The document was sent' into
    error1.
                         i_errors-descr = pernr-pernr.
                         i_errors-type = 'S'.
                         append i_errors.
                       ELSE.
                         Concatenate error1 ': The document could not be
    sent' into error1.
                         i_errors-descr = error1.
                         i_errors-type = 'E'.
                         append i_errors.
                       ENDIF.
                   ENDLOOP.
            WHEN 1.
               Concatenate pernr-pernr '-'  RECLIST-RECEIVER(48) into
    error1.
               Concatenate error1 ': No authorization for sending to the
    recipients' into error1.
               i_errors-descr = error1.
               i_errors-type = 'E'.
               append i_errors.
            WHEN 2.
               Concatenate pernr-pernr '-'  RECLIST-RECEIVER(48) into
    error1.
               Concatenate error1 ': Document could not be sent to the
    recipient' into error1.
               i_errors-descr = error1.
               i_errors-type = 'E'.
               append i_errors.
            WHEN 4.
               Concatenate pernr-pernr '-'  RECLIST-RECEIVER(48) into
    error1.
               Concatenate error1 ': No send authorization' into error1.
               i_errors-descr = error1.
               i_errors-type = 'E'.
               append i_errors.
            WHEN OTHERS.
               Concatenate pernr-pernr '-'  RECLIST-RECEIVER(48) into
    error1.
               Concatenate error1 ': Error occurred while sending' into
    error1.
               i_errors-descr = error1.
               i_errors-type = 'E'.
               append i_errors.
        ENDCASE.
      else.
        error1 = pernr-pernr.
    *    Concatenate error1 ': Maintain Infotype 0105.' into error1.
        i_errors-descr = error1.
        i_errors-type = 'M'.
        append i_errors.
      endif.
    girish

  • Problem with dashed line spacing when printing to pdf

    Hi all,
    this may be a problem with my pdf program (I use bluebeam), but maybe someone will have an idea how to fix it whether in indesign or bluebeam.
    so I made a dashed line using the stroke command in indesign. I need to have the spacing set to 3pt dash and 2pt space. I also need to keep the lineweight to 0.5...this all works fine and appears correctly in indesign when I preview
    the problem is that some of the dashed lines, but not all of them, change size and spacing in the pdf when I view it. it seems to change when I zoom in and out as well. I thought maybe this was just some odd feature with bluebeam and it would still print to the correct size, but it does not, it prints the lines as different sizes. does anyone have an idea why this happens and how to fix? ive viewed and printed from adobe reader and it seems to be okay there but this file will be accessed by multiple other people and they may not be opening and printing in adobe reader..
    thanks guys

    When you export a PDF you will notice that you are exporting to Adobe PDF. Using any reader beyond Acrobat Pro or Reader is a crapshoot.
    For issues with Bluebeam I suggest you contact the developer.

  • Problem in converting smartforms output in pdf

    Hi all..
    I am trying to convert smartform's output in PDF file..
    I am able to convert smartforms's output in PDF but after that i can't see Print Preview..
    Code is following...
    REPORT ZMM_R402_FORM_TEST11.
    TABLES : VBRK,J_1IEXCHDR.
    SELECTION-SCREEN : BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-000.
    *PARAMETERS : EXNUM TYPE EXNUM OBLIGATORY.
    SELECT-OPTIONS : EXNUM FOR J_1IEXCHDR-EXNUM NO-EXTENSION OBLIGATORY.
    PARAMETERS : EXDAT LIKE J_1IEXCHDR-EXDAT OBLIGATORY.
    PARAMETERS : KUNNR LIKE VBRK-KUNAG OBLIGATORY.
    PARAMETERS : SR_NO(12) TYPE C.
    PARAMETERS : DATE1 TYPE EXDAT.
    SELECTION-SCREEN : END OF BLOCK BLK.
    DATA : FM_NAME(30) TYPE C.
    DATA : SR(12) TYPE C.
    UNPACK EXNUM-LOW TO EXNUM-LOW.
    UNPACK EXNUM-HIGH TO EXNUM-HIGH.
    DATA:
          it_otf                 TYPE STANDARD TABLE OF itcoo,
          it_docs               TYPE STANDARD TABLE OF docs,
          it_lines               TYPE STANDARD TABLE OF tline.
    Declaration of local variables.
    DATA:
          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_control_parameters-no_dialog = ' '.
    st_control_parameters-getotf = 'X'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZMM_402_FORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  =  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.
    **WRITE:/ FM_NAME.
    CALL FUNCTION FM_NAME
      EXPORTING
      control_parameters            = st_control_parameters
        output_options              = st_output_options
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
        EXNUM                      = EXNUM-LOW
        EXNUM1                     = EXNUM-HIGH
        DATE                       = EXDAT
        KUNNR                      = KUNNR
        SR                         = SR_NO
        DATE1                      = DATE1
    IMPORTING
       document_output_info        = st_document_output_info
        job_output_info            = st_job_output_info
        job_output_options         = st_job_output_options
      DOCUMENT_OUTPUT_INFO       =   W_RETURN
      JOB_OUTPUT_INFO            =
      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.
    ENDIF.
    .........................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.
    ........................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.
    ENDIF.
    Please Help me ..
    How can i see print preview..

    use like this:
       call function lf_fm_name
               exporting
                        archive_index        = toa_dara
                        archive_parameters   = arc_params
                        control_parameters   = ls_control_param         "Smart Forms: Control structure
                        mail_recipient       = ls_recipient
                        mail_sender          = ls_sender                "Structure for Object ID
                        output_options       = ls_composer_param        "SAP Smart Forms: Smart Composer (transfer) options
                        user_settings        = ' '
                        is_dlv_delnote       = ls_dlv_delnote           "Delivery Note Data: Transfer-Structure for Smartform
                        is_nast              = nast                     "Nast
             exceptions formatting_error     = 1
                        internal_error       = 2
                        send_error           = 3
                        user_canceled        = 4
                        others               = 5.
            if sy-subrc <> 0.
      error handling
              cf_retcode = sy-subrc.
              perform protocol_update.
        get SmartForm protocoll and store it in the NAST protocoll
              perform add_smfrm_prot.                  "INS_HP_335958
            endif.
    *To read the Spool Number generated
            read table it_job_output_info-spoolids into v_rspoid index 1.
    concatenate 'aBC.pdf' into v_file_name.
    submit rstxpdft4 and return
              with   spoolno = v_rspoid
              with   p_file  = v_file_name.
              clear: v_rspoid.

  • I have a problem in converting smartform output to pdf format.

    Hi,
    While converting the smartform output to pdf format.
    It is showing this error.
    otf end command // missing in otf data.
    I have used this function.
    Assigning the OTFDATA to OTF Structure table
        CLEAR gt_otf.
        gt_otf[] = gs_otfdata-otfdata[].
    Convert the OTF DATA to SAP Script Text lines
        CLEAR gt_pdf_tab.
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = gv_bin_filesize
          TABLES
            otf                   = gt_otf
            lines                 = gt_pdf_tab
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            OTHERS                = 4.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Please help me in this regard. Thanks in advance.

    Hi ,
    I am getting this exception "err_conv_not_possible"
    CALL FUNCTION f_name " '/1BCDWB/SF00000092'
          EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS       = st_control_parameters
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
         OUTPUT_OPTIONS             = st_output_options
      USER_SETTINGS              = 'X'
            ZST_TEXTSYMBOLS            = ZST_TEXTSYMBOLS
            wa_kna1                    = wa_kna1
            wa_claim_header            = wa_claim_header
       IMPORTING
         DOCUMENT_OUTPUT_INFO       = st_document_output_info
         JOB_OUTPUT_INFO            = st_job_output_info
         JOB_OUTPUT_OPTIONS         = st_job_output_options
          TABLES
            IT_CLAIM_VERSION           = IT_CLAIM_VERSION
            IT_CLAIM_ITEM              = IT_CLAIM_ITEM
            IT_CLAIM_PARTNER           = IT_CLAIM_PARTNER
            IT_FINAL                   = IT_FINAL
       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.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
          EXPORTING
             USE_OTF_MC_CMD               = 'X'
        ARCHIVE_INDEX                =
          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.
        ENDIF.
    HERE when i tried to debug it i got SY-SUBRC = 1.
    Please help me in this regard. Thanks in advance.

  • (PDF) Should line art require so much disk space?

    Hi,
    When I save Photoshop files to PDF for easy transport to the printers, and I make sure all the text remains vector (not rasterized), the document becomes unnecessarily bloated.
    (NOTE: When I say vector, I don't mean including the fonts. I mean tracing the text shapes and keeping it all as uneditable line art.)
    This is a surprise to me, because we're talking about vector/line, here. Not pixels. Why does a page full of line-art text require so much disk space? Am I doing something wrong?
    There's a text document I'd like to save and place online, and I couldn't imagine it requiring more than 500k - 900k... but as long as I keep the text vector, I can't get it under 3-4 megs.
    I just need confirmation that this is normal, and something I have to live with if I want to keep the text un-rasterized.

    I think you might be right. I ended up formatted the disc then creating a brand new fresh back up which worked. Now it seems to be restoring in the correct manor.
    Thanks for your assistance

  • PDF Letterhead Text LINE SPACING PROBLEM

    I recently upgraded from Pro 8 to X Pro on my Windows XP desktop. With Pro * I used the typewriter fucntion to place text onto my pdf letterhead. I have my letterhead in pdf format on my hardrive. I saved this texted letterhead without a problem, i.e., with the font, paragraphs, and line spacing eaxtly as it was when I creared it. With X Pro, after having placed text in my letterhead using the Typewriter function, my attempt to save the texted in letter head results in a pdf document which does not respect the line spacing I used w=hen creating it. Why am I have this line spacing problem?

    Thank you Michael,
    I am simply trying to continue using X Pro the way I used Pro 8. In Pro 8 I
    used the Typewriter function to input text to the letter head stored in my
    hard drive. Perhaps this is a functionality I lost as a result of the
    upgrade to X Pro -- I hope not??
    Joseph S. Tann, Jr., Esq.
    CONFIDENTIALITY NOTICE: This transmission is intended only for the addressee
    shown above. It may contain information that is privileged, confidential, or
    otherwise protected from disclosure. If you are not the intended recipient,
    please do not read, copy, or use it, and do not disclose it to others.
    Please notify the sender of the delivery error by replying to this message
    and then delete it from your system. Thank you.

  • [ASAP] Need Help Exporting to PDF - Line weight problems (Illustrator file)

    So, I've drawn some stuff in Illustrator which I've then placed in InDesign.
    It all looks right on screen, but when I export the document to pdf (Adobe PDF Presets: High Quality Print) the Illustrator stuff appears to lose the line weight settings. This is easily noticeable on some really thin lines that print much thicker than they were supposed to.
    I gotta be missing something when exporting to pdf... 'cause if I export to Jpeg everything comes out right. No more line weight problems! The question is: what the hell am I doing wrong???
    Please, somebody help me out.
    Thx!

    1. How are you printing?
    I'm using one of the Adobe PDF Export Presets: High Quality Print.
    2. What are you using to determine the line weight?
    What do you mean? I talking about the stroke size.
    3. Have you tried opening the PDF in Illustrator to see what the reported line weight is?
    I've tried it now and it looks just fine! Just like it was supposed to! All the line weights are correct.
    4. This might just be a limitation of your printer or printer driver.
    I don't think so. I have never had this problem up until now!
    I'm starting to think it has something to do with some Acrobat preferences settings...

  • Problem Generating A PO Output In PDF

    Hi All,
    In transaction Me22n or Me23n, when we enter a PO and click on The u201CPRINT PREVIEWu201D Button, we are prompted with a Sub Screen For Selection Of O/P Type.
    After selecting the Output Type (In my case it is YNEU), I click on Print Preview, and I get a Prompt Screen with the title "PDF Output?" Having the text as "Download Output To PDF or Screen/Printer", where I have two options to choose from PDF or Screen Printer.
    Now for this same output type I get to see the above mentioned Message Prompt for certain POs and for other POs I dont get to see that Message Prompt .
    Can anyone please tell me as to why is this happening?
    Thanks & Regards
    Pablo Ghosh Roy

    Satya,
    Goto NACE .
    u2022 Select EF and click on OUTPUT TYPES.
    u2022 Then select Output Type NEU and click on processing routines .
    u2022 In that you have to add a new entry - medium 5 .
    u2022 Then you need to assign a program, form routine and form.
    u2022 You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
    u2022 Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
    u2022 For subject of the mail goto Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
    u2022 Under General data -> Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE .
    u2022 Now the subject will be PO No. 1800004202.
    u2022 You need to maintain your email id in tcode SU01 and also the vendor's email id.
    u2022 Now while creating a new purchase order , change the medium to External Send .
    u2022 Then goto Communication Method and select CS01 . ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
    u2022 Goto tcode ME9F .
    u2022 Execute.
    u2022 Select the checkbox and click on Output Message.
    u2022 You will get a message MAII 00000000000001 generated.
    also check,
    go to MN04
    here give the condition as NEU
    choose key combination as Purchasing Output Determination: Document Type
    select doc type and partner function as VN vendor mediuam as 5 external send
    select communication here strategy give as CS01
    For subject of the mail go to Mail Title and Texts. In title give PO No. &EKKO-EBELN&
    this may help U !

  • Illustrator output to .pdf problem

    I recently updated Acrobat Pro and now when I output a .pdf from Illustrator I get the "file was saved without PDF Content" error when it's opened in Acrobat.

    Then probably you saved it without Acrobat content?
    Which options do you select when saving your files? Where do you save them?

  • Poor proofs of imported line art

    Line art scanned into InDesign CS2 from a Canon CanoScan LiDE 60 scanner looks good the first time it is printed on an HP PhotoSmart 4280 printer, and it looks good on the screen. The second and subsequent times it is printed, especially if the document is made into a PDF, the image degrades significantly, and that degradation is visible on the screen as well. Where is the fault: in InDesign, which accepts the image well? In the scanning software, which has caused no other problems? In the printer, which has caused no other problems?

    Joel and Peter --
    Thank you for responding to my post. No, I do not scan directly into ID: I scan the object (hand-drawn map or sheet of autographs), then place the object on the destined page, adjusting its size to fit the location I have planned for it. I place it with cmd-D, just as I would with text, but select it from a folder full of all the artwork intended for that issue of the newsletter.
    I have been using the software since 1987, when it was PageMaker 2.0 and it was published by Aldus, and it has become increasingly complicated over that twenty-odd year period. When I ask ID to export PDFs (the only thing our printer can handle: he's not a typesetter or an expert in page makeup), it regularly tells me that there are missing links, and I have never bothered to follow up and find out which links were missing. Do I have to?
    The Canon CanoScan LiDE 60 does offer me my choice of dpi: 300, 600, and 1200. I have scanned line art at 1200. The scanner also offers me 8-bit or 16-bit output; my bet is that I should be sure to ask for 16-bit.
    I have accepted as gospel the ID PDF export compression settings: that is, I have never noticed.
    As for Display Performance, I did raise that to its highest setting, and the display on the iMac monitor looked splendid, but the PDF sent to the printer did not.
    This issue of the newsletter has just come back from the printer, and my wife will be part of the mailing crew tomorrow. Meanwhile, I'm  attaching the indd containing the line art (as well as photographs which I did scan and place, and which came out all right). The line art appears (map) on unnumbered page 8 and (autographs) on page 9.
    Don Ludgin ([email protected])

  • Problems sending a PDF via mail

    Hi !! I have a report, runs in background, which obtains some information from sap tables and then generates an ALV. As it is executed in background, the ALV creates an spool order. After this, I convert this spool into a PDF object . And then I need to send a mail to an specific user with some text in its body and this PDF as attach. If I don't attach the PDF, the mail is sent ok. The problem is when I try to attach the PDF.. Here is my code so anybody can help me please... REPORT zautorizaciones_spool . TABLES : usr02, agr_texts, agr_users, adr6, usr21, adrp, itcpo, tsp01. TYPE-POOLS : slis. DATA: BEGIN OF i_tabla OCCURS 0, agr_name LIKE agr_texts-agr_name, text LIKE agr_texts-text, uname LIKE agr_users-uname, name_text LIKE adrp-name_text, END OF i_tabla. * Spool IDs TYPES: BEGIN OF t_tbtcp. INCLUDE STRUCTURE tbtcp. TYPES: END OF t_tbtcp. DATA: fieldcat TYPE slis_t_fieldcat_alv, fieldcat_ln LIKE LINE OF fieldcat, sortcat TYPE slis_t_sortinfo_alv. DATA: col_pos TYPE i, spos TYPE i. DATA: v_buffer TYPE string. DATA: BEGIN OF it_email OCCURS 0, smtp_addr LIKE adr6-smtp_addr. DATA: END OF it_email. DATA: mi_rqident LIKE tsp01-rqident, mi_bytecount TYPE i, mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE. DATA: it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE, objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE, objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE, objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, doc_chng LIKE sodocchgi1, tab_lines LIKE sy-tabix, reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE. 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, it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0, wa_tbtcp TYPE t_tbtcp. CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV'. *----
    Pantalla de selección *----------------------------------------------------------------------
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. SELECT-OPTIONS: s_ustyp FOR usr02-ustyp, s_nomrol FOR agr_texts-agr_name, s_uflag FOR usr02-uflag, s_class FOR usr02-class, s_line FOR agr_texts-line, s_todat FOR agr_users-to_dat, s_spras FOR agr_texts-spras, s_gltgb FOR usr02-gltgb, s_correo FOR adr6-smtp_addr. SELECTION-SCREEN END OF BLOCK b1. *----
    INITIALIZATION *----------------------------------------------------------------------
    INITIALIZATION. CLEAR i_tabla. REFRESH i_tabla. *----
    START-OF-SELECTION *----------------------------------------------------------------------
    START-OF-SELECTION. PERFORM obtener_datos. IF NOT i_tabla[] IS INITIAL. IF sy-batch IS INITIAL. PERFORM listado. SKIP. WRITE:/ 'Para que la orden spool pueda ser creada, el programa', 'se debe de ejecutar en fondo.'. ELSE. MESSAGE s000(z2) WITH 'batch'. PERFORM listado. PERFORM get_job_details. PERFORM get_spool_number USING SY-REPID sy-uname CHANGING mi_rqident. PERFORM conver_spool_pdf. PERFORM enviar_mail. PERFORM delete_spool. IF sy-sysid = c_dev. WAIT UP TO 5 SECONDS. SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN. ENDIF. ENDIF. ENDIF. *----
    END-OF-SELECTION *---------------------------------------------------------------------
    END-OF-SELECTION. *&----
    *& Form obtener_datos *&--------------------------------------------------------------------
    FORM obtener_datos. SELECT agr_textsagr_name agr_textstext agr_usersuname adrpname_text APPENDING CORRESPONDING FIELDS OF TABLE i_tabla FROM ( agr_users INNER JOIN usr02 ON usr02bname = agr_usersuname INNER JOIN agr_texts ON agr_textsagr_name = agr_usersagr_name INNER JOIN usr21 ON usr21bname = usr02bname INNER JOIN adrp ON adrppersnumber = usr21persnumber ) WHERE agr_usersagr_name IN s_nomrol AND agr_usersto_dat IN s_todat AND usr02class IN s_class AND usr02gltgb IN s_gltgb AND usr02uflag IN s_uflag AND usr02ustyp IN s_ustyp AND agr_textsline IN s_line AND agr_textsspras IN s_spras. ENDFORM *&--------------------------------------------------------------------
    *& Form listado *&--------------------------------------------------------------------
    FORM listado. PERFORM crear_catalogo. PERFORM imprimir. ENDFORM. *&--------------------------------------------------------------------
    *& Form crear_catalogo *&--------------------------------------------------------------------
    FORM crear_catalogo. PERFORM build_fieldcat USING : 'AGR_TEXTS' 'AGR_NAME' '' '' '' '30' '' 'L' 'Papel', 'AGR_TEXTS' 'TEXT' '' '' '' '80' '' 'L' 'Denominación papel', 'AGR_USERS' 'UNAME' '' '' '' '12' '' 'L' 'Usuario', 'NAME_TEXT' 'NAME_TEXT' '' '' '' '80' '' 'L' 'Nombre completo'. ENDFORM. *&--------------------------------------------------------------------
    *& Form build_fieldcat *&--------------------------------------------------------------------
    FORM build_fieldcat USING tabname fieldname key no_out hotspot outputlen do_sum ddictxt seltext_l. ADD 1 TO col_pos. fieldcat_ln-ref_tabname = tabname. fieldcat_ln-fieldname = fieldname. fieldcat_ln-key = key. fieldcat_ln-col_pos = col_pos. fieldcat_ln-no_out = no_out. fieldcat_ln-hotspot = hotspot. fieldcat_ln-do_sum = do_sum. fieldcat_ln-ddictxt = ddictxt. fieldcat_ln-seltext_l = seltext_l. fieldcat_ln-seltext_m = seltext_l. fieldcat_ln-seltext_s = seltext_l. IF NOT outputlen IS INITIAL. fieldcat_ln-outputlen = outputlen. ENDIF. APPEND fieldcat_ln TO fieldcat. CLEAR fieldcat_ln. ENDFORM. *&--------------------------------------------------------------------
    *& Form imprimir *&--------------------------------------------------------------------
    FORM imprimir. DATA : prg LIKE sy-repid. prg = sy-repid. DATA : salida TYPE slis_exit_by_user. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = prg i_callback_user_command = 'ALV_USER_COMMAND' it_fieldcat = fieldcat it_sort = sortcat i_save = 'A' IMPORTING es_exit_caused_by_user = salida TABLES t_outtab = i_tabla EXCEPTIONS program_error = 1 OTHERS = 2. ENDFORM. *&--------------------------------------------------------------------
    *& Form informar_cuerpo *&--------------------------------------------------------------------
    FORM informar_cuerpo. objtxt-line = 'Estimado propietario de datos.'. APPEND objtxt. CLEAR objtxt. APPEND objtxt. CLEAR objtxt. CONCATENATE 'En el marco de la auditoría SOX, y para asegurar el cumplimiento' 'de uno de sus controles, le adjuntamos un/os informes para...' INTO objtxt-line SEPARATED BY space. APPEND objtxt. CLEAR objtxt. ENDFORM. " informar_cuerpo *&--------------------------------------------------------------------
    *& Form enviar_mail *&--------------------------------------------------------------------
    FORM enviar_mail. DATA: w_cnt TYPE i, t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE, cont type i. doc_chng-obj_name = 'Probando envio mail'. doc_chng-obj_descr = 'Probando asunto mail'. PERFORM informar_cuerpo. READ TABLE it_mess_att INDEX w_cnt. MESSAGE s000(z2) WITH 'w_cnt' w_cnt. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. DESCRIBE TABLE objtxt LINES tab_lines. doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ). CLEAR t_attachment. REFRESH t_attachment. t_attachment[] = it_mess_att[]. CLEAR objpack-transf_bin. objpack-head_start = 1. objpack-head_num = 0. objpack-body_start = 1. objpack-body_num = tab_lines. objpack-doc_type = 'RAW'. objpack-obj_descr = doc_chng-obj_descr. DESCRIBE TABLE t_attachment LINES objpack-body_num. objpack-doc_type = 'PDF'. objpack-obj_descr = 'OBJ_Descr'. objpack-obj_name = 'obj_name'. objpack-doc_size = objpack-body_num * 255. APPEND objpack. objhead = 'Envio mail'. READ TABLE objtxt INDEX tab_lines. IF sy-subrc = 0. MESSAGE s000(z2) WITH 'objtxt' tab_lines. ENDIF. reclist-receiver = p_mail. reclist-rec_type = 'U'. reclist-express = 'X'. reclist-com_type = 'INT'. APPEND reclist. CLEAR reclist. CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = doc_chng TABLES packing_list = objpack object_header = objhead contents_bin = objbin contents_txt = objtxt receivers = reclist 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. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. ENDFORM. " enviar_mail *&--------------------------------------------------------------------
    *& Form get_spool_number *&--------------------------------------------------------------------
    FORM get_spool_number USING f_repid f_uname CHANGING f_rqident. DATA: lc_rq2name LIKE tsp01-rq2name. 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. CLEAR wa_tbtcp. READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1. IF sy-subrc = 0. f_rqident = wa_tbtcp-listident. MESSAGE s000(z2) WITH 'Se ha creado la orden spool' f_rqident. ELSE. MESSAGE s000(z2) WITH 'No se ha recuperado ninguna orden spool'. ENDIF. ENDFORM. " get_spool_number *&--------------------------------------------------------------------
    *& Form informar_destinatario *&--------------------------------------------------------------------
    FORM informar_destinatario USING p_correo. it_receivers-receiver = p_correo. it_receivers-rec_type = 'U'. it_receivers-express = 'X'. it_receivers-com_type = 'INT'. APPEND it_receivers. CLEAR it_receivers. ENDFORM. " informar_destinatario *&--------------------------------------------------------------------
    *& Form get_job_details *&--------------------------------------------------------------------
    FORM get_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. MESSAGE s000(z2) WITH 'job: ' gd_jobname. ENDFORM. " get_job_details *&--------------------------------------------------------------------
    *& Form conver_spool_pdf *&--------------------------------------------------------------------
    FORM conver_spool_pdf. CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' EXPORTING src_spoolid = mi_rqident no_dialog = ' ' dst_device = 'LOCL' 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. CHECK sy-subrc = 0. LOOP AT mtab_pdf. TRANSLATE mtab_pdf USING ' '. CONCATENATE v_buffer mtab_pdf INTO v_buffer. ENDLOOP. TRANSLATE v_buffer USING ' '. DO. it_mess_att = v_buffer. APPEND it_mess_att. SHIFT v_buffer LEFT BY 255 PLACES. IF v_buffer IS INITIAL. EXIT. ENDIF. ENDDO. ENDFORM. " conver_spool_pdf *&--------------------------------------------------------------------
    *& Form delete_spool *&----
    FORM delete_spool. DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char, ld_status LIKE sy-subrc. CLEAR: ld_spool_nr, ld_status. ld_spool_nr = mi_rqident. CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ' EXPORTING spoolid = ld_spool_nr IMPORTING status = ld_status. ENDFORM. " delete_spool I don't know where the error can be and I've been working on it for 2 days... Do I have to download the PDF to a file ??? In that case, how do I attach then the file ?? Thanks a lot in advance, Regards !!

    Sorry, I wrote it as the code appears in SAP and didn't know I can format it..I hope I've done it ok now..
    As I run the report through a job, I do it like this:
    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.
    Then I get the spool:
    DATA: lc_rq2name LIKE tsp01-rq2name.
    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.
    CLEAR wa_tbtcp.
    READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
    IF sy-subrc = 0.
    f_rqident = wa_tbtcp-listident.
    After this I create the PDF:
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = mi_rqident
    no_dialog = ' '
    dst_device = 'LOCL'
    IMPORTING
    pdf_bytecount = mi_bytecount
    TABLES
    pdf = mtab_pdf.
    LOOP AT mtab_pdf.
    TRANSLATE mtab_pdf USING ' ~'.
    CONCATENATE
    v_buffer
    mtab_pdf
    INTO v_buffer.
    ENDLOOP.
    TRANSLATE v_buffer USING '~ '.
    DO.
    it_mess_att = v_buffer.
    APPEND it_mess_att.
    SHIFT v_buffer LEFT BY 255 PLACES.
    ENDDO.
    To send the mail..
    DATA: w_cnt TYPE i
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    cont type i.
    doc_chng-obj_name = 'Probando envio mail'.
    doc_chng-obj_descr = 'Probando asunto mail'.
    READ TABLE it_mess_att INDEX w_cnt.
    DESCRIBE TABLE objtxt LINES tab_lines.
    doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ).
    CLEAR t_attachment.
    REFRESH t_attachment. t_attachment[] = it_mess_att[].
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'RAW'.
    objpack-obj_descr = doc_chng-obj_descr.
    DESCRIBE TABLE t_attachment LINES objpack-body_num.
    objpack-doc_type = 'PDF'.
    objpack-obj_descr = 'OBJ_Descr'.
    objpack-obj_name = 'obj_name'.
    objpack-doc_size = objpack-body_num * 255.
    APPEND objpack. objhead = 'Envio mail'.
    READ TABLE objtxt INDEX tab_lines.
    reclist-receiver = p_mail.
    reclist-rec_type = 'U'.
    reclist-express = 'X'.
    reclist-com_type = 'INT'.
    APPEND reclist.
    CLEAR reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_chng
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist .
    Edited by: poketina on Nov 19, 2009 4:51 PM
    Sorry, i don't know how to give format....

  • Convert Smartform Output to PDF

    Hi all,
    I am trying to save Output of Smartform in PDF file format. for that purpose i am calling "CONVERT_OTF" FM from my driver program.
    But it is giving me Information "OTF end command // missing in OTF data"
    while executing FM "CONVERT_OTF". i debug it it is giving Sy-subrc = 2.
    Please Help me in this context. I am also givin code of my driver program:
    TABLES: vbrp.
    DATA: fm_name TYPE rs38l_fnam,
    it_invoice TYPE STANDARD TABLE OF vbrp,
    it_invoice_wa TYPE vbrp,
    it_inv TYPE STANDARD TABLE OF vbrp,
    it_inv_wa TYPE vbrp,
    invoice_no(25) TYPE c,
    invoice_l(10) TYPE c,
    invoice_h(10) TYPE c.
    Converting Output to PDF Declaration **********
    DATA: tab_otf_data TYPE ssfcrescl,
    pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
    bin_filesize LIKE sood-objlen,
    outop TYPE ssfcompop, " Output Parameters
    cparam TYPE ssfctrlop, " Control Parameters
    tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
    my_tabix TYPE sy-tabix,
    file_size TYPE i.
    SELECT-OPTIONS doc_no FOR vbrp-vbeln.
    SELECT vbeln posnr fkimg vrkme meins netwr matnr
    FROM vbrp INTO CORRESPONDING FIELDS
    OF TABLE it_invoice
    WHERE vbeln IN doc_no.
    Inserting Unique Invoice Numbers for Displaying Individual Details in
    Smart Form
    LOOP AT it_invoice INTO it_invoice_wa.
    AT NEW vbeln.
    MOVE it_invoice_wa-vbeln TO it_inv_wa-vbeln.
    APPEND it_inv_wa TO it_inv.
    ENDAT.
    ENDLOOP.
    invoice_no = doc_no.
    invoice_l = doc_no-low.
    invoice_h = doc_no-high.
    suppressing the Print dialog box *********************
    *outop-tddest = 'locl'.
    *cparam-no_dialog = 'X'.
    *cparam-preview = space.
    *cparam-getotf = 'X'.
    START-OF-SELECTION.
    Calling Smart Form *********************************
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZSB_SMARTFORM_INVOICE'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = fm_name
    CALL FUNCTION fm_name
    EXPORTING
    invoice_no_h = invoice_h
    invoice_no_l = invoice_l
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = outop
    user_settings = ''
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO = tab_otf_data
    JOB_OUTPUT_OPTIONS =
    TABLES
    it_invoice = it_invoice
    it_inv = it_inv
    ***removing the initial and final markers from the OTF data*********
    DELETE tab_otf_data-otfdata WHERE tdprintcom = '//'.
    searching for the end-of-page in OTF table************
    READ TABLE tab_otf_final WITH KEY tdprintcom = 'EP'.
    my_tabix = sy-tabix + 1.
    appending the modified OTF table to the final OTF table****
    *INSERT LINES OF tab_otf_data-otfdata INTO tab_otf_final INDEX my_tabix.
    tab_otf_final[] = tab_otf_data-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    IMPORTING
    bin_filesize = bin_filesize
    BIN_FILE =
    TABLES
    otf = tab_otf_final
    lines = pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 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.
    *ENDIF.
    write :/ bin_filesize.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = bin_filesize
    filename = 'E:/Test.pdf'
    FILETYPE = 'ASC'
    IMPORTING
    FILELENGTH = file_size
    tables
    data_tab = pdf_tab
    FIELDNAMES =
    Help will be rewarded.
    Regards,
    Sachin

    hi
    good
    go through this ,hope this ll help you to solve this problem
    Check out the following documentation and example program and help links
    s_control_parameters-no_dialog = 'X'.
    s_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = s_output_options
    control_parameters = s_control_parameters
    IMPORTING
    job_output_info = s_job_output_info
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    here is the example for SAMRTFORM TO PDF.
    http://www.sap4.com/wiki/index.php/Genera_PDF_a_partir_de_Smartforms
    Example Program
    data:
    fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
    sf_name TYPE TDSFNAME
    value 'YOUR_FORM_NAME', "Smart Forms: Form Name
    P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
    P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
    P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
    P_LANGUAGE TYPE SFLANGU value 'E',
    P_E_DEVTYPE TYPE RSPOPTYPE.
    data:
    P_BIN_FILESIZE TYPE I,
    P_BIN_FILE TYPE XSTRING,
    P_OTF type table of ITCOO,
    P_DOCS type table of DOCS,
    P_LINES type table of TLINE,
    name type string,
    path type string,
    fullpath type string,
    filter type string,
    guiobj type ref to cl_gui_frontend_services,
    uact type i,
    filename(128).
    GET SMARTFORM FUNCTION MODULE NAME ---
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = sf_name
    IMPORTING
    FM_NAME = 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 FUNCTION 'SSF_GET_DEVICE_TYPE'
    EXPORTING
    I_LANGUAGE = P_LANGUAGE
    I_APPLICATION = 'SAPDEFAULT'
    IMPORTING
    E_DEVTYPE = P_E_DEVTYPE.
    P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
    P_OUTPUT_OPTIONS-XSF = SPACE.
    P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
    P_OUTPUT_OPTIONS-XDF = SPACE.
    P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
    P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    P_CONTROL_PARAMETERS-GETOTF = 'X'.
    ****...................................PRINTING.........................
    CALL FUNCTION fm_name
    EXPORTING
    CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
    OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
    (....) <--- your form import parameters
    IMPORTING
    JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
    ****...................................CONVERT TO PDF...............
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
    IMPORTING
    BIN_FILESIZE = P_BIN_FILESIZE
    TABLES
    OTF = P_OTF
    DOCTAB_ARCHIVE = P_DOCS
    LINES = P_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.
    concatenate 'xxxx' '.pdf' into name.
    ****..................................REQUEST FILE NAME.................
    create object guiobj.
    call method guiobj->file_save_dialog
    EXPORTING
    default_extension = 'pdf'
    default_file_name = name
    file_filter = filter
    CHANGING
    filename = name
    path = path
    fullpath = fullpath
    user_action = uact.
    if uact = guiobj->action_cancel.
    exit.
    endif.
    move fullpath to filename.
    ****..................................DOWNLOAD AS FILE................
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = P_BIN_FILESIZE
    FILENAME = filename
    FILETYPE = 'BIN'
    TABLES
    DATA_TAB = P_LINES
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward poing if helpful..
    thanks
    mrutyun^

Maybe you are looking for

  • Error RCIRAS0546, failure occured while the report was being processed

    Hello all, We use Crystal Reports 2008 V1 server on Linux. With 2 reports now we get the error when viewing the report from the Central Management Console (CMC) "Your request could not be completed because a failure occurred while the report was bein

  • Display corruption after resume from suspend-to-disk

    Garbage is also visible on the display immediately before entering suspend-to-RAM, but it resumes successfully, so that's not a priority. The resume process (using uswsusp) appears to complete (reaches 100%) but then the display is replaced by garbag

  • Change in material master

    Dear all, I am trying to change the Price control of a material from V to S. It is showing me a system message as follows: Price control cannot be changed (cost component split exists) Message no. M3160 Diagnosis Costing is active and has already bee

  • WISM and AP homing

    Hi We have just deployed approx 290 AP's and we have three WISM's (A,B,C) with 150 primary to A (secondary is B), 150 primary to B (secondary is A). Ignoring the fact that there are two controllers per WISM, when we shut WISM A down we get approx 250

  • How do I delete files that have been downloaded?

    there are files in my download I would like to remove as they seem to be causing a problem with my computer performance.