Portrait Layout of the pdf attachment in email (T-code: VL71)

Hi all,
I have a problem with the layout of the pdf attachment in email. The sapscript layout is already set to Portrait.
When I print or preview the form, it is in portrait. but when I sent it through email, the form became LANDSCAPE layout in pdf file. I dont know what i happening. I had tried to check everything possible but just useless. Please give me some light.
t-code = VL71
output type = LQFF (Certificate of Analysis)
I had checked T-Code: NACE, the method = 5 External Send. but there is no way to see whether the attachment is send as Portrait Layout or Landscape Layout.
I want it to be in PORTRAIT when send as attachment through External Send. How to set/configure the pdf layout when sending it through email?
Any idea & help are greatly appreciated.
THanks.

Hi,
It has something to do with the printer or email setting, I personally think it is not ABAPer's role to set it.
SAP Standard Print program is used. RQCAAP00
Please help. thanks

Similar Messages

  • Error when opening the PDF attachment

    Hi,
    We are able to successfully send the PDF attachment to external email id  from SAP SCRIPT:
    but when we are opening the PDF attachment we are getting the following error:
    "Adobe Reader could not open because it is not either a supported file type or the file has been damaged ..etc.."
    Is any logic need to write for the above or any parameters are missing .
    Can any one help...
    Thanks in advance.

    Hi Ramana,
                Just try below given example code.....In which I have just different function Module to convert from OFT to PDF....
       AT END OF VSTEL.
          IF R_EMAIL = 'X'.
    *--Opening Layout set for Printing
            PERFORM CLOSE_FORM.
           SELECT SINGLE SMTP_ADDR INTO V_EMAIL
           FROM ADR6
           WHERE ADDRNUMBER = T_ADRC-ADDRNUMBER.
            CLEAR T_LIPS.
            READ TABLE T_LIPS WITH KEY VBELN = T_LIKP-VBELN.
            CLEAR T_VBAK.
            READ TABLE T_VBAK WITH KEY VBELN = T_LIPS-VGBEL.
            CLEAR V_ADRNR.
            SELECT SINGLE ADRNR
            INTO V_ADRNR
            FROM T001
            WHERE  BUKRS = T_VBAK-BUKRS_VF.
            REFRESH T_CC_EMAIL.
            CLEAR T_CC_EMAIL.
            SELECT  SMTP_ADDR INTO TABLE T_CC_EMAIL
            FROM ADR6
            WHERE ADDRNUMBER = V_ADRNR.
         SELECT SINGLE smtp_addr
         INTO cc_email
         FROM adr6
         WHERE addrnumber = v_adrnr.
            IF T_TO_EMAIL[] IS INITIAL.
              CLEAR T_CC_EMAIL.
              REFRESH T_CC_EMAIL.
            ENDIF.
            PERFORM BUILD_PDF_DATA_TABLE.
    Populate message body text
            PERFORM POPULATE_EMAIL_MESSAGE_BODY.
            CONCATENATE  T_LIKP-VSTEL '-' 'Warehouse Release' INTO V_SUBJECT SEPARATED BY SPACE.
    Send file by email as .xls speadsheet
            PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                         TABLES IT_MESSAGE
                                                PT_CONTENTS_BIN       "LINES    "it_attach
                                          USING V_EMAIL
                                                V_SUBJECT
                                                'PDF'
                                                'Delivery'
                                                'Deliveries'
                                       CHANGING GD_ERROR
                                                GD_RECIEVER.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
            PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
          ENDIF.
        ENDAT.
    ***---/End by sagun
      ENDLOOP. "loop at t_likp.
    ***---/added by sagun 25.05.2007
      IF R_EMAIL = 'X'.
        WRITE /01 SY-ULINE(180).
        WRITE :/55 'End of Report'.
      ENDIF.
    ***---/end by sagun
    ENDFORM.                    " PRINT_DELIVERY
    *&      Form  close_form
          text
    -->  p1        text
    <--  p2        text
    FORM CLOSE_FORM .
      IF R_PRINT = 'X'.                   " added by sagun 24.05.2007
        CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
         EXCEPTIONS
           UNOPENED                       = 1
           BAD_PAGEFORMAT_FOR_PRINT       = 2
           SEND_ERROR                     = 3
           SPOOL_ERROR                    = 4
           CODEPAGE                       = 5
           OTHERS                         = 6
        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.                             " added by sagun 24.05.2007
      IF R_EMAIL = 'X'.
    *otf_table  like itcoo occurs 0 with header line
        CALL FUNCTION 'CLOSE_FORM'
         IMPORTING
           RESULT   = .
             TABLES
               OTFDATA  = HOTFDATA
             EXCEPTIONS
               UNOPENED = 3.
      ENDIF.
    ENDFORM.                    " close_form
    *&      Form  BUILD_PDF_DATA_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_PDF_DATA_TABLE .
      DATA :  LC_FORMAT(3) TYPE C VALUE 'PDF'.
    DATA: lt_tline TYPE tp_tline_standard_table,
      DATA :  L_BIN_FILESIZE TYPE I,
              PC_CONTENTS_BIN_LINES TYPE I.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = LC_FORMAT
        IMPORTING
          BIN_FILESIZE          = L_BIN_FILESIZE
        TABLES
          OTF                   = HOTFDATA
          LINES                 = LINES
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'QCE1_CONVERT'
          TABLES
            T_SOURCE_TAB         = LINES
            T_TARGET_TAB         = PT_CONTENTS_BIN
          EXCEPTIONS
            CONVERT_NOT_POSSIBLE = 1
            OTHERS               = 2.
        IF SY-SUBRC = 0.
          DESCRIBE TABLE PT_CONTENTS_BIN LINES PC_CONTENTS_BIN_LINES.
        ELSE.
    ... -->
        ENDIF.
      ELSE.
    An OTF conversion error occured
    -->
      ENDIF.
    ENDFORM.                    " BUILD_PDF_DATA_TABLE
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_EMAIL_MESSAGE_BODY .
      REFRESH IT_MESSAGE.
      IT_MESSAGE = 'Please find enclosed here with our Warehouse Release Document(s)'.
      APPEND IT_MESSAGE.
      CLEAR IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      IT_MESSAGE = 'For United Phosphorous Inc.'.
      APPEND IT_MESSAGE.
      CLEAR IT_MESSAGE.
    APPEND it_message.
    APPEND it_message.
    APPEND it_message.
      IT_MESSAGE = 'TEST EMAIL from 520 clinet please ignore it'.
      APPEND IT_MESSAGE.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
         -->PIT_MESSAGE  text
         -->PIT_ATTACH  text
         -->P_EMAIL  text
         -->P_MTITLE  text
         -->P_FORMAT   text
         -->P_FILENAME   text
         -->P_ATTDESCRIPTION   text
         -->P_SENDER_ADDRESS   text
         -->P_SENDER_ADDRES_TYPE   text
         <--P_ERROR  text
         <--P_RECIEVER  text
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT  TABLES    PIT_MESSAGE
                                                  PIT_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.
    p_filename  = 'INVOICE'.
      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 PIT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( PIT_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[] = PIT_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.
      LOOP AT T_TO_EMAIL WHERE EMAIL <> SPACE.
        CLEAR T_RECEIVERS.
        T_RECEIVERS-RECEIVER = T_TO_EMAIL-EMAIL.
        T_RECEIVERS-REC_TYPE = 'U'.
        T_RECEIVERS-COM_TYPE = 'INT'.
        T_RECEIVERS-NOTIF_DEL = 'X'.
        T_RECEIVERS-NOTIF_NDEL = 'X'.
        APPEND T_RECEIVERS.
        CLEAR T_RECEIVERS.
      ENDLOOP.
    copy email address
      CLEAR T_RECEIVERS.
      IF NOT T_RECEIVERS[] IS INITIAL.
        LOOP AT T_CC_EMAIL.
          T_RECEIVERS-RECEIVER = T_CC_EMAIL-EMAIL.
          T_RECEIVERS-REC_TYPE = 'U'.
          T_RECEIVERS-COM_TYPE = 'INT'.
    t_receivers-notif_del = 'X'.
    t_receivers-notif_ndel = 'X'.
          T_RECEIVERS-COPY       = 'X'.
          APPEND T_RECEIVERS.
          CLEAR T_RECEIVERS.
        ENDLOOP.
      ENDIF.
      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.
      IF SY-SUBRC = 0.
        FORMAT COLOR COL_NORMAL ON.
        LOOP AT T_LOG.
          WRITE :/03 T_LOG-VBELN,
                  19 SY-VLINE,
                  20 T_LOG-KUNNR,
                  34 SY-VLINE,
                  35 T_LOG-NAME1,
                  76 SY-VLINE,
                  77 T_LOG-EMAIL,
                  110 SY-VLINE,
                  111 'Email Sent Successfuly',
                  180 SY-VLINE.
        ENDLOOP . "t_log
        FORMAT COLOR COL_NORMAL OFF.
        CLEAR T_LOG.
        REFRESH T_LOG.
      ENDIF.
      IF SY-SUBRC NE 0.
        CASE LD_ERROR.
          WHEN   1.
            V_ERROR =  'too_many_receivers' .
          WHEN   2.
            V_ERROR =  'Email address not found in Customer Master' .
          WHEN   3.
            V_ERROR =  'document_type_not_exist'.
          WHEN   4.
            V_ERROR =  'operation_no_authorization'.
          WHEN   5.
            V_ERROR =  'Email address not found in Customer Master'.
          WHEN   6.
            V_ERROR =   'x_error'.
          WHEN   7.
            V_ERROR =   'enqueue_error'.
          WHEN   8.
            V_ERROR =   'Error in sending email' .
        ENDCASE.
        FORMAT COLOR COL_NEGATIVE ON.
        LOOP AT T_LOG.
          WRITE :/03 T_LOG-VBELN,
             19 SY-VLINE,
             20 T_LOG-KUNNR,
             34 SY-VLINE,
             35 T_LOG-NAME1,
             76 SY-VLINE,
             77 T_LOG-EMAIL,
             110 SY-VLINE,
             111 V_ERROR,
             180 SY-VLINE.
        ENDLOOP . "t_log
        FORMAT COLOR COL_NEGATIVE OFF.
        CLEAR T_LOG.
        REFRESH T_LOG.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          text
    -->  p1        text
    <--  p2        text
    FORM INITIATE_MAIL_EXECUTE_PROGRAM .
      WAIT UP TO 2 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
                    WITH OUTPUT = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Reward Point If it usefull....
    Cheers,
    Sagun Desai....

  • Naming of the PDF attachment when mailing from Bursting engine

    Hi,
    We have a xml publisher report for which we have implemented Bursting Engine to archive the and burst the PDF output.
    We have a requirement now to send the PDF output as attachment to external email ids(to suppliers).I am trying to test using e the below control file to send the PDFs as attachments but the name of the PDF attachment in the mail is numeric '3','6','9' etc...
    I would like to know how do we name the PDF output attachment of the bursting engine.
    -------------------------Burst Control File------------------------------------------
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
    <xapi:globalData location="stream">
    </xapi:globalData >
    <xapi:request select="/XXX_XMLPUB_ARINV/LIST_G_INVOICES/G_INVOICES">
    <xapi:delivery>
    <xapi:email server="127.0.0.1"
    port="25"
    from="[email protected]"
    reply-to="[email protected]"
    >
    <xapi:message id="123"
    to="${PURCHASE_ORDER_NUM}"
    bcc=""[email protected]""
    attachment="true"
    subject="${TRX_NUMBER}"
    >
    <html><body>test</body></html>
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output-type="pdf" delivery="123">
    <xapi:template type="rtf" location="${XMLPUB_RTF_TEMPLATE}" filter=".//G_INVOICES[PRINTING_COUNT='0']">
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    Thanks,
    Krishnan
    Edited by: Krishnan-Apps on Dec 23, 2009 2:30 AM

    Hi,
    I seriously doubt your control file is a working one. Can you upload your working/correctly formatted file?
    Or check this working sample below. Hope this helps.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request select="/">
         <xapi:delivery>
           <xapi:email server="xxmail.mail.com" port="25" from="[email protected]" reply-to ="[email protected]">
             <xapi:message id="${TRX_NUMBER}" to="[email protected]" cc="" bcc=""
              attachment="true" content-type="text/html" subject="${TRX_TYPE_NAME} Number ${TRX_NUMBER}">
           </xapi:message>
           </xapi:email>
         </xapi:delivery>
         <xapi:document output="Invoice_Number_${TRX_NUMBER}" output-type="pdf" delivery="${TRX_NUMBER}">
           <xapi:template type="rtf" location="xdo://AR.XXRAXINV_SEL.en.US/?getSource=true" filter="">
           </xapi:template>
         </xapi:document>
    </xapi:request>
    </xapi:requestset>regards,
    Rownald

  • Can not open pdf attachment in email (SBWP)

    Hello Expert,
    I created a program to covert a form to pdf format, then, send it to SAPoffice (SBWP) as an attachment successfully. But I cannot open the pdf attachment. I don't know the reason. Could you please give me some suggestion?
    use function module 'CONVERT_OTF_2_PDF' to convert pdf format
    use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
    points will be assigned for Helpful suggestion.
    Thank you.

    Thanks.
    I have tried to download it into my local computer, the downloaded pdf file can be open correctly. So it's the problem in my program.
    Below is my program, thanks a lot.
    DATA: itcpo LIKE itcpo,
          tab_lines LIKE sy-tabix.
    Variables for EMAIL functionality
    DATA: maildata LIKE sodocchgi1.
    DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
    DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    PERFORM send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL *
    FORM send_form_via_email.
      CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
      REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
      maildata-obj_name = 'TEST'.
    Mail Subject
      maildata-obj_descr = 'test_1234567879'.
    Mail Contents
      mailtxt-line = 'Here is your file'.
      APPEND mailtxt.
    Prepare Packing List
    PERFORM prepare_packing_list.
      CLEAR: mailpack, mailbin, mailhead.
      REFRESH: mailpack, mailbin, mailhead.
      DESCRIBE TABLE mailtxt LINES tab_lines.
      READ TABLE mailtxt INDEX tab_lines.
      maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
    Creation of the entry for the compressed document
      CLEAR mailpack-transf_bin.
      mailpack-head_start = 1.
      mailpack-head_num = 0.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'PDF'.
      APPEND mailpack.
    PERFORM get_otf_code.
      DATA: BEGIN OF otf OCCURS 0.
              INCLUDE STRUCTURE itcoo .
      DATA: END OF otf.
      DATA: itcpo LIKE itcpo.
      DATA: itcpp LIKE itcpp.
      CLEAR itcpo.
      itcpo-tdgetotf = 'X'.
    Start writing OTF code
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                form     = 'ZTEST_FORM'
                language = sy-langu
                options  = itcpo
                dialog   = ' '
           EXCEPTIONS
                OTHERS   = 1.
      CALL FUNCTION 'START_FORM'
           EXCEPTIONS
                error_message = 01
                OTHERS        = 02.
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                window        = 'MAIN'
           EXCEPTIONS
                error_message = 01
                OTHERS        = 02.
    Close up Form and get OTF code
      CALL FUNCTION 'END_FORM'
           EXCEPTIONS
                error_message = 01
                OTHERS        = 02.
      MOVE-CORRESPONDING itcpo TO itcpp.
      CALL FUNCTION 'CLOSE_FORM'
           IMPORTING
                result  = itcpp
           TABLES
                otfdata = otf
           EXCEPTIONS
                OTHERS  = 1.
      DATA: i_tline TYPE TABLE OF tline WITH HEADER LINE,
            v_len_in LIKE sood-objlen.
      DATA doctab_archive LIKE docs OCCURS 10.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
    EXPORTING
      USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
      BIN_FILESIZE                 =
        TABLES
          otf                          = otf
          doctab_archive               = doctab_archive
          lines                        = i_tline
       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.
      CLEAR solisti1. REFRESH solisti1.
      LOOP AT i_tline.
        solisti1-line = i_tline.
        APPEND solisti1.
      ENDLOOP.
      LOOP AT solisti1.                                         "solisti1.
        MOVE-CORRESPONDING solisti1 TO mailbin.
        APPEND mailbin.
      ENDLOOP.
      DESCRIBE TABLE mailbin LINES tab_lines.
      mailhead = 'TEST.PDF'.
      APPEND mailhead.
    Creation of the entry for the compressed attachment
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'PDF'.
      mailpack-obj_name = 'TEST'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      APPEND mailpack.
    Set recipient - email address here!!!
      mailrec-receiver = 'FU.Q.HUANG'.  "'[email protected]'.
      mailrec-rec_type = 'B'.           "'U'.
      APPEND mailrec.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = maildata
      PUT_IN_OUTBOX                    = ' '
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = mailpack
      OBJECT_HEADER                    =
         contents_bin                      = mailbin
         contents_txt                     = mailtxt
      CONTENTS_HEX                     = mailbin
      OBJECT_PARA                      =
      OBJECT_PARB                      =
          receivers                        = mailrec
       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.
      ENDIF.
    ENDFORM.

  • Acrobat Reader 9 cannot open pdf attachement to email

    My os is xp. After installing Reader 9, I cannot open pdf attahement to incoming email. The error message is "the file does not have a program associated with it", even though I have already associated pdf with Reader 9 in Folder Option. If I save the pdf attachement to a different folder I am able to open it.
    Maybe I need to rever to Reader 8. If someone cannot solve the error message, maybe can tell me where I can get Reader 8 as it is not in the Adobe free download.

    I have no problem opening PDF attachments that arrive in my Outlook 2003 Inbox; they open fine with Adobe Reader 9. It may be an issue with your email client.
    But if you think that Adobe Reader 8 will fix it, you can download it from http://download.adobe.com/pub/adobe/reader/win/8.x/8.1.3/enu/AdbeRdr813_en_US.exe - make sure that you uninstall Reader 9 first (and Acrobat.com & Adobe AIR).

  • To send output as a PDF attachment via email

    Hi experts
    I have the (smartform) output data in OTF format..and displaying it in PDF form with FM 'HR_EFI_SHOW_PDF_FORM' .
    Now the requirement is <b>to send this output as a PDF attachment via email</b>.
    Please help me with sample code to perform this.
    Regards,
    Matt.

    Hi,
    Check this links,
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    Also for email:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    Refer the following link for more details:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Thanks,
    Reward If Helpful.

  • PDF attachment to Email

    Hi Experts,
    I have a customisation that creates an XML Publisher report. There is a custom Java program which determines how the recipient is to receive the report e.g. fax, email, print. If it is email, it then determines what file format the report should be added, in this case it is PDF and it should then attach it in the email.
    The problem I have is that it appears that the Oracle default email format of HTML is overwriting the PDF attachment format. Therefore, the report is included in the email body as HTML rather than as a PDF attachment.
    Has anyone else had this problem and/or have a means through java code to set the Oracle email format to PDF?
    Many thanks,
    Mark
    Edited by: Mark_Apps_Tech on Aug 27, 2009 6:09 AM

    Hi doytsujin, thanks for the reply. The issue is more about overwriting the default email format of HTML in Oracle.
    I have got the PDF document fine and the code is working, but looking at the log file in the Concurrent Program, there is the entry that Oracle makes below:
    "Since the delivery method is EMAIL, the XML Publisher output is set to html"
    For my code, I'm using the following imported libraries:
    import oracle.apps.xdo.common.pdf.util.PDFDocMerger;
    import oracle.apps.xdo.delivery.DeliveryManager;
    import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
    import oracle.apps.xdo.delivery.smtp.Attachment;
    Is there a way to some how enforce that Oracle uses PDF format?
    Thanks,
    Mark

  • Sending smartform as PDF attachment through email

    Hi,
    I have used the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send the smartform as PDF attachment through email.In SOST transaction I can see that the mail has been sent to the reciepient,but the mail is not going to the mail box.What would be the reason for this?
    Regards,
    Hema

    That should be the basis issue. They needs to do some settings. Please ask them to do so.
    Pranav

  • Invoice output as PDF attachment via email.

    Hi All,
    I have a requirement wherein an invoice when saved should generate a mail output (external send) with the invoice as a PDF attachment. I have the system set up for external send & scot settings but am stuck up with the PDF attachment. I also have the same requirement for PO output (because I look into both SD and MM). Any help on either of them would be greatly appreciated.
    Thanks & Regards,
    Vidya Sagar

    Hi,
    [External Send - Sending PO by email|http://www.sap-img.com/materials/external-send-sending-po-by-email.htm]:
    In order to send PO, your Basis team must configure the system first so that external email can be send out from SAP.  If it is not configured, no settings you do on MM will work.
    1. You must maintain email address in vendor master data.
    2. The same applies to your user master data.  For the output type for default values, a communication strategy needs 
    to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the 
    Customizing via the following path: 
    (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy). 
    As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
    3. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
    4. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
    5. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
    6. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
    Regards,
    Srilatha.

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

  • Huge Issues with PDF Attachements in Emails

    I am using my Q10 as my business device and most of the time I love it, it brought me back to BBRY. But one thing is really causing me headaches and problems I thought were left in the past since a couple of years.
    I receive and send a lot of Emails and I rely a lot on this way of communication. But with the Q10, I always have to carry my old iPhone 5 with me, because the Q10 can´t open roughly 50% of all the PDF attachments on Emails. I just found a PDF Viewer which can open those files, but its a hustle which I don´t understand, because its actually the first phone which I owned in the past years which has such an issue in such an essential feature.
    For example, one of my employee´s just send me a handwritten checklist as a PDF document via Email and when I try to open the file, the viewer, which is started out of the Email-Programm, says (in german) that an error occured while opening the file. The Acrobat Reader gives the same error-message. qPDF Viewer is able to open the file without an issue at all. Also the iPhone 5, iPad and every Email programm that I tried has no problem to open the file.
    My employee used the built-in scan-to-PDF-functionality of one of our HP Officejet 8600 Pro printers in the office to create the file. It was not changed after the scan-process.
    I bet that the issue is known, but if I can help, I will provide as much information as you need (incl. sample-files of course), but this problem needs to be fixed immediately. I can´t think of a serious business device which has problems showing several PDF-files, this is something every Smartphone can do since the 8800 or even before that, and without any problems! Not to mention all the toyish Android Smartphones and iPhones on the market. This is a key feature for many many many companies, just imangine you´re in a hurry and you need to decide upon a changed offer, but you´re not able to open the file on your phone? You´ll need to carry an extra device for that, thats not good.

    Hey -jo-,
    Welcome to the BlackBerry® Support Community Forums.
    Currently the BlackBerry Q10 smartphone supports PDF files with true PDF text, rather than scanning images into the PDF. Alternatively, if the sender has the option they can try sending the file as a text file(.txt).
    Let me know if you have any other questions.
    Thanks.
    -HB
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • How do I make a button onj the form which will submit and send the pdf as an email?

    how do I make a button on the form which will submit and send the pdf as an email?

    You can set up a button with a "Submit a form" action and use a mailto type URL to specify the email address you want the forms sent do. If you want to send the entire PDF, select that option and not FDF or anything else. The mailto URL should not include any spaces and the "mailto" part should be lowercase, like:
    mailto:[email protected]
    This will attempt to initiate an email using the users default email client. If the user does not have one set up or there is some other problem, the email might not get initiated. If it needs to work with Reader versions prior to 11, then the form needs to be Reader-enabled, which you do in Acrobat 11 by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • Script to open another pdf attach to email and close the new pdf

    I have a pdf that contais a movie and there is a link to send another pdf with a small version of that film to email i tried this code but without any luck
    var myDoc = app.openDoc({cPath:"XXXXXX/cpi-028.bx.pdf"});
    myDoc.mailDoc(true);
    myDoc.closeDoc(true);
    the link is working but after the small pdf opens nothing else works
    Somebody please help me

    If the PDF isn't already downloaded in the email then you should be able to do so by tapping on it.
    If the PDF is open within the body of the email then press and hold it and after a second or so you should get a 'Open In' pop-up; otherwise (e.g. the PDF opens into a separate screen) then tap the PDF and you should get an icon top right of a box with an arrow coming out of it - tap that and you'll get the 'Open In' option

  • I receive PDFs attached to emails. When I open them and try to save them, it takes me to a temporary location on the C drive, and does not remember where I last saved a PDF.

    This happens on every PDF I open from an email. The PDF opens fine, but when I go to save it I end up in a temporary location, which bears no resemblance to the location I was last in when I had to navigate to it. I am saving documents on a network location.
    I am running Windows 7 SP1, and am using Adobe Reader 11.0.5
    Any help would be greatly appreciated,
    Thanks,
    Tania

    This is the appropriate behavior.. Most email programs (browsers too) store attachments (or files) in a cache area. You then need to do a save as to more them to a different location. The plug-in is finding the pdf in the location determined by the email program, so that is the last place the plug-in used. It doesn’t have a different location to use.

  • Error while opening the PDF attachment

    HI SDN's
    I have to send order confirmation thru mail as a pdf attachment as soon as order has been saved.
    I have written the code and assigned to output type.
    Here I am getting an error opening a converted pdf file with Adobe Reader
    The error message reads:
    Adobe Reader could not open "filename.PDF" because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded).
    Any help would be appreciated.
    Thanks in advance
    VR

    hello, i have the same problem as VR's. The pdf file sent to my email is not able to open. You mentioned that this is only supported by early releases of Adobe. But anyhow, I followed your advice to have my spool converted to PDF, instead of OTF to PDF. But I get this error: Spool request 23595 contains no ABAP list data.
    What exactly my transaction does is that, it makes use of a sapscript layout via VL02N using an output type. I retrieve the OTF data in CLOSE_FORM function module. OTF is then converted to PDF via SX_OBJECT_CONVERT_OTF_PDF, then send via email through SO_NEW_DOCUMENT_ATT_SEND_API1.
    When I view the sent PDF file in my email, It cannot be opened.
    I would appreciate your help guys! thank you very much.

Maybe you are looking for

  • What is the easiest and faster way to organize my itunes library

    I've been building my itunes library for many years and for many reasons this library has become a complete chaos. I have around 50,000 songs, which 10,000 of those I can't locate the file in my hard drive maybe for the following reasons: - the incom

  • Intro

    Well, having this forum up is cool. One of the items on the checklist for a new ACE Director is to post an intro. Don't really enjoy talking about myself, but I guess I need to get this done. Okie dokie, here we go... I'm a Program Manager for Instit

  • InDesign CS version 3.0 updating to 3.01 patch

    When updating my Indesign CS version 3.0 with the 3.01 patch, it says update was installed successfully, but it doesn't update to 3.01. Will it say 3.01 in "About InDesign"? Still says 3.0. Also, when I run update installer check it still says 3.01 u

  • Cekko

    hi experts We need to add actual price difference For release strategy of PO. the structure cekko is not available in user-exit exit_sapmm06E_012 where we have the prices. (KOMV) is there any way to calculate price difference and use it for release s

  • If I change my Apple ID, can I get my iTune and App purchases transferred from the old to the new ID?

    I have a child who is now of age to create an Apple ID.  If I create a new Apple ID, can I tranfer the iTune and App Store purchases from my existing Apple ID to the new one for my child?