Send a Sapscript as a PDF by email

Hi,
I've to convert a sapscript into PDF and then send it by email.
I'm using the next logic in my printer program:
1. I Executo the FMs OPEN_FORM, WRITE_FORM and CLOSE_FORM.
2. Then I obtain the spool request using the FM RSPO_FIND_SPOOL_REQUESTS
3. Then I convert the Spool request into a *pdf using the FM CONVERT_OTFSPOOLJOB_2_PDF
4. Finally I call the FM SO_DOCUMENT_SEND_API and attach the pdf created in the 3rd step.
My problem is that when I execute all this in background task. It doesnt send the email. Does anybody know what is going on?
Thanks !

Did you leave the COMMIT_WORK parameter as SPACE? 
You actually do not have to send it to the spool.  The OPEN_FORM function module has a parameter to request OTF data.  The CLOSE_FORM function will return it as an internal table.  You can convert that to PDF and send.

Similar Messages

  • Sending a form as a  pdf  via email with the BCS interface

    Hi,
    I would like to send a sapscript form as a pdf to a mail recipient using the BCS interface.
    I started to investigate the BCS.
    When using the function - CLOSE_FORM - I get the OTFDATA table - how do I send it as a pdf file with BCS ?
    How different is sending an Ms-Word attachment ?
    Thanks so much.
    Promise to award points...
    Ruthie.

    Hai
    Go through the following Code that will help you
    REPORT ZRICH_0003.
    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 = 'Subject'.
    Mail Contents
      MAILTXT-LINE = 'Here is your file'.
      APPEND MAILTXT.
    Prepare Packing List
      PERFORM PREPARE_PACKING_LIST.
    Set recipient - email address here!!!
      MAILREC-RECEIVER = '[email protected]'.
      MAILREC-REC_TYPE  = 'U'.
      APPEND MAILREC.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = MAILDATA
                PUT_IN_OUTBOX              = ' '
           TABLES
                PACKING_LIST               = MAILPACK
                OBJECT_HEADER              = MAILHEAD
                CONTENTS_BIN               = MAILBIN
                CONTENTS_TXT               = MAILTXT
                RECEIVERS                  = MAILREC
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    ENDFORM.
         Form  PREPARE_PACKING_LIST
    FORM 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 = 'RAW'.
      APPEND MAILPACK.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form.  just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
      PERFORM GET_OTF_CODE.
      LOOP AT SOLISTI1.
        MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
        APPEND MAILBIN.
      ENDLOOP.
      DESCRIBE TABLE MAILBIN LINES TAB_LINES.
      MAILHEAD = 'TEST.OTF'.
      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 = 'OTF'.
      MAILPACK-OBJ_NAME = 'TEST'.
      MAILPACK-OBJ_DESCR = 'Subject'.
      MAILPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND MAILPACK.
    ENDFORM.
         Form  GET_OTF_CODE
    FORM  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.
    Move OTF code to structure SOLI form email
      CLEAR SOLISTI1. REFRESH SOLISTI1.
      LOOP AT OTF.
        SOLISTI1-LINE = OTF.
        APPEND SOLISTI1.
      ENDLOOP.
    ENDFORM.
    Regards
    Sreeni

  • How can i send a Sapscript as an PDF through NACE

    Hi experts,
    I have an requirement that i have to send a  Invoice sapscript output in pdf format on mail with
    Transaction NACE.
    How can it be done?
    Regards

    u need to configure ur output as external send (medium 5) in nace look at this coe its for smatforms but for scripts u can proceed in similar way.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    also look at this code for reference
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/converting%252bscripts%252boutput%252binto%252bpdf%252bform
    кu03B1ятu03B9к
    Edited by: kartik tarla on Feb 27, 2009 2:28 PM

  • Sending a text document as pdf by email.

    Hi,
    I have a plain text document that needs to be send as a pdf document by email. The line type of the text document is PC408-linda, which is 132-character length. I am trying to use the FM ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ for sending the document which uses structure ‘SOLISTI1’ for sending the document. The line size of SOLISTI1 is 256 characters. I tried to send 132-character length internal table instead of the given structure for the FM, it didn’t work. Later, I put the 132-charcter line into the 256-character length line, which works well. But, I have a problem when the outgoing system converts the 256-character length into pdf document. It breaks the line.
    Can you please suggest me how can I fit this 132-chracter line in the above FM or Is there any alaternateive FM for sending this 132-character lines, which will fit in the pdf format.
    Lokman

    Hi,
    Here I am sending the part of the code that is sending the text document by using FM. Internal table $form conatins 132-character length text document. I want to send this document so that converted pdf appears similar to text line.
    FORM send_email USING $form TYPE tt_form.
    DATA:
        $form_wa1  LIKE pc408.
    data: paydate(15) type c.
    Data  date like sy-datum.
    *date = sy-datum.
    Email Subject.
    DATA: s1(30)  TYPE c VALUE  ' Avis - Bulletin de paie du ',
            s3(50)  TYPE c .
    loop at $form into $form_wa1.
    if sy-tabix eq 10.
    MOVE $form_wa1-linda+5(10) TO paydate.
    endif.
    objtxt-line = $form_wa1-linda.
    append objtxt.
    endloop.
    CONCATENATE s1 paydate INTO s3 separated by SPACE.
    *Email message body.
    DATA: c1(30)  TYPE c VALUE  'Vous trouverez ci-joint',
          c2(50) type c value ' votre bulletin de paie du  ' ,
          c type c value '.',
          c4(85)  TYPE c.
    CONCATENATE c1 c2 paydate c INTO c4 separated by SPACE.
    data: a1(40) type c value 'À ouvrir avec le programme "Notepad" ',
       a2(47) type c value ' ou "Wordpad" pour le visualiser correctement.',
       a3(90) type c.
      CONCATENATE a1 a2 INTO a3.
    data: b1(45) type c value ' Pour imprimer, veuillez vous ',
        b2(45) type c value ' assurer que les marges (droite et gauche)',
        b3(35) type c value ' sont restreintes au minimum.',
       b4(200) type c.
       CONCATENATE a3 b1 b2 b3 INTO b4.
    Main Text
    data wa_form like PC408 .
    Email Subject
    docdata-obj_name = 'TEST_ALI'.
    docdata-obj_descr = s3.
    Email Message
    objtxt = 'Bonjour,'.
    append objtxt.
    objtxt = ' '.
    append objtxt.
    objtxt = c4.
    append objtxt.
    objtxt = ' '.
    append objtxt.
    objtxt = b4.
    append objtxt.
    describe table objtxt lines tab_lines.
    read table objtxt index tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
    clear objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'RAW'.
    append objpack.
    Create Message Attachment
    Write Packing List (Attachment)
    loop at $form into $form_wa1.
    *if sy-tabix eq 10.
    *MOVE $form_wa1-linda+5(10) TO paydate.
    endif.
      objtxt-line = $form_wa1-linda.
      append objtxt.
    endloop.
    att_type = 'RAW '.
    describe table objtxt lines tab_lines.
    read table objtxt index tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
    clear objpack-transf_bin.
    objpack-head_start = 6.
    objpack-head_num = 0.
    objpack-body_start = 6.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = 'Attached Document'.
    append objpack.
    Create receiver list
    reclist-receiver = wa_pa0105-usrid. "<-- change address
    *reclist-receiver = '[email protected]'. "<-- change address
    reclist-rec_type = 'U'.
    append reclist.
    *reclist-receiver = sy-uname. "<-- change internal user
    *reclist-rec_type = 'B'.
    *append reclist.
    Send Message
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    PUT_IN_OUTBOX = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    tables
    packing_list = objpack
    OBJECT_HEADER = objhead
    *CONTENTS_BIN = objbin
    CONTENTS_TXT = objtxt
    OBJECT_PARA =
    OBJECT_PARB =
    receivers = reclist
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8
    refresh: objtxt,
             objpack,
             objhead,
             reclist.
    IF sy-subrc <> 0.
    message ID 'SO' TYPE 'S' NUMBER '023'
    with docdata-obj_name.
    ENDIF.
    *write: / 'End of Program'.
    ENDFORM.                    " send_email

  • Send Order confirmation form as PDF in email on Order Save on webchannel

    Hello,
    I am developing a smartform for Purchase Order in CRM. When end user will save order on Internal sales webchhanel , order confirmation mail shoud be triggered to customer with smartform in PDF format.
    I want to know how can I pass values from Order saved on webchannel to my smartform and send as PDF in mail attachment?
    Thanks & Regards,
    Madhura Nadgauda

    Hello Madhura ,
    Are you planning on sending the email on order create? Maybe you can use the order create FM ?
    regards
    Mark

  • Billing in PDF via Email

    Hi,
    How can i send an created bill as pdf via email?
    Can anybody suggest if there is any BADI/User Exit/Configuration exists in order to email Billing document as a PDF attachment while saving from VF01 or VF02?
    Thanks

    Hi Marcus,
    Did you try using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1 '.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = xs_gd_doc_data
          put_in_outbox              = lc_true
          commit_work                = lc_true
        IMPORTING
          sent_to_all                = lv_sent_all
        TABLES
          packing_list               = xt_packing_list
          contents_txt               = xt_message
          receivers                  = xt_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.
      IF sy-subrc  0.
    *Do Nothing
      ENDIF.
    Hope it resolves your query.
    Regards,
    Manish

  • Error send a smartform PDF by Email to Vendor

    Hi Expert,
    Please help me.........................
    I want to send a PO (Smartform) as Email to Vendor.
    In SAPScript the PO send by Email is working fine, but in Smartforms it is not working.
    Normally, I will use via Smartforms the Program = YBAA_FM06P, FORM routine = ENTRY_NEU, PDF/Smartform Form = ZYBAA_MMPO1.
    A communication strategy has communication type as INT has been defined.
    This communication strategy has been set as default in the output type ZNEU. The transmission medium has been set to 5 (External Send) and the partner function as VN (Vendor).
    The e-mail address of the vendor has also been maintained.
    In transaction MN04, i have also made an entry for output type ZNEU and set the document type as NB.
    But message output do not create.
    How to send a smartform PDF by Email to vendor?
    Thanks,

    Hi,
    I can convert the PO output in to PDF from SOST I can sent it to external vendor using the Mail triggering configuration settings but meassage output do not create.
    Please tell me how can I do.
    Thank,

  • Custom sapscript to PDF and email

    Hi all,
    I have a requirement to create a new sapscript that can be converted to PDF and emailed. I have done this for regular reports but have no idea about doing it for sapscript.
    Does anybody know how I can do this?
    I've search the forums here but I haven't found a definate solution.
    Cheers,
          Tony

    Here is a sample program.
    REPORT ZRICH_0003.
    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 = 'Subject'.
    * Mail Contents
      MAILTXT-LINE = 'Here is your file'.
      APPEND MAILTXT.
    * Prepare Packing List
      PERFORM PREPARE_PACKING_LIST.
    * Set recipient - email address here!!!
      MAILREC-RECEIVER = '[email protected]'.
      MAILREC-REC_TYPE  = 'U'.
      APPEND MAILREC.
    * Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = MAILDATA
                PUT_IN_OUTBOX              = ' '
           TABLES
                PACKING_LIST               = MAILPACK
                OBJECT_HEADER              = MAILHEAD
                CONTENTS_BIN               = MAILBIN
                CONTENTS_TXT               = MAILTXT
                RECEIVERS                  = MAILREC
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    ENDFORM.
    *      Form  PREPARE_PACKING_LIST
    FORM 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 = 'RAW'.
      APPEND MAILPACK.
    * Creation of the document attachment
    * This form gets the OTF code from the SAPscript form.
    * If you already have your OTF code, I believe that you may
    * be able to skip this form.  just do the following code, looping thru
    * your SOLISTI1 and updating MAILBIN.
    <b>  PERFORM GET_OTF_CODE.
      LOOP AT SOLISTI1.
        MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
        APPEND MAILBIN.
      ENDLOOP.</b>
      DESCRIBE TABLE MAILBIN LINES TAB_LINES.
      MAILHEAD = 'TEST.OTF'.
      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 = 'OTF'.
      MAILPACK-OBJ_NAME = 'TEST'.
      MAILPACK-OBJ_DESCR = 'Subject'.
      MAILPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND MAILPACK.
    ENDFORM.
    *      Form  GET_OTF_CODE
    FORM  GET_OTF_CODE.
      DATA: BEGIN OF OTF OCCURS 0.
              INCLUDE STRUCTURE ITCOO .
      DATA: END OF OTF.
      DATA: ITCPO LIKE ITCPO.
      DATA: ITCPP LIKE ITCPP.
    <b>  CLEAR ITCPO.
      ITCPO-TDGETOTF = 'X'.</b>
    * 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
    <b>       TABLES
                OTFDATA = OTF</b>
           EXCEPTIONS
                OTHERS  = 1.
    * Move OTF code to structure SOLI form email
    <b>  CLEAR SOLISTI1. REFRESH SOLISTI1.
      LOOP AT OTF.
        SOLISTI1-LINE = OTF.
        APPEND SOLISTI1.
      ENDLOOP.</b>
    ENDFORM.
    Please make sure to award points for helpful answers and Welcome to SDN!!!
    Regards,
    Rich Heilman

  • I work for a retailer who sends out e-receipts as pdf attachements.  When the email arrives on any apple product, i see the email with the paperclip icon showing that there is an attachment but i cannot ever see or find the actual attachment.  Any ideas?

    i work for a retailer who sends out e-receipts as pdf attachements.  When the email arrives on any apple product, i see the email with the paperclip icon showing that there is an attachment but i cannot ever see or find the actual attachment.  Any ideas?

    i have scrolled left, right, up and down on iphone4, iphone5 and ipad and the attachment simply does not exist.  It has to be something with the apple mail client setup because for any mail client, if they go to the webemail thru safari, the attachment is there and it can be viewed without issue.
    I know there are plenty of people out there with this issue with the mail clients set up that you access thru the email icon on the iphone and ipad but i cannot find anyone with a resolution.  I cannot find any settings in the mail client setup that has anything to do with attachments or for what attachments can or cannot be read or seen.
    Hopefully someone out there has figured something out because this is an odd one.

  • Sending Invoice as PDF in email

    Hello,
    I have a requirement where I have to send Proforma Invoice as PDF in email.
    Now, the Proforma Invoice is already using output type to Print and when I see the routines in Tcode NACE
    It uses RVADAUS1 Program where it calls RV_EXPORT_DOCUMENT_PRINT function module to generate the Print document.
    This works fine.
    So, I created a new output type, copied the  RVADAUS1 to ZRVADAUS1 and modified the code where I am capturing the Spool generated through the original code and pass it to CONVERT_ABAPSPOOLJOB_2_PDF to convert it to PDF and then send it as an email.
    Now, the problem I am facing is that, I am not able to generate a Spool when I am using the medium ( '5' External Send ). So the further code of capturing Spool and convert to PDF and send as email fails.
    Any guidance is appreciated.
    Regards,
    DNP

    Hi Sudhanshu,
    Just before calling the function module RV_EXPORT_DOCUMENT_PRINT.
    I forced TNAPR-NACHA = '1'. and NAST-NACHA = '1'.
    which means I forced Transmission medium as 1(Print) instead of 5(External Send)
    This created a SPOOL.
    Regards,
    DNP
    Edited by: DNP on Aug 14, 2009 11:45 AM

  • How to send output of smartform in pdf format as an attachment to email

    how to send output of smartform in pdf format as an attachment to email
    search before posting further and follow Forum rules
    Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AM

    Did u check on sdn?
    i dont think so or else there are many posts on this topic and good wikis too.
    look at one of these code tutorial wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    So next time do use the search functionality.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Jan 15, 2009 12:33 PM

  • Unable to send PDFs as email attachments

    I have become unable to send PDFs as email attachments when using Firefox.
    Depending on the PDF, I either get the message “There was an error opening this document. The file is damaged and could not be repaired.” or it opens as a blank document. This occus when opening the file with both Adobe Reader and Acrobat Pro. The problem seems to be isolated to PDFs. (I am able to send Word files. If a PDF is zipped before attaching, it can be opened without problem.) This occurs on both an institutional email account and personal (Yahoo) email account. This problem is isolated to Firefox (does not happen in Chrome).
    I have reset Firefox to default settings, as well as reinstalling.
    Thank you.

    Update Adobe® Acrobat® Plug-in for Web Browsers, Version 10.1.13 to version 11.
    Also please update all of your plugins and try again.
    Does this happen when you open the pdf in pdf.js, it is possible to change the default viewer by:
    * [[How to disable the built-in PDF viewer and use another viewer]]

  • Send pdf as email

    hai gurus ,
    my problem is i am sending pdf as email its working fine
    but when i go and check the pdf file in  scot transaction the file is not getting  opened
    plz help me
    thanks in advance
    anji.
    Moderator message: please search for available information/documentation before asking, provide more technical details about errors when posting again.
    Edited by: Thomas Zloch on Oct 28, 2010 10:58 AM

    Hi,
    Check this link [http://wiki.sdn.sap.com/wiki/display/Snippets/ConvertsspoolrequestintoPDFdocumentand+emails]
    BR,
    Lokeswari.
    Moderator message: please do not post just links without any further explanations.
    Edited by: Thomas Zloch on Oct 28, 2010 10:58 AM

  • Sending PDF thru email with password protection in our SAP system

    Need solution for sending PDF thru email with password protection in our SAP ecc 6

    Or maybe you have found any other way? You can check here:
    Password protect PDF file:
    Re: Password protected PDF file 
    pdf with password encryption
    Regards Otto

  • Send pdf by email without database

    I have built a form in Livecycle and the form is attached to a database so that the drop down fields "pull" data from the database.  When the form fields are filled in the form is designed to be email to  other people. 
    The problem is that when a person receives the email and they try to open the attachment they get a message that the database is required. 
    How can I send the completed form as an attachment to an email so that the recipient is able to open the attachment without receiving the message that the database is required. Thanks.

    Hi,
    That is going to be difficult to get rid of the error. You could send a flattened (print to PDF) version if the user has Acrobat. Alternatively, you could set up a call to the database on docReady event and then show a custom dialog.
    Niall

Maybe you are looking for

  • Error on bapi_acc_document_post

    Hi experts,      when i executing this bapi_acc_document_post, am getting error  " FI/CO interface: Line item entered several times"  i mention code below  so please give me suggestion. *& Report  ZSAMPLE REPORT  ZSAMPLE. data: BEGIN OF WA_HEADER,   

  • Drop-Down-Box (F4 Input Help) for formula variable in BEx Analyzer (BI 7.0)

    Hi Gurus, is it possible to get a drop down box for a ready for input formula variable in the BEx Analyzer (not BEx Web!)? We want to let the users choose scaling factors 1, 1000 or 1000000 (implemented via this formula variable). In the settings of

  • Applet goes crazy

    I am fairly new to java, and completely new to this forum, so I am not sure if this is where this question is supposed to go, but here it is anyway. I am trying to write a poker program, that shows the pictures or the card. However, when i run the .h

  • Can anyone help me get my version of FM 10 updated with the TCS3Update.zip patch?

    I'm trying to get FM 10 working on my new computer, but after installation when I go to open the program I get the "Licensing for this product has expired" message. I downloaded the TCS3Update.zip patch the website recommended to fix this, but when I

  • Why Does Logic Pro Repeatedly Asks for Serial # and XSKey When Started?

    I've purchased and installed an upgrade to Logic Studio 9. I previously used Logic Pro 7 but did not have it installed on my MacBook Pro when I installed Logic Studio 9. The installer asked for the Logic Studio 9 serial number which I entered and the