Smartforms to PDF conversion problem

Hi experts,
I have a fix that requires to send an email with a smartform as a pdf attachment. i was able to send the email with attachment but as i open the pdf file an error <b>''There was an error while opening a document. The file is damaged and file could not be repaired.'</b> or <b>'Adobe could not open *.pdf because it is either not supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).</b>
I already debug my program and what i saw from my OTFDATA that is being returned by the smartform are <b>chinese characters and boxes</b> instead of hashes,alpa characters and etc (please note that my SF does not use any chinese script). I think that the error is due this.
Has anyone encountered this type of problem? Please help.
Also please note that this fix is migrated from a non-unicode dev box to a unicode system dev box
Thanks in advance.

hi tanmoy,
i have installed the foxit reader and yet the error is still there. I believe that the error is coming from the otfdata that my smartform is generating.
As an added information. My program is a Copy from another development box (BOX NA). When i run the program in BOX NA the code works fine and an email is sent to me, but on the dev box i am working right now it does not work fine.
The program in the dev box is a the migrated version of the program in BOX NA.

Similar Messages

  • PDF Conversion problem

    Hi ABAPers
    While sending smartform as a mail attachment(PDF Format) i am facing problem.
    While opening the PDF attachment in SOST (T-code), It shows a error pop up.(I.e., Conversion Problem in PDF). Some pages are getting opened as a blank page and some are not getting opened.
    What may be the prolem.
    Please help Me out ............
    But it works properly in IDES version.
    In IDES i have ADOBE 5.0 Version, In Live server it is ADOBE 6.0 ,7.0.

    Hi,
    Thanks for your feedback
    There is no problem in the coding , is there any thing we have to do in configuration level regarding PDF ?????
    *& Report  ZVNPAML
    REPORT  zvnpaml.
    TABLES: somlrec90.
    DATA: it_zvnpa  TYPE TABLE OF zvnpa,
          it_zvnpa1 TYPE TABLE OF zvnpa,
          wa_zvnpa  TYPE zvnpa,
          it_head   TYPE TABLE OF zvnpa,
          it_head1  TYPE TABLE OF zvnpa,
          wa_head   TYPE zvnpa,
          wa_head1  TYPE zvnpa,
          fmname    TYPE rs38l_fnam,
          tot       TYPE zvnpa-wrshb,
          otfout    TYPE ssfcrescl,
         outopt   type SSFCRESOP,
          pdftab    TYPE TABLE OF tline WITH HEADER LINE,
          datab     TYPE TABLE OF itcoo WITH HEADER LINE,
          conpar    TYPE ssfctrlop,
          mailrec   TYPE swotobjid,
          outopt    TYPE ssfcompop,
          jobopt    TYPE ssfcresop,
          jobout    TYPE ssfcrescl,
          w_return  TYPE ssfcrescl,
          it_otf    TYPE itcoo OCCURS 0 WITH HEADER LINE,
          binsz     LIKE sood-objlen,
          i_tline   TYPE TABLE OF tline WITH HEADER LINE,
          wa_buffer TYPE string,"To convert from 132 to 255
          i_record  LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA: wa_doc_data   TYPE sodocchgi1,
          it_pack       TYPE TABLE OF sopcklsti1,
          wa_pack       TYPE sopcklsti1,
          it_mailhead   TYPE TABLE OF solisti1,   " OCCURS 1 WITH HEADER LINE,
          wa_mailhead   TYPE solisti1,
          it_mailbody   TYPE TABLE OF solisti1,      "  OCCURS 0 WITH HEADER LINE,
          wa_mailbody   TYPE solisti1,
          it_receiverid TYPE TABLE OF somlrec90,  " OCCURS 10 WITH HEADER LINE.
          wa_receiverid TYPE somlrec90,
          it_attach     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
         wa_attach     TYPE solisti1,
          lncnt         TYPE i.
    DATA: lv_spool TYPE tsp01-rqident,
          wa_line  TYPE tsp01-rqident,
          it_pdf_output TYPE TABLE OF tline.
    SELECTION-SCREEN BEGIN OF BLOCK vendor WITH FRAME TITLE text-w03.
    *PARAMETERS: pa_lifnr TYPE lfa1-lifnr,
               pa_bukrs TYPE zvnpa-bukrs,
    PARAMETERS:     pa_augdt TYPE zvnpa-augdt.
    SELECT-OPTIONS: pa_mail FOR somlrec90-receiver NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK vendor.
    SELECT * FROM zvnpa INTO CORRESPONDING FIELDS OF TABLE it_zvnpa1
                        WHERE augdt =  pa_augdt
                        AND   bukrs =  '2000'
                        AND   flag  <> 'X'.
                                                 konto = pa_lifnr AND
                                                 bukrs = pa_bukrs AND
    IF it_zvnpa1 IS NOT INITIAL.
      SORT it_zvnpa1 BY konto.
      LOOP AT it_zvnpa1 INTO wa_zvnpa.
        APPEND wa_zvnpa TO it_zvnpa.
        CLEAR: wa_zvnpa.
        AT END OF konto.
          SORT it_zvnpa BY ttref augbl wrshb shkzg.
    *it_head[] = it_zvnpa[].
          LOOP AT it_zvnpa INTO wa_zvnpa WHERE shkzg = 'S'.
            APPEND wa_zvnpa TO it_head1.
            CLEAR: wa_zvnpa.
          ENDLOOP.
    *delete adjacent duplicates from it_head comparing ttref.
          SORT it_head1 BY ttref augbl wrshb shkzg.
           LOOP AT it_head1 INTO wa_head1.
            tot = tot + wa_head1-wrshb.
            wa_head = wa_head1.
            AT END OF ttref.
              wa_head-wrshb = tot.
              APPEND wa_head TO it_head.
              CLEAR: wa_head,tot.
            ENDAT.
            CLEAR: wa_head1.
          ENDLOOP.
          SORT it_head BY ttref augbl wrshb shkzg.
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname = 'ZVNPASF'
            IMPORTING
              fm_name  = fmname.
          conpar-no_dialog = 'X'.
          conpar-getotf    = 'X'.
          outopt-tddest    = 'LOCL'.
          outopt-urlcall   = fmname.
          outopt-tdnoprev  = 'X'.
         outopt-tdnewid   = 'X'.
          CALL FUNCTION fmname
           EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
              control_parameters         = conpar
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
              output_options             = outopt
              user_settings              = ' '
            IMPORTING
      DOCUMENT_OUTPUT_INFO       =
              job_output_info            = w_return
      JOB_OUTPUT_OPTIONS         =
            TABLES
              it_zvnpa                   = it_zvnpa
              it_head                    = it_head.
         READ TABLE w_return-spoolids INTO wa_line INDEX 1.
         IF sy-subrc = 0.
           lv_spool = wa_line.
           CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
               src_spoolid              = lv_spool
               no_dialog                = ' '
               dst_device               = 'LOCL'
             TABLES
               pdf                      = it_pdf_output
             EXCEPTIONS
               err_no_otf_spooljob      = 1
               err_no_spooljob          = 2
               err_no_permission        = 3
               err_conv_not_possible    = 4
               err_bad_dstdevice        = 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.
          it_otf[] = w_return-otfdata[].
          IF it_otf[] IS NOT INITIAL.
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format        = 'PDF'
                max_linewidth = 132
              IMPORTING
                bin_filesize  = binsz
              TABLES
                otf           = it_otf
                lines         = i_tline.
            LOOP AT i_tline.
              TRANSLATE i_tline USING ' ~'.
              CONCATENATE wa_buffer i_tline INTO wa_buffer.
            ENDLOOP.
            TRANSLATE wa_buffer USING '~ '.
            DO.
              i_record = wa_buffer.
              APPEND i_record.
              SHIFT wa_buffer LEFT BY 255 PLACES.
              IF wa_buffer IS INITIAL.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
          IF i_record[] IS NOT INITIAL.
            it_attach[] = i_record[].
           CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
            EXPORTING
              LINE_WIDTH_SRC                    = '132'
              LINE_WIDTH_DST                    = '255'
              TRANSFER_BIN                      = ' '
             TABLES
               content_in                        = i_tline[]
               content_out                       = IT_ATTACH[]
            EXCEPTIONS
              ERR_LINE_WIDTH_SRC_TOO_LONG       = 1
              ERR_LINE_WIDTH_DST_TOO_LONG       = 2
              ERR_CONV_FAILED                   = 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.
           it_attach[] = w_return-otfdata[].
           IF it_pdf_output[] IS NOT INITIAL.
             it_attach[] = it_pdf_output[].
            wa_mailbody-line = 'Dear Sir / Madam,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please be informed that we have remitted the payment towards your outstanding bills as per the attachment:'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Best Regards,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Mary. G '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Finance department'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Intimate Fashions (I) Pvt Ltd'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please do not print this email unless it is absolutely necessary.  Become environment friendly.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'E-MAIL DISCLAIMER.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'If you are not the addressee of this mail, please delete this. Intimate Fashions does not accept any liability on the improper usage of this mail. It may also be legally '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'privileged. Internet communications cannot be guaranteed to be timely, secure or virus free'.
            APPEND wa_mailbody TO it_mailbody.
            DESCRIBE  TABLE it_mailbody LINES lncnt.
            wa_doc_data-obj_descr  = 'Remittance details - Brunet'.
            wa_doc_data-expiry_dat = sy-datum + 10.
            wa_doc_data-obj_name   = 'TRIAL'.
            wa_doc_data-sensitivty = 'F'.
            wa_doc_data-doc_size   = lncnt * 255.
            CLEAR wa_pack.
            CLEAR wa_pack-transf_bin.
            wa_pack-doc_type   = 'RAW'.
             wa_pack-transf_bin = ' '.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 0.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
             wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            DESCRIBE  TABLE it_attach LINES lncnt.
            wa_pack-transf_bin = 'X'.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 1.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
            wa_pack-doc_type   = 'PDF'.
            wa_pack-obj_name   = 'VNPA'.
            CONCATENATE 'Vendor Payment Advice' '.PDF' INTO wa_pack-obj_descr.
             wa_pack-obj_descr  = 'Vendor Payment Advice'.
            READ TABLE it_attach INDEX lncnt.      "INTO WA_ATTACH
             wa_pack-doc_size   = ( lncnt - 1 ) * 255 + STRLEN( it_attach ).
            wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            wa_mailhead = 'Vendor Payment Advice'.
            APPEND wa_mailhead TO it_mailhead.
            CLEAR: wa_mailhead.
            LOOP AT pa_mail.
              wa_receiverid-receiver = pa_mail-low.
              wa_receiverid-rec_type = 'U'.
              APPEND wa_receiverid TO it_receiverid.
              CLEAR:wa_receiverid.
            ENDLOOP.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           CLEAR:wa_receiverid,lncnt.
            CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
              EXPORTING
                document_data                    = wa_doc_data
                put_in_outbox                    = 'X'
                commit_work                      = 'X'
           IMPORTING
              SENT_TO_ALL                      =
              NEW_OBJECT_ID                    =
              TABLES
                packing_list                     = it_pack
                object_header                    = it_mailhead
                contents_bin                     = it_attach[]
                contents_txt                     = it_mailbody
                 CONTENTS_HEX                     = it_attach
              OBJECT_PARA                      =
              OBJECT_PARB                      =
                receivers                        = it_receiverid
             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.
             IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              LOOP AT it_zvnpa INTO wa_zvnpa.
                wa_zvnpa-flag = 'X'.
                MODIFY it_zvnpa FROM wa_zvnpa TRANSPORTING flag.
              ENDLOOP.
              MODIFY zvnpa FROM TABLE it_zvnpa.
            ENDIF.
          ENDIF.
          CLEAR: wa_zvnpa,it_zvnpa,it_otf,it_otf[],w_return,lncnt,
                 wa_doc_data,
                 wa_head,it_head,it_head1,
                 i_record,i_record[],
                 i_tline,i_tline[],
                 it_pack,
                 wa_pack,
                 it_mailhead,
                 wa_mailhead,
                 it_mailbody,
                 wa_mailbody,
                 it_receiverid,
                 wa_receiverid,
                 it_attach.
        ENDAT.
      ENDLOOP.
    ENDIF.

  • HTML to PDF conversion - problems with page-breaks and bookmarks

    Hello,
    My company is currently considering updating your software (from Acrobat 9 Pro to Acrobat XI Pro) and I’ve been assigned to research its features and make sure that it is a right fit for our goals. Basically we want to automate the whole process as much as possible and we want to create PDF directly from HTML. We’re providing a lot of content in HTML and we need a fast way to transfer it into PDF format. There are however some guidelines:
    We want page-breaks in is this kind of documents, and thus - your app needs to be able to interpret HTML and put them where we want to;
    We need to have bookmarks in there. Converter must be able to make them based on headlines from HTML source or afterwards, directly in PDF by using some auto-bookmarks feature;
    There has to be table of content generated, based on HTML Link Tags if possible. Here’s sample of TOC structure that we have currently:
    <A NAME="redirect">sample_text</A>
    <A HREF="#redirect">sample_text</A>
    Of course we can modify HTML in any way you want us to. The important thing for us is to make it work in PDF without the need to make a lot of manual changes after conversion.
    I’ve been messing with Acrobat 9 Pro and reading some documentation that you have provided and I’m convinced that point 3 is not a problem. I’m aware that Acrobat 9 Pro is not having any difficulties with links in document and they work fine in PDF format that has been created from HTML.
    Page-breaks on the other hand are bothering me. Your app is apparently ignoring every HTML code that the Internet is advising me to use to force page-break where I want. Honestly - I’ve tested like ten ways to make them and not even one was working. That’s why I’m asking for your help.
    Another problematic subject for me is the bookmarks creation. I know that they are not a problem if I’m doing DOC to PDF conversion. Then I’m able to decide what header should be used as a curtain level of bookmarks and everything is working great at the end. However - with direct HTML to PDF conversion - I really don’t know how to generate bookmarks that are based on the source of the input document. Is there any way to make fully working 2 level bookmark tree in this case? Here’s an example of the structure we want at the end:
    header1
    header2
    header2
    header1
    header1
    header2
    Could you please help me in finding the solutions? Just like I’ve mentioned - we can modify input HTML in any way, but in the end we would like to achieve our goals as quickly as possible.
    Please excuse my English.
    I am looking forward to your response,
    Lucas

    Frankly - we would like to avoid using Word. We are using it currently but there are long-term plans of improving whole conversion process, eliminate any mid-steps and automate as much as possible even though conversion is not going to be done unattended on a server. Thank you for your response, but I hope that maybe someone else would have any idea?

  • Smartform to PDF conversion having issue with Russian address

    We are having a business situation we are the invoice in English language and the the address of ship-to party and sold-to party in Russian.
    The issue we face is.
    When the  smartform is converted to PDF the Russian specific characters are missing in the PDF output. The same are perfect in the smart form print preview.
    we are using   CONVERT_OTF function module and we are getting the Russian characters correctly in the table parameter OTF.
    We are using "SX_TABLE_LINE_WIDTH_CHANGE" and " SO_DOCUMENT_SEND_API1"
    function module to attach and mail the pdf.
    In the PDF we are missing the Russian specific characters .
    For Example in "Sedláčkova čč" the output is "Sedláčkova    " means "čč" is mising
    Thanks in advance
    Regards
    Joby

    Hi,
    As described in note 999712 - PDF conversion for Unicode, there is a new unicode PDF converter PDFUC.
    It depends on the SAP Version if you have to install the device type or not. You can check also via SPAD -> Full Administration -> Device Types -> Display.
    You can pass the device type in the output options. I used:
    SSFCTRLOP-no_dialog   = 'X'.
    SSFCTRLOP-getotf      = 'X'.
    SSFCTRLOP-langu       = 'EN'.
    SSFCOMPOP-tdprinter = 'PDFUC'.
    If you specify a device other than printer in the control options like SSFCTRLOP-device      = 'TELEFAX'., above will not work as
    SSFCOMPOP-tdprinter is only evaluated for printer.
    You have to check in SCOT -> Settings -> Device Types for Format Conversion.
    You can make a general entry or for a specific language:
    PDF                           SAPscript/Smart Forms    PDFUC
    PDF    EN    English    SAPscript/Smart Forms    PDFUC
    Let me know if you get this working.
    Jeroen.

  • Smartform to pdf conversion and send as attachment

    Hi,
    my requirement is i have to change the smartform to pdf and send as attachment to mail id's.
    For specified smartform it is converting and sending as pdf
    but in my selection screen i have to give smartform name and mail id's.
    if i give any other smartform name it is going to dump.because of parameters.
    every smartform is not having same parameter.
    so how i can differentiate between the smartforms
    it means import and export parameters are changing for every smartform.
    how to solve this problem.
    thanks.
    venki
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Dec 28, 2009 2:20 PM

    Hi Venki,
    Use the below code...
    Give the form name into SSF function module from the selection screen and get the import parameter  FM name (smartform FM which will be unique). Give that to the next FM and get the import parameter and covert the same to pdf using the CONVERT OTF.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = P_FORMNAME
    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 FM_NAME
       EXPORTING
         CONTROL_PARAMETERS         = WA_CTRLOP
         OUTPUT_OPTIONS             = WA_OUTOPT
         USER_SETTINGS              = 'X'
       IMPORTING
         JOB_OUTPUT_INFO            = T_OTFDATA
        TABLES
          T_ITAB                     = T_ITAB3
       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.
    T_OTF[] = T_OTFDATA-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        FORMAT = 'PDF'
        MAX_LINEWIDTH = 132
      IMPORTING
        BIN_FILESIZE = W_FILESIZE
      TABLES
        OTF = T_OTF[]
        LINES = T_PDF_TAB[]
      EXCEPTIONS
        ERR_MAX_LINEWIDTH = 1
        ERR_FORMAT = 2
        ERR_CONV_NOT_POSSIBLE = 3
        OTHERS = 4.
    Cheers,
    Sanil
    T
    Code Formatted by: Alvaro Tejada Galindo on Dec 28, 2009 2:19 PM

  • Scanner to pdf conversion problem

    For some unknown reason I recently started having problems with Adobe Acrobat X Pro (version 10.1.4) in converting via the scanner to pdf conversion basic text documents. It used to take a minute or two to convert a basic text document, now it is taking almost a half hour for a basic text one page conversion. Any ideas?

    Sorry for the inconvenience caused while scanning. We are actively trying to fix the issue and need help from users like you in narrowing down the fix. I’d request you to do the following when you run into this issue:
    • Please send me a private message or e-mail me at [email protected] immediately and I will get back to you within one business day for next steps
    • Please take a back-up or copy of any folders or files (e.g. App Data), in case you choose to delete them as a workaround

  • Smartform to pdf conversion Doubt

    Dear Expert
    i'm refering the below code to convert smartform to pdf in module pool program i have created two pushbuttons one for preview and one for edit, if users edit the values it will store in ztable and then they want to preview that changes in form but its not happening its showing old values only i tried to free the container and cleared the data and url values but still same this how to rectify this can some one hlep me out,
    FIELD-SYMBOLS <FS_X> TYPE X.
    INITIALIZATION.
    LS_CONTROL_PARAM-GETOTF = 'X'.
    LS_CONTROL_PARAM-NO_DIALOG = 'X'.
    START-OF-SELECTION.
      CALL FUNCTION '/1BCDWB/SF00000034'
    EXPORTING
    *    ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
         CONTROL_PARAMETERS         = LS_CONTROL_PARAM
         P_VBELN                    = P_VBELN
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
    IMPORTING
    *      DOCUMENT_OUTPUT_INFO  = L_DOCUMENT_OUTPUT_INFO
           JOB_OUTPUT_INFO       = L_JOB_OUTPUT_INFO
    *      JOB_OUTPUT_OPTIONS    = L_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.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE
        TABLES
          OTF                   = L_JOB_OUTPUT_INFO-OTFDATA
          LINES                 = LT_PDF
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
    * convert pdf to xstring string
      LOOP AT LT_PDF INTO LS_PDF.
        ASSIGN LS_PDF TO <FS_X> CASTING.
        CONCATENATE LV_CONTENT <FS_X> INTO LV_CONTENT IN BYTE MODE.
      ENDLOOP.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
      CREATE OBJECT G_HTML_CONTAINER
        EXPORTING
          CONTAINER_NAME = 'PDF'.
      CREATE OBJECT G_HTML_CONTROL
        EXPORTING
          PARENT = G_HTML_CONTAINER.
    * Convert xstring to binary table to pass to the LOAD_DATA method
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = LV_CONTENT
        TABLES
          BINARY_TAB = LT_DATA.
    * Load the HTML
      CALL METHOD G_HTML_CONTROL->LOAD_DATA(
         EXPORTING
           TYPE         = 'application'
           SUBTYPE      = 'pdf'
         IMPORTING
           ASSIGNED_URL         = LV_URL
         CHANGING
           DATA_TABLE           = LT_DATA
         EXCEPTIONS
           DP_INVALID_PARAMETER = 1
           DP_ERROR_GENERAL     = 2
           CNTL_ERROR           = 3
           OTHERS               = 4 ).
    * Show it
      CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
        IN_PLACE = 'X' ).
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards,
    Thirukumaran. R
    Edited by: thirukumaran rajendran on Jun 9, 2010 3:19 PM

    hey,,
      U can use 'RSTXPDFT4'

  • PDF conversion problem after password change

    I am in a loop: having changed password, Adobe insists on new subscription to PDF conversion before converting a document, but will not accept my submission because I already have a subscription with 4 months still to run before renewal. How do I sort this idiot out?

    Which subscription service did you purchase?  Adobe PDF Pack or ExportPDF?
    Could you make sure that you are signed in before converting documents?
    Go to the home screen of Adobe Reader for iOS.
    Tap My Account in the lower left corner.
    Tap the blue Sign In button.
    Sign in with your Adobe ID and new password.
    (Tap/click the image above to enlarge)
    Additionally, please take a look at this FAQ page for account information.
    Adobe ID | Sign in | Change email, password, or account information
    Please let us know if you need further assistance.

  • Smartforms o/p 2 PDF conversion problem , plz see my code

    Hi Smartform Guys
    1)I m getting error <b>"CONVT_NO_NUMBER "</b>  in converting my Smartform output to PDF.
    *Printing of Export Invoice, Packing List,Enclosure to Packing List &  *
    *Case Marking in one SMART FORMS Layout                                *
    REPORT ZSD_REP_MULTI_PRINT.
    TABLES :
        vbak,
        vbap,
        vbpa,
        vbfa,
        VBRK,
        VBRP,
        LIKP,
        LIPS,
        KONV,
        objk,
        tvko,
        ser01,
        sadr,
        equi,
        makt,
        mast,
        t005t,
        kna1,
        t001w,
        T001,
        ADRC,
        sscrfields,
        zpp_plcmi,      "Packing list history For Conf: Item data
        zplh,           "PACKING LIST HISTORY : HEADER DATA
        zpli.           "PACKING LIST HISTORY : ITEM DATA
    DATA: FM_NAME  TYPE RS38L_FNAM,
          P_E_DEVTYPE TYPE RSPOPTYPE,
          P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
          P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
          P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
          P_DOC  LIKE DOCS OCCURS 2000 WITH HEADER LINE,
          P_LINES LIKE TLINE OCCURS 200,
          P_BIN_FILESIZE TYPE I,
          P_LANGUAGE TYPE SFLANGU,
          P_BIN_FILE TYPE XSTRING.
    DATA: T_ITEM   TYPE  ZSD_TABL_LITEM,
          WA_ITEM  TYPE  ZSD_STRUCT_LITEM,
          T_ADRS   LIKE  ZSD_STRUCT_ADRS  OCCURS 0 WITH HEADER LINE,
          MSLINES  LIKE  TLINE OCCURS 1 WITH HEADER LINE,
          TIDNO    LIKE STXL-TDID,
          TNAME    LIKE STXL-TDNAME,
          TOBJT    LIKE STXL-TDOBJECT,
          SSORD    LIKE VBAK-VBELN,
          TOT      LIKE VBAK-NETWR,
          WORD     LIKE SPELL.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: P_DELNO LIKE  LIKP-VBELN OBLIGATORY,
                P_INVNO LIKE  VBRK-VBELN OBLIGATORY,
                P_DATE  LIKE  SY-DATUM.
    SELECTION-SCREEN END   OF BLOCK blk1.
    AT SELECTION-SCREEN.
      CLEAR T_ADRS.
      REFRESH T_ITEM.
      T_ADRS-INVNO = P_INVNO.
      T_ADRS-INVDAT = P_DATE.
      SELECT SINGLE VBELV INTO  VBFA-VBELV
                             FROM  VBFA
                             WHERE VBELN = P_DELNO
                               AND VBTYP_N = 'J'  .
      SSORD = VBFA-VBELV.
    *Exporter's  Address
      SELECT SINGLE BUKRS_VF INTO  VBAK-BUKRS_VF
                             FROM  VBAK
                             WHERE VBELN = VBFA-VBELV.
      SELECT SINGLE   ADRNR
                      INTO T001-ADRNR
                      FROM T001
                      WHERE BUKRS = VBAK-BUKRS_VF.
      SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
             INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
                   T_ADRS-POST_CODE1, ADRC-COUNTRY)
             FROM  ADRC
             WHERE ADDRNUMBER EQ T001-ADRNR.
      SELECT SINGLE LANDX
                    INTO T_ADRS-COUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    **BUYERS NO & DATE
    SELECT SINGLE BSTNK BSTDK INTO  (T_ADRS-BSTNK,T_ADRS-BSTDK)
                         FROM  VBAK
                         WHERE VBELN = VBFA-VBELV.
    *Consignee Address & Buyer Other Than Consignee
      SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
                                FROM LIKP WHERE VBELN = P_DELNO.
      IF LIKP-KUNNR = LIKP-KUNAG.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
        T_ADRS-ONAME1   =  T_ADRS-CNAME1 .
        T_ADRS-ONAME2   =  T_ADRS-CNAME2 .
        T_ADRS-OSTREET  =  T_ADRS-CSTREET .
        T_ADRS-OCITY    =  T_ADRS-CCITY.
        T_ADRS-OPCODE   =  T_ADRS-CPCODE .
        T_ADRS-OREGIO   =  T_ADRS-CREGIO.
        T_ADRS-OTELF1   =  T_ADRS-CTELF1 .
        T_ADRS-OCOUNTRY =  T_ADRS-CCOUNTRY.
      ELSE.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    *Buyer Other than Consignee
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                   INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
                         T_ADRS-OCITY,  T_ADRS-OPCODE, T_ADRS-OREGIO,
                         T_ADRS-OTELF1, KNA1-ADRNR)
                   FROM  KNA1
                   WHERE KUNNR = LIKP-KUNAG.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-OCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
      ENDIF.
    *Other's Ref
      TIDNO = 'Z071'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-OREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Buyer's Order No  Ref
      TIDNO = 'Z023'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-BUYER = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Exporter Ref
      TIDNO = 'Z072'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-XPREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Pre-Carraige By
      TIDNO = 'Z074'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Place Of reciept by Pre-Carraige
      TIDNO = 'Z073'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLPCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Vessel/Flight No
      TIDNO = 'Z075'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-VFNO = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Loading
      TIDNO = 'Z077'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLOAD = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Discharge
      TIDNO = 'Z076'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PDISG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Final Destination
      TIDNO = 'Z070'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-FDEST = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Terms Of Delivery & Payment
      TIDNO = 'Z080'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-TERMS = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    APPEND T_ADRS.
    *BODY SECTION FOR LINE ITEMS
      SELECT POSNR KWMENG VRKME WAERK
             INTO  (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
             FROM  VBAP
             WHERE VBELN = SSORD.
    *Mark/Case No
        TIDNO = '0002'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-MARKNO = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Packing Type
        TIDNO = '0003'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Description
        TIDNO = '0001'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Quantity
        WA_ITEM-QTY = VBAP-KWMENG.
        WA_ITEM-VRKME = VBAP-VRKME.
    *Goods Rate
        SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
        SELECT SINGLE KBETR WAERS
                      INTO  (WA_ITEM-RATE, WA_ITEM-WAERS)
                      FROM  KONV
                      WHERE KNUMV = VBAK-KNUMV
                        AND KPOSN = VBAP-POSNR
                        AND KSCHL = 'PR00'.
    *Goods Amount
        WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
        WA_ITEM-WAERK = VBAP-WAERK.
        TOT = TOT + WA_ITEM-AMOUNT.
        APPEND WA_ITEM TO T_ITEM.
      ENDSELECT.
      T_ADRS-TOT = TOT.
      CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
         AMOUNT          = TOT
         CURRENCY        = VBAP-WAERK
      FILLER          = ' '
         LANGUAGE        = SY-LANGU
       IMPORTING
         IN_WORDS        = WORD
       EXCEPTIONS
         NOT_FOUND       = 1
         TOO_LARGE       = 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.
    TEXT = WORD-WORD.
    CONCATENATE TEXT
                 'DECIMAL'
                  WORD-WORD
         INTO     TEXT
         SEPARATED BY ' '.
      T_ADRS-TOT_WORDS = WORD-WORD.
      APPEND T_ADRS.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'Z_SD_REP_MULTI_PRINT'
      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.
      P_LANGUAGE = 'EN'.
      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_OUTPUT_OPTIONS-TDDEST = 'LOCL'.
      APPEND P_OUTPUT_OPTIONS.
      P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      P_CONTROL_PARAMETERS-GETOTF = 'X'.
      P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
      APPEND  P_CONTROL_PARAMETERS.
      CALL FUNCTION FM_NAME
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
        USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    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.
    P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
      EXPORTING
        USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
       BIN_FILESIZE                 = P_BIN_FILESIZE
      TABLES
        OTF                          = P_JOB_OUTPUT_INFO-OTFDATA
        DOCTAB_ARCHIVE               = P_DOC
        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.
    BREAK-POINT.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
       BIN_FILESIZE                  = P_BIN_FILESIZE
      CODEPAGE                      = ' '
       FILENAME                      = 'C:\TEMP.PDF'
       FILETYPE                      = 'BIN'
       MODE                          = ''
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
        FILELENGTH                    = P_BIN_FILESIZE
      TABLES
        DATA_TAB                      = P_LINES
      FIELDNAMES                    =
    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.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
        BIN_FILESIZE = P_BIN_FILESIZE
        FILENAME = 'C:\Documents and Settings\pvipin\Desktop\sd.pdf'
        FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    IMPORTING
    FILELENGTH =
    *TABLES
       DATA_TAB = P_LINES.
    FIELDNAMES =
    **EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22 .
    IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  FINDTEXT
          text
    FORM FINDTEXT.
      REFRESH mslines.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = tidno
          language                = sy-langu
          name                    = tname
          object                  = tobjt
        TABLES
          lines                   = mslines
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      DELETE mslines WHERE tdline IS INITIAL.
    ENDFORM.                    "FINDTEXTThnx in Advnce
    Moni
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman

    Hello,
    I think the following statement is causing problem.
    P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
    either give:
    P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA[].
    or
    directly pass P_JOB_OUTPUT_INFO-OTFDATA into FM parameter.
    This is because you are filling only header into P_OTF and NOT the Contents of internal table by the statement
    P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
    let me know whether it works.
    Regards, Murugesh AS
    have alook at this thread:
    Re: SX_OBJECT_CONVERT_OTF_PDF
    this may help you
    Message was edited by: Murugesh Arcot
    Message was edited by: Murugesh Arcot

  • Smartform to PDF Conversion with number of copies to be printed

    Hi,
       I have requirement to display pdf in an iview for which i created a smartform and converted it into PDF using the Function Module 'CONVERT_OTF'.
    Now my requirement is, when the user press the 'Print' option in the Adobe Reader, automatically 3 copies needs to be printed..
    Is there any way to do this? If so, please let me know.
    Thanks,
    Sri

    That is a question for the Adobe applications support. Regards.

  • HTML to PDF conversion problem

    Using Adobe Acrobat Pro X, I am having a problem converting HTML to interactive PDF, all of the HTML does not convert to the PDF.  My HTML code creates "tabbed" data when displayed via a browser.
    I have had success with converting one very LARGE tabbed, HTML file to PDF, but most will only convert the data on the 1st "tab".  Not sure what makes the other files different.  Please can anyone help?
    Thanks,
    Shalayne

    Shgreen3,
    Moving this to Acrobat forum, since this doesn't relate to our CreatePDF service.
    Dave

  • Word to PDF conversion problems

    When I create a PDF from a Word document, several files are generated (instead of one) before and after landscape pages within a large document.   How can I avoid this so that only one PDF is generated?  I get an error saying that the footers are outside the printable area, however, I don't have any problems physically printing the document and the print preview looks fine.

    One way would be to use Apple's way (instead of Microsoft's way) of creating a PDF file from Microsoft Word.
    Try creating it this way:
    While in Microsoft Word, when ready to create a PDF, go to File > Print and instead of printing, click the "PDF" button in the lower left, then click "Save as PDF" from the resulting dropdown.

  • PDF conversion problem with AutoVue 2D Professional 20.2.2. on Windows 2012R2

    I recently installed AutoVue 2D Professional 20.2.2. (30 day trial) on Windows 2012R2 terminal server as a customer demo.
    When trying to export a drawing to PDF (Menu: File/Convert), immediately after pressing OK I receive the following error message:
    Print driver host for applications
    Print driver host for applications has stopped working
    Windows can check online for a solution to the problem.
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: splwow64.exe
      Application Version: 6.3.9600.16384
      Application Timestamp: 5215f01d
      Fault Module Name: GDI32.dll
      Fault Module Version: 6.3.9600.17246
      Fault Module Timestamp: 53dc692a
      Exception Code: c0000005
      Exception Offset: 00000000000a922a
      OS Version: 6.3.9600.2.0.0.16.7
      Locale ID: 1033
      Additional Information 1: b450
      Additional Information 2: b4507c1c540710cc27a93518f693c849
      Additional Information 3: 4bdb
      Additional Information 4: 4bdb1ca1e3287a14667b2f708d05ca86
    When doing a web search for similar errors I find some particular versions of Adobe Reader and some HP printer drivers which caused this problem in the past.
    The advice of Adobe and HP was to update their software.
    This leads me to the opinion that this could rather be a problem of AutoVUE than Windows Server 2012.
    Has anyone else seen this behaviour?
    Does anyone know how to fix this error?
    Any help appreciated.
    Martin

    2012 Is not a certified platform for AutoVue, please read the documentation and install AutoVue on a certified platform
    If you require more information on specific support for a new platform, please contact your sales representative for a timeline for the official support ie update version of the broken functionality
    2012 modified the way drivers are to be implemented and previous versions are no longer compatible.

  • Acrobat 7.0 Pro Excel to pdf conversion problem

    I have a multiple page excel document with specific data on specific pages, basically making slides within excel.  When it prints to a printer, all is well and each page prints as it should.  However, when I convert it to pdf for distribution, it seems like the pages shrink and I get data from page 3 on the bottom of page 2, data from page 4 on the bottom of page 3, and so on until a few pages later, I have a page with the bottom half of one slide, and the top half of another.  Has anyone ever ran into this problem, or can anyone help find a solution?  Thanks!!
    Eric

    Two parts of AA 7 will not install on Win 7 (32 or 64-bit): the Adobe PDF printer and AcroTray.exe. You can install a separate color PS printer (either one from Adobe or possibly one for an HP color PS printer), change the name to Adobe PDF and change the port to FILE. That should do the job, but you will ALWAYS have an extra step in the creation of a PDF. You will have to print to the printer and a PS file will be created (probably with a PRN extension). You then have to open that file in Distiller to create a PDF. From my brief testing, this process will work and the rest of Acrobat and Distiller seem to work (though I did not test extensively). If this is unacceptable to you, then purchase AA XI (upgrade not available from AA 7).

  • Smartform to PDF conversion

    Hi Experts ,
    I am sending an e-mail aith a PDF attachment , the attachment contains a greeting card (BIT MAP file),
    When i find the mail , PDF is opening with error 'Drawing Error Occured'.
    Pls find the sample code ...
              CALL FUNCTION V_FORM_NAME
                EXPORTING
                  ARCHIVE_PARAMETERS = W_ARCLOP
                  CONTROL_PARAMETERS = W_CTRLOP
                  OUTPUT_OPTIONS     = W_COMPOP
                  USER_SETTINGS      = 'X'
                IMPORTING
                  JOB_OUTPUT_INFO    = W_RETURN
                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.
              I_OTF[] = W_RETURN-OTFDATA[].
              CALL FUNCTION 'CONVERT_OTF'
                EXPORTING
                  FORMAT                = 'PDF'
                  MAX_LINEWIDTH         = 132
                IMPORTING
                  BIN_FILESIZE          = V_LEN_IN
                TABLES
                  OTF                   = I_OTF
                  LINES                 = I_TLINE
                EXCEPTIONS
                  ERR_MAX_LINEWIDTH     = 1
                  ERR_FORMAT            = 2
                  ERR_CONV_NOT_POSSIBLE = 3
                  OTHERS                = 4.
              CHECK NOT ( I_TLINE[] IS INITIAL ).
              DATA :LV_COUNTER  TYPE I.
              DATA :LV_FROM     TYPE I.
              LOOP AT I_TLINE.
                TRANSLATE  I_TLINE USING ' ~' .
             CONCATENATE IT_ATTACHMENT_LONG I_TLINE INTO IT_ATTACHMENT_LONG
              ENDLOOP.
              TRANSLATE  IT_ATTACHMENT_LONG USING '~ ' .
              APPEND IT_ATTACHMENT_LONG.
              CLEAR : LV_COUNTER.
              DO.
                LV_COUNTER = STRLEN( IT_ATTACHMENT_LONG ).
                IF LV_COUNTER GE 255.
                  IT_ATTACHMENT = IT_ATTACHMENT_LONG(255).
                  APPEND IT_ATTACHMENT.
                  SHIFT IT_ATTACHMENT_LONG BY 255 PLACES.
                ELSE.
                  IT_ATTACHMENT = IT_ATTACHMENT_LONG(LV_COUNTER).
                  APPEND IT_ATTACHMENT.
                  EXIT.
                ENDIF.
              ENDDO.
    *END:ADDED COMMENTS LINE BY SUHAS 27.01.2007
              DESCRIBE TABLE LT_OBJTXT LINES L_TAB_LINES.
              READ TABLE LT_OBJTXT INDEX L_TAB_LINES.
              LE_DOC_CHNG-DOC_SIZE = ( L_TAB_LINES - 1 ) * 255
                                      + STRLEN( LT_OBJTXT ).
      Title of the email as spool name
      CONCATENATE 'Happy Birthday :'  T522T-ATEXT PA0002-VORNA PA0002-NACHN
      INTO TITLE SEPARATED BY SPACE.
              LV_DOCUMENT_DATA-OBJ_DESCR = TITLE.
              LV_DOCUMENT_DATA-SENSITIVTY = 'O'.
              LV_DOCUMENT_DATA-EXPIRY_DAT = SY-DATUM + 15.
              LV_DOCUMENT_DATA-DOC_SIZE = STRLEN( LT_OBJTXT ).
      e-mail body
              CLEAR LT_OBJPACK.
              LT_OBJPACK-HEAD_START = 1.
              LT_OBJPACK-HEAD_NUM = 0.
              LT_OBJPACK-BODY_START = 1.
              LT_OBJPACK-BODY_NUM = L_TAB_LINES.
              LT_OBJPACK-DOC_TYPE = 'RAW'.
              APPEND LT_OBJPACK.
    *START:ADDED COMMENTS BY SUHAS 27.01.2007
      For e-mail attachment
              DESCRIBE TABLE IT_ATTACHMENT LINES L_ATT_LINES.
              READ TABLE IT_ATTACHMENT INDEX L_ATT_LINES.
    *END:ADDED COMMENTS BY SUHAS 27.01.2007
    *START:ADDED COMMENTS BY SUHAS 27.01.2007
              CLEAR LT_OBJPACK.
              LT_OBJPACK-TRANSF_BIN = 'X'.
              LT_OBJPACK-HEAD_START = 1.
              LT_OBJPACK-HEAD_NUM = 1.
              LT_OBJPACK-BODY_START = 1.
              LT_OBJPACK-BODY_NUM = L_ATT_LINES.
              LT_OBJPACK-DOC_TYPE = 'PDF'.
              LT_OBJPACK-OBJ_NAME = 'email'.
              LT_OBJPACK-OBJ_DESCR = LV_SPOOL_DESC.
              LT_OBJPACK-DOC_SIZE = ( 255 * ( L_ATT_LINES - 1 ) ) +
    STRLEN(
              IT_ATTACHMENT-LINE ).
              LT_OBJPACK-OBJ_NAME   = 'Salary Slip'.
              LT_OBJPACK-OBJ_NAME   = TITLE.
              WRITE SY-DATUM TO LT_OBJPACK-OBJ_DESCR.
              CONCATENATE 'Bday' LT_OBJPACK-OBJ_DESCR INTO
        LT_OBJPACK-OBJ_DESCR
              SEPARATED BY SPACE.
              CONCATENATE LT_OBJPACK-OBJ_DESCR '.PDF' INTO
        LT_OBJPACK-OBJ_DESCR.
              APPEND LT_OBJPACK.
    *END:ADDED COMMENTS BY SUHAS 27.01.2007
              LT_RECLIST-RECEIVER = PA0105-USRID_LONG.
              LT_RECLIST-REC_TYPE = 'U'.
              APPEND LT_RECLIST.
              CLEAR LT_RECLIST.
              LT_RECLIST-RECEIVER = V_RESMAIL.
              LT_RECLIST-REC_TYPE = 'U'.
              APPEND LT_RECLIST.
              CLEAR LT_RECLIST.
    *START:ADDED LINE BY SUHAS 25.01.08
              SELECT SINGLE BUKRS INTO PA0001-BUKRS
              FROM PA0001
              WHERE PERNR EQ IT_PA0001-PERNR AND
                    BEGDA LE SY-DATUM AND
                    ENDDA GE SY-DATUM.
              SELECT A~PERNR INTO CORRESPONDING FIELDS OF TABLE IT_PR
              FROM ZHR_BIRTHDAY AS A INNER JOIN PA0001 AS B ON
                   APERNR EQ BPERNR
              WHERE A~DFLAG = '' AND
                    B~BUKRS EQ PA0001-BUKRS AND
                    B~BEGDA LE SY-DATUM AND
                    B~ENDDA GE SY-DATUM.
              LOOP AT IT_PR.
                SELECT SINGLE USRID_LONG INTO PA0105-USRID_LONG
                FROM PA0105
                WHERE PERNR = IT_PR-PERNR AND
                      SUBTY = '0010' AND
                      BEGDA LE SY-DATUM AND
                      ENDDA GE SY-DATUM.
                IF SY-SUBRC = 0.
                  LT_RECLIST-RECEIVER = PA0105-USRID_LONG.
                  LT_RECLIST-REC_TYPE = 'U'.
                  APPEND LT_RECLIST.
                ENDIF.
              ENDLOOP.
    *END:ADDED LINE BY SUHAS 25.01.08
    Provide Employee Email List Cost Centerwise.
              IF IT_PA0001-KOSTL NE ''.
                SELECT PERNR INTO PA0001-PERNR
                FROM PA0001
                WHERE KOSTL = IT_PA0001-KOSTL AND
                      BEGDA LE SY-DATUM AND
                      ENDDA GE SY-DATUM.
                  IF SY-SUBRC = 0.
    *CHECKING EMPLOYEE ACTIVE STATUS.
                    CALL FUNCTION 'RP_GET_FIRE_DATE'
                    EXPORTING
                      PERSNR         = PA0001-PERNR
        STATUS2        = '0'
                   IMPORTING
                      FIREDATE       = FIRE_DATE1.
                    IF FIRE_DATE1 IS NOT INITIAL.
                    ELSE.
                      SELECT SINGLE USRID_LONG INTO PA0105-USRID_LONG
                      FROM PA0105
                      WHERE PERNR = PA0001-PERNR AND
                            SUBTY = '0010' AND
                            BEGDA LE SY-DATUM AND
                            ENDDA GE SY-DATUM.
                      IF SY-SUBRC = 0.
                        LT_RECLIST-RECEIVER = PA0105-USRID_LONG.
                        LT_RECLIST-REC_TYPE = 'U'.
                        APPEND LT_RECLIST.
                      ENDIF.
                    ENDIF.
                  ENDIF.
                ENDSELECT.
              ENDIF.
    for it department employee
             SELECT SINGLE PERNR INTO PA0001-PERNR
             FROM PA0001
             WHERE PERNR EQ IT_PA0001-PERNR AND
                   KOSTL IN S_KOSTL.
             IF SY-SUBRC = 0.
               SELECT PERNR INTO PA0001-PERNR
               FROM PA0001
               WHERE PERNR IN S_RESPER AND
                     KOSTL IN S_KOSTL.
                 SELECT SINGLE USRID_LONG INTO PA0105-USRID_LONG
                  FROM PA0105
                  WHERE PERNR = PA0001-PERNR AND
                        SUBTY = '0010' AND
                        BEGDA LE SY-DATUM AND
                        ENDDA GE SY-DATUM.
                 IF SY-SUBRC = 0.
                   LT_RECLIST-RECEIVER = PA0105-USRID_LONG.
                   LT_RECLIST-REC_TYPE = 'U'.
                   APPEND LT_RECLIST.
                 ENDIF.
               ENDSELECT.
             ENDIF.
      send mail with attachment
              CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
                EXPORTING
                  DOCUMENT_DATA              = LV_DOCUMENT_DATA
                  PUT_IN_OUTBOX              = 'X'
                  COMMIT_WORK                = 'X'
                TABLES
                  PACKING_LIST               = LT_OBJPACK
                  OBJECT_HEADER              = LT_OBJHEAD
                  CONTENTS_BIN               = IT_ATTACHMENT
                  CONTENTS_TXT               = LT_OBJTXT
                  RECEIVERS                  = LT_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.
              CASE SY-SUBRC.
                WHEN 0.
                  WRITE: / 'Many many happy returns of the day '.
                  LOOP AT LT_RECLIST.
                    IF LT_RECLIST-RETRN_CODE = 0.
                      WRITE '...sent successfully!!!'.
                    ELSE.
                      WRITE 'not sent'.
                    ENDIF.
                  ENDLOOP.
                WHEN 1.
                WHEN 2.
            WRITE: / 'document could not be sent to any of the recipients!'.
                WHEN 4.
                  WRITE: / 'no authorization to send !'.
                WHEN OTHERS.
                  WRITE: / 'error occurred during sending !'.
              ENDCASE.
              REFRESH:LT_RECLIST.
              CLEAR:MI_RQIDENT,LV_SPOOL_DESC,MC_VALID,
    IT_ATTACHMENT_LONG,IT_ATTACHMENT,LV_DOCUMENT_DATA,MSTR_PRINT_PARMS,
              LE_DOC_CHNG,LV_DOCUMENT_DATA,V_EMAIL,V_CELL,V_EXT.
              REFRESH:LT_PDF,IT_ATTACHMENT_LONG,IT_ATTACHMENT,
    MAIL_BODY,LT_OBJTXT,LT_OBJPACK,IT_ATTACHMENT,LT_OBJPACK,LT_RECLIST,
              LT_OBJHEAD,IT_ATTACHMENT,LT_OBJTXT.
            ENDIF.
          ENDIF.
        ENDIF.
       ENDIF.
      ENDLOOP.
    Pls check ...

    Hi,
    check whther that Image avilable in the system or not.
    and same time check the Size of the image.

Maybe you are looking for