Send GP context data in Email using NotificationCo

Hi Experts,
In my GP process, when the approver approves a request by user, i want to pass the following details via mail:
1) Approver name - from context parameter
2) details of the data approved: - data is in a GP context (data is in a list .. with cardinality 1..n) , and in the context i have stored the needed data like a transaport request list created in R/3 for the data update.
I want to send both the details through Email , can you guys help me with the Html code needed to fetch the data from Gp context node?
Regards,
Ashish

Got it solved...

Similar Messages

  • How to send multiple customer statements by email using RFKORD11 program.

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program. Is it possible?
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    thanks in advance.
    Regards,
    Mahesh

    Try execute the program in the background to see if that helps.

  • How to send multiple customer statements by email using RFKORD11

    Hi All,
    How to send multiple customer statements by email using RFKORD11 program.
    As of now we copied the stanadard program and sending the customer statements by email, one by one.
    if  i execute the z program it will show the customer statement and send mail option.
    if i click send mail it will send that customer statement to the corresponding customer.
    then again i need to click back, it will show next customer statement and click on send mail.
    Pl guide me, if any one worked on this program.
    Regards,
    Mahesh

    Hi .
    You first need to copy that program to Z and make the changes in it. Can you convert sapscript to smartform?
    then you can write a logic to send mail in the loop.
    to send the pdf file
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
    Regards,
    Madhuri
    Edited by: madhuri sonawane on Jun 10, 2009 4:20 PM

  • 8130 could send a text mesage to Email using NO DATA ?

    Hi All
    I recently lost my old 8130 Pearl. Bought a 9320 to replace it only to find that the this new phone will not send an "text" message as an email using No Data !   Small detail.. I know,  but very  convenient.  That phone was on the most basic voice & text plan with no data. How come the 8130 could send a text message to  a email  using no data?  and what is this feature called.  Is there another Blackberry phone that have this capability?
    Thank you
    my9320

    Hello my9320
    Welcome to the BlackBerry Support Community Forums.
    In order to send an SMS message to an Email address please follow the below steps found in www.blackberry.com/btsc/KB26662
    BlackBerry® Smartphone users can send SMS messages to some email address depending upon the Wireless service provider.
    1. Open BlackBerry Text Messages.
    2. Press the Menu key and click Compose Text Message.
    3. Type the recepient’s email address and Type the message.
    Note: As the user type, the number of characters has been typed appears in the upper right corner of the screen. SMS messages are limited to 160 characters.
    4. Press the Menu key and click Send.
    Please contact the wireless provider for resolvable email address regarding sending SMS to email address.
    Goose947
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click Accept as Solution for posts that have solved your issue(s)!

  • Sending messages from mobile to email using J2ME midlet

    I am developing a J2ME application that will send messages directly to my email address. I have a problem in connecting to my email.
    Please help me... if you have an idea or sample code please send it to my email...( [email protected] )
    Thank you..
    harlow

    Hi..
    Client in this case is "MIDlet app" will communicate through http://210.210.1.1/ReceivingServlet (or) http://test.sun.com/ReceivingServlet.
    Using the above URL either user QueryString parameters/XML format to transfer what ever data u need from mobile device can be transfered over wire using GRPS connectivity and on receipt of the URL hit from the server side parse the data and store it in any database in this case its MYSQL.
    Even there is no limitation proposed by the http querystring parameter we tested for more than 500-1000 records and its workin fine.
    Apart from Socket/port we can choose http since its highly reliable and highly proven standards.
    Feel free to seek for further clarifications.
    with regds,
    Senthil g.

  • How do I send a photo in an email using thunderbird

    I can't send a photo in an email!!

    Did you try to attach the photo (click on the paperclip icon and find the photo location on your computer then double click on the photo)?

  • Send PO vía external email using contact person information

    Hi,
    I am trying to send the PO to the vendor via external email. The problem is that the customer is already using field email in vendor master data for other purposes.
    The requierement is to use contact person´s email or another business partner´s email to send the vendor the purchase order when it is save.
    I´ve done all customizing on output determination.
    Something I might be missing? Can this be done?
    Thank you

    Hi,
    I have been doing some tests and the po determines the business partner - contact person in tab message, also when I save the PO status for the external email is set on green. If I go to transactions SOST is there when the email never is send.
    Why is this happening? I have done test with the email on vendor master and the po is sent, therefore is not a problem with the server sending emails.
    Is there a way I can get the po sent? Please suggest.
    Thank in advance
    Edited by: Rafael Arrese on Mar 1, 2012 5:49 PM

  • Sending a Rich Text (RTF) email using the Java Mail API

    Folks
    I've spent about half a day trying to find out how to do this, now I'm not even convinced you can. Here's the problem...
    I currently use JasperReports to generate an HTML report, this I then send as the body of a Multipart email. Because there are two images in the report, these I inline attach, it diaplsy in Outlook perfectly.
    The problem comes with a bug in Outlook (recognised by Microsoft) where after a while the images stop displaying, you just get the little red cross. Having dug around this is because Outlook doesn't always clean the inlined files from the temp directory. When this occurs next time you view an email that has the same image file in it, the file in the temp directory is appended with a number. This happens correctly until 99, then it throws the towel in and just gives you the red cross. Although I could orgainse for the folder to be emptied on network, I can't on client networks. Thsi sadly means that this approach isn't going to work for me.
    My latest idea is to get JasperReports to generate an RTF version instead, then set this as the body of the email. I don't know if this will still require me to inline the images, if it does it's no better, but because I can't find a working example on how to send an RTF bodied email I can't even find out.
    Any help anyone can provide is greatly appreciated.
    Tom

    I'm afraid neither of these are really feasible. The email is sent to many external parties, and guaranteed access to a server is unlikely to happen. I guess I could change the file name, but then I'd have to parse the HTML everytime and change the many reference to the file in there.
    Why is information about sending RTF email so scarce? I assume it possible?
    Tom

  • Send PO Adobe form as email using BBP_PO_ACTION_DEF

    Hello SRM Guru's
    I need to send my PO adobe form as an EMail....So please guid me ...how to setup the configuration using T-code BBP_PO_ACTION_DEF .
    Thanks and Regards...
    Priyank Dixit

    Hi Priyank,
    Within the Action Profile BUS2201 you need to configure a new processing type: 'External Communcation'. Within this processing type you can configure your adobe form settings and linkaging
    Form name: 'BBP_PO_ADB_NL' (standard adobe form, view/create adobe forms via txn SFP)
    Form type: 'PDF-Based Forms'
    Format: BBP_PO_ADB_MAIL
    Personalization type: Recipient-Specific Variable Replacement
    We have configured output rules via txn BBP_PO_ACTION_CONF. Setting the 'external communication' processing type as the processing type for vendor output type 'mail' (changing the default 'Smart Forms Mail').
    Note: You require SAP Archivelink for archiving purposes, without it you can/should not activate archiving.
    Kind regards,
    Tim

  • How to send a SMARTFORM as an email ?

    Hello,
    How can we send a smart form as an email?
    Please explain with an exmaple.
    ANy proper explonation will be appreciated...
    Have a great day!
    Thanks & Regards,
    Krishna Chaitanya

    Hi Krishna,
    When you pass the values to the Smartform by using the Function Module name of the Smartform, it will return you thr OTF format of the Smartform in the Importing Parameter 'job_output_info'. The following code will help you regarding the mail sending part:
    If you still need help, Please let  me know.If helpfull reward me points.*
      TYPES: BEGIN OF tp_lips,
             vbeln LIKE lips-vbeln,
             posnr LIKE lips-posnr,
             matnr LIKE lips-matnr,
             lfimg LIKE lips-lfimg,
             vgbel LIKE lips-vgbel,
             vgpos LIKE lips-vgpos,
             uecha  LIKE lips-uecha,
             END OF tp_lips,
             BEGIN OF tp_vbap,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             matnr LIKE vbap-matnr,
             kbmeng LIKE vbap-kbmeng,
             werks LIKE vbap-werks,
             END OF tp_vbap,
           BEGIN OF tp_lips_tmp ,
             uecha  LIKE lips-uecha,
             vbeln LIKE lips-vbeln,
             posnr LIKE lips-posnr,
             matnr LIKE lips-matnr,
             lfimg LIKE lips-lfimg,
             vgbel LIKE lips-vgbel,
             vgpos LIKE lips-vgpos,
            END OF tp_lips_tmp,
          BEGIN OF tp_lips_split ,
             uecha  LIKE lips-uecha,
             vbeln LIKE lips-vbeln,
             posnr LIKE lips-posnr,
             matnr LIKE lips-matnr,
             lfimg LIKE lips-lfimg,
             vgbel LIKE lips-vgbel,
             vgpos LIKE lips-vgpos,
            END OF tp_lips_split.
      CONSTANTS :   c_5(1)       TYPE c VALUE '5',
                    c_otf(3)     TYPE c VALUE 'OTF',
                    c_printer(7) TYPE c VALUE 'PRINTER',
                    c_x(1)       TYPE c VALUE 'X',
                    c_pdf(3)     TYPE c VALUE 'PDF',
                    c_o(1)       TYPE c VALUE 'O',
                    c_mail(5)    TYPE c VALUE 'EMAIL' ,
                    c_e          TYPE so_escape VALUE 'E',
                    c_int        TYPE tddevice VALUE 'INT' ,
                    c_ext(3)     TYPE c VALUE 'EXT',
                    c_raw(3)     TYPE c VALUE 'RAW',
                    c_b          LIKE soos1-recesc VALUE 'B'.
      DATA: ls_print_data_to_read TYPE ledlv_print_data_to_read.
      DATA: ls_dlv_delnote        TYPE ledlv_delnote.
      DATA: lf_fm_name            TYPE rs38l_fnam.
      DATA: ls_control_param      TYPE ssfctrlop.
      DATA: ls_composer_param     TYPE ssfcompop.
      DATA: ls_recipient          TYPE swotobjid.
      DATA: ls_sender             TYPE swotobjid.
      DATA: lf_formname           TYPE tdsfname.
      DATA: ls_addr_key           LIKE addr_key.
      DATA: l_w_object_hd_change    TYPE sood1,
            l_w_header              LIKE  sood1-objdes.
    *--Binary Data
      DATA:   BEGIN OF l_t_solix OCCURS 0.
              INCLUDE STRUCTURE solix.
      DATA:   END OF l_t_solix.
    *--Content to be mailed
      DATA:   BEGIN OF l_t_objcont OCCURS 0.
              INCLUDE STRUCTURE soli.
      DATA:   END OF l_t_objcont.
    *--PDF Data
      DATA:   BEGIN OF l_t_htline OCCURS 10.
              INCLUDE STRUCTURE tline.
      DATA:   END   OF l_t_htline.
      DATA:   BEGIN OF l_t_object_hd_change.
              INCLUDE STRUCTURE sood1.
      DATA:   END OF l_t_object_hd_change.
    *-- Recipient table with send attributes
      DATA:   BEGIN OF l_t_receivers OCCURS 0.
              INCLUDE STRUCTURE soos1.
      DATA:   END OF l_t_receivers.
      DATA:   BEGIN OF l_t_objhead OCCURS 0.
              INCLUDE STRUCTURE soli.
      DATA:   END OF l_t_objhead.
      DATA:   l_t_lips TYPE tp_lips OCCURS 0 WITH HEADER LINE,
              l_t_vbap TYPE tp_vbap OCCURS 0 WITH HEADER LINE,
              l_t_lips_tmp TYPE tp_lips_tmp OCCURS 0 WITH HEADER LINE,
              l_t_lips_split TYPE tp_lips_split OCCURS 0 WITH HEADER LINE.
      DATA :   l_v_document_number TYPE likp-vbeln,
               l_t_ssfcrespd       TYPE ssfcrespd,
               l_t_ssfcrescl       TYPE ssfcrescl,
               l_t_ssfcresop       TYPE ssfcresop,
               l_v_adrnr           TYPE kna1-adrnr,
               l_v_ls_address      TYPE szadr_addr1_complete,
               w_ls_adsmtpline     TYPE szadr_adsmtp_line,
               l_v_mail            LIKE adr6-smtp_addr,
               l_t_otf             LIKE itcoo OCCURS 0,
               l_v_hformat(10)     TYPE c,
               l_v_ld_binfile      TYPE xstring,
               l_v_doc_size        TYPE i,
               l_v_i               TYPE i,
               l_v_n               TYPE i,
               l_v_hkora(50)       TYPE c,
               w_soli              TYPE soli,
               w_solix             TYPE solix,
               l_v_var1(46)        TYPE c  ,
               l_v_linecount       TYPE p,
               l_v_sent_to_all     LIKE sonv-flag,
               l_v_document_type   LIKE soodk-objtp,
               l_v_horiginator     LIKE  soos1-recextnam ,
               l_w_lips            TYPE   tp_lips,
               l_w_vbap            TYPE   tp_vbap,
               l_v_avl_date        TYPE   erdat,
               l_f_oos_status      TYPE   flag,
               l_lfimg LIKE lips-lfimg.
      l_v_document_number  =  nast-objky.
    *--To get the smartform name
      lf_formname = tnapr-sform.
    *-- Determine print data
      PERFORM set_print_data_to_read USING    lf_formname
                                     CHANGING ls_print_data_to_read
                                     cf_retcode.
      IF cf_retcode = 0.
    *--select print data
        PERFORM get_data USING    ls_print_data_to_read
                         CHANGING ls_addr_key
                                  ls_dlv_delnote
                                  cf_retcode.
      ENDIF.
    *-- Begin of Insertion AG2K946177 Scan - Avail date
      CLEAR: l_t_lips,
             l_t_vbap.
    *-- Get the items from the delivery table
      SELECT vbeln posnr matnr lfimg vgbel vgpos uecha FROM lips INTO TABLE l_t_lips
              WHERE vbeln = nast-objky.
      IF sy-subrc = 0.
        IF NOT l_t_lips[] IS INITIAL.
    *-- Get the items from the order table
          SELECT vbeln posnr matnr kbmeng werks FROM vbap INTO TABLE l_t_vbap
                  FOR ALL ENTRIES IN l_t_lips
                  WHERE vbeln = l_t_lips-vgbel AND
                        posnr = l_t_lips-vgpos.
          IF sy-subrc = 0.
            LOOP AT l_t_lips.
                MOVE l_t_lips-vbeln TO  l_t_lips_tmp-vbeln.
                MOVE l_t_lips-posnr TO  l_t_lips_tmp-posnr.
                MOVE l_t_lips-matnr TO  l_t_lips_tmp-matnr.
                MOVE l_t_lips-lfimg TO  l_t_lips_tmp-lfimg.
                MOVE l_t_lips-vgbel TO  l_t_lips_tmp-vgbel.
                MOVE l_t_lips-vgpos TO  l_t_lips_tmp-vgpos.
                MOVE l_t_lips-uecha TO  l_t_lips_tmp-uecha.
              APPEND l_t_lips_tmp.
              CLEAR l_t_lips_tmp.
            ENDLOOP.
            LOOP AT l_t_lips INTO l_w_lips where uecha is INITIAL.
              CLEAR: l_lfimg.
              LOOP AT l_t_lips_tmp WHERE uecha = l_w_lips-posnr.
                MOVE l_t_lips_tmp-vbeln TO  l_t_lips_split-vbeln.
                MOVE l_t_lips_tmp-uecha  TO  l_t_lips_split-uecha.
                MOVE l_t_lips_tmp-posnr TO  l_t_lips_split-posnr.
                MOVE l_t_lips_tmp-matnr TO  l_t_lips_split-matnr.
                MOVE l_t_lips_tmp-vgbel TO  l_t_lips_split-vgbel.
                MOVE l_t_lips_tmp-vgpos TO  l_t_lips_split-vgpos.
                l_lfimg = l_lfimg + l_t_lips_tmp-lfimg.
                AT END OF uecha.
                  l_t_lips_split-lfimg = l_lfimg.
                  APPEND l_t_lips_split.
                  CLEAR l_t_lips_split.
                ENDAT.
              ENDLOOP.
              READ TABLE l_t_lips_split WITH KEY uecha = l_w_lips-posnr.
              IF sy-subrc = 0 .
                READ TABLE l_t_vbap INTO l_w_vbap WITH KEY vbeln = l_w_lips-vgbel
                                                           posnr = l_w_lips-vgpos.
                IF sy-subrc = 0.
                  IF l_t_lips_split-lfimg LT l_w_vbap-kbmeng.
                    SELECT SINGLE avl_dat FROM /mars/ou_avl_dat INTO l_v_avl_date
                          WHERE werks = l_w_vbap-werks AND
                                matnr = l_w_vbap-matnr.
                    IF sy-subrc = 0.
                      IF l_v_avl_date IS INITIAL OR l_v_avl_date < sy-datum.
                        l_f_oos_status = c_x.
                        t_objcont-line = l_w_vbap-matnr.
                        APPEND t_objcont.
                        CLEAR t_objcont.
                      ENDIF.
                    ELSE.
                      l_f_oos_status = c_x.
                      t_objcont-line = l_w_vbap-matnr.
                      APPEND t_objcont.
                      CLEAR t_objcont.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ELSE.
                READ TABLE l_t_vbap INTO l_w_vbap WITH KEY vbeln = l_w_lips-vgbel
                                                            posnr = l_w_lips-vgpos.
                IF sy-subrc = 0.
                  IF l_t_lips-lfimg LT l_w_vbap-kbmeng.
                    SELECT SINGLE avl_dat FROM /mars/ou_avl_dat INTO l_v_avl_date
                          WHERE werks = l_w_vbap-werks AND
                                matnr = l_w_vbap-matnr.
                    IF sy-subrc = 0.
                      IF l_v_avl_date IS INITIAL OR l_v_avl_date < sy-datum.
                        l_f_oos_status = c_x.
                        t_objcont-line = l_w_vbap-matnr.
                        APPEND t_objcont.
                        CLEAR t_objcont.
                      ENDIF.
                    ELSE.
                      l_f_oos_status = c_x.
                      t_objcont-line = l_w_vbap-matnr.
                      APPEND t_objcont.
                      CLEAR t_objcont.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
      IF l_f_oos_status NE c_x.
    *-- End of Insertion AG2K946177 Scan - Avail date
    *-- Begin of Insertion AG2K942430 Delivery Note
        IF cf_retcode = 0.
          IF nast-nacha NE c_5.
    *-- End of Insertion AG2K942430 Delivery Note
            PERFORM set_print_param USING    ls_addr_key
                                    CHANGING ls_control_param
                                             ls_composer_param
                                             ls_recipient
                                             ls_sender
                                             cf_retcode.
            ls_control_param-no_dialog   =  space .
    *-- Begin of Insertion AG2K942430 Delivery Note
          ELSEIF nast-nacha EQ c_5.
            SELECT SINGLE adrnr FROM kna1 INTO l_v_adrnr WHERE kunnr = nast-parnr.
            IF sy-subrc = 0.
              CLEAR l_v_ls_address.
    -- To get the address Details
              CALL FUNCTION 'ADDR_GET_COMPLETE'
                EXPORTING
                  addrnumber     = l_v_adrnr
                IMPORTING
                  addr1_complete = l_v_ls_address
                EXCEPTIONS
                  OTHERS         = 5.
              IF sy-subrc  = 0.
                LOOP AT l_v_ls_address-adsmtp_tab INTO w_ls_adsmtpline
                                                     WHERE date_from <= sy-datlo.
                  IF ( NOT w_ls_adsmtpline-adsmtp-smtp_addr IS INITIAL ).
    *--Email Address
                    l_v_mail = w_ls_adsmtpline-adsmtp-smtp_addr.
                  ENDIF.
                ENDLOOP.
              ENDIF.
    *--To fill the control paramters for Email
              IF NOT l_v_mail IS INITIAL AND nast-nacha EQ c_5.
                ls_control_param-device      =  c_printer.
                ls_control_param-no_dialog   =  c_x.
                ls_control_param-langu       =  sy-langu.
                ls_control_param-preview     =  space.
                ls_control_param-getotf      =  c_x.
    *--Setting LS_COMPOSER_PARAM values
                ls_composer_param-tddest     =  nast-ldest.
                ls_composer_param-tdimmed    =  space.
                ls_composer_param-tdnoprev   =  c_x.
                ls_composer_param-faxformat  =  c_otf.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    *-- End of Insertion AG2K942430 Delivery Note
        IF cf_retcode = 0.
    *-- Determine smartform function module for delivery note
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname           = lf_formname
            IMPORTING
              fm_name            = lf_fm_name
            EXCEPTIONS
              no_form            = 1
              no_function_module = 2
              OTHERS             = 3.
          IF sy-subrc <> 0.
    *-- Error handling
            cf_retcode = sy-subrc.
            PERFORM protocol_update.
          ENDIF.
        ENDIF.
        IF cf_retcode = 0.
    *-- Call smartform delivery note
          CALL FUNCTION lf_fm_name
               EXPORTING
                        archive_index        = toa_dara
                        archive_parameters   = arc_params
                        control_parameters   = ls_control_param
                        mail_recipient       = ls_recipient
                        mail_sender          = ls_sender
                        output_options       = ls_composer_param
                        user_settings        = space
                        is_dlv_delnote       = ls_dlv_delnote
                        is_nast              = nast
    *-- Begin of Insertion AG2K942430 Delivery Note
            IMPORTING
                       document_output_info  = l_t_ssfcrespd
                       job_output_info       = l_t_ssfcrescl
                       job_output_options    = l_t_ssfcresop
    *-- End of Insertion AG2K942430 Delivery Note
             EXCEPTIONS
                        formatting_error     = 1
                        internal_error       = 2
                        send_error           = 3
                        user_canceled        = 4
                        OTHERS               = 5.
          IF sy-subrc <> 0.
    *-- Error handling
            cf_retcode = sy-subrc.
            PERFORM protocol_update.
    *-- Get SmartForm protocol and store it in the NAST protocoll
            PERFORM add_smfrm_prot.
          ENDIF.
        ENDIF.
    *-- Begin of Insertion AG2K942430 Delivery Note
        IF nast-nacha EQ c_5.
          IF NOT l_t_ssfcrescl-otfdata[] IS INITIAL .
            MOVE l_t_ssfcrescl-otfdata[] TO l_t_otf[].
          ENDIF.
          IF NOT l_t_otf[] IS INITIAL.
            IF l_v_hformat IS INITIAL.
              l_v_hformat = c_pdf.
            ENDIF.
            CLEAR   l_t_htline.
            REFRESH l_t_htline.
    *-- Convert OTF Data to PDF Data
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format                = l_v_hformat
              IMPORTING
                bin_filesize          = l_v_doc_size
                bin_file              = l_v_ld_binfile
              TABLES
                otf                   = l_t_otf
                lines                 = l_t_htline
              EXCEPTIONS
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                OTHERS                = 4.
            IF sy-subrc = 0.
              CLEAR l_t_solix.
              REFRESH l_t_solix.
              CLEAR   l_t_objcont.
              REFRESH l_t_objcont.
              l_v_i = 0.
              l_v_n = XSTRLEN( l_v_ld_binfile ).
              WHILE l_v_i < l_v_n.
                l_t_solix-line = l_v_ld_binfile+l_v_i.
                APPEND l_t_solix.
                CLEAR l_t_solix.
                l_v_i = l_v_i + 255.
              ENDWHILE.
              FIELD-SYMBOLS: <ptr_hex> TYPE solix.
              LOOP AT l_t_solix INTO w_solix.
                CLEAR w_soli.
                ASSIGN w_soli TO <ptr_hex> CASTING.
                MOVE w_solix TO <ptr_hex>.
                APPEND w_soli TO l_t_objcont.
              ENDLOOP.
              IF l_v_hformat = c_pdf.
    *--Do nothing
              ELSE.
                CLEAR   l_t_objcont.
                REFRESH l_t_objcont.
                LOOP AT l_t_htline.
                  l_t_objcont = l_t_htline.
                  APPEND l_t_objcont.
                  CLEAR l_t_htline.
                ENDLOOP.
              ENDIF.
            ENDIF.
    *--To Suppress zero's
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
              EXPORTING
                input  = l_v_document_number
              IMPORTING
                output = l_v_document_number.
            CONCATENATE text-001 l_v_document_number  INTO l_v_var1 SEPARATED BY space.
            l_v_hkora = l_v_var1.
            CLEAR l_t_object_hd_change.
            l_t_object_hd_change-objnam    = c_mail.
            l_t_object_hd_change-objdes    = l_v_hkora.
            l_t_object_hd_change-objla     = sy-langu.
            l_t_object_hd_change-objsns    = c_o.
            l_t_object_hd_change-objlen    = l_v_doc_size .
            IF l_v_hformat = c_pdf.
              l_t_object_hd_change-file_ext  = c_pdf.
            ENDIF.
            CLEAR   l_t_receivers.
            REFRESH l_t_receivers.
            l_t_receivers-recextnam    = l_v_mail.
            l_t_receivers-recesc       = c_e.
            l_t_receivers-sndart       = c_int.
            APPEND l_t_receivers.
            CLEAR l_t_receivers.
            DESCRIBE TABLE l_t_objcont LINES l_v_linecount.
            CLEAR    l_t_objhead.
            REFRESH  l_t_objhead.
            IF l_v_hformat = c_pdf.
              l_v_document_type = c_ext.
            ELSE.
              l_v_document_type = c_raw.
              l_t_objhead = l_v_linecount.
              APPEND l_t_objhead.
              CLEAR l_t_objhead.
            ENDIF.
            l_v_horiginator = sy-uname.
    *--Sending the PDF data as Email attachment
            CALL FUNCTION 'SO_OBJECT_SEND'
              EXPORTING
                object_hd_change           = l_t_object_hd_change
                object_type                = l_v_document_type
                originator                 = l_v_horiginator
                originator_type            = c_b
              IMPORTING
                sent_to_all                = l_v_sent_to_all
              TABLES
                objcont                    = l_t_objcont
                objhead                    = l_t_objhead
                receivers                  = l_t_receivers
              EXCEPTIONS
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                originator_not_exist       = 20
                x_error                    = 21
                OTHERS                     = 22.
           IF sy-subrc = 0.
             COMMIT WORK AND WAIT.
           ENDIF.
          ENDIF.
        ENDIF.
    *-- End of Insertion AG2K942430 Delivery Note
    *-- Begin of Insertion AG2K946177 Scan - Avail date
      ELSE.
    *-- Get the details for sending the email
        PERFORM get_details TABLES   t_objparb
                                     t_receivers
                            CHANGING v_obj_type
                                     v_owner
                                     v_sender
                                     w_object_hd_change.
    *-- Sending Email
        PERFORM send_email.
      ENDIF.
    *-- End of Insertion AG2K946177 Scan - Avail date
    ENDFORM.                    "PROCESSING
    *-- Begin of Insertion AG2K946177 Scan - Avail date
    *&      Form  get_details
          Get details for Sending Email
         -->P_T_OBJPARB             Parameter for Dialog Modules
         -->P_T_RECEIVERS           recipient with attributes
         <--P_V_OBJ_TYPE            Code for document class
         <--P_V_OWNER               Owner
         <--P_V_SENDER              Sender
         <--P_W_OBJECT_HD_CHANGE    object definition, change attributes
    FORM get_details  TABLES   p_t_objparb STRUCTURE t_objparb
                               p_t_receivers STRUCTURE t_receivers
                      CHANGING p_v_obj_type
                               p_v_owner
                               p_v_sender
                               p_w_object_hd_change.
      CONSTANTS: c_colon(1)   TYPE c VALUE ':'.
      DATA:
    *-- To Get the Entry from ZZOURULE
            BEGIN OF l_w_zzourule,
              zzvalue1_1 LIKE zzourule-zzvalue1_1,
              zzvalue2_1 LIKE zzourule-zzvalue2_1,
              zzvalue3_1 LIKE zzourule-zzvalue3_1,
            END OF l_w_zzourule,
    *-- To get the entry from sofd
            BEGIN OF l_w_sofd,
              foltp LIKE sofd-foltp,
              folyr LIKE sofd-folyr,
              folno LIKE sofd-folno,
            END OF l_w_sofd,
    *-- To get the entry from sofm
            BEGIN OF l_w_sofm,
              foltp LIKE sofm-foltp,
              folyr LIKE sofm-folyr,
              folno LIKE sofm-folno,
              doctp LIKE sofm-doctp,
              docyr LIKE sofm-docyr,
              docno LIKE sofm-docno,
            END OF l_w_sofm,
            BEGIN OF l_w_swotobjid,
              logsys  LIKE swotobjid-logsys,
              objtype LIKE swotobjid-objtype,
              objkey  LIKE swotobjid-objkey,
            END OF l_w_swotobjid.
      DATA: l_w_header LIKE  sood1-objdes.
    *-- Fill exporting parameters of FM SO_OBJECT_SEND
      CONCATENATE text-004 nast-objky c_colon text-002 INTO l_w_header SEPARATED BY space.
    l_w_header = text-002.
      w_object_hd_change-objla    = sy-langu.
      w_object_hd_change-objnam   = c_notify.
      w_object_hd_change-objdes   = l_w_header.
      v_obj_type = c_raw.
      v_owner    = sy-uname.
      v_sender   = sy-uname.
      t_objparb-name = c_wi_id.
      APPEND t_objparb.
      CLEAR t_objparb.
      t_objparb-name = text-003.
      t_objparb-value = sy-datum.
      APPEND t_objparb.
      CLEAR t_objparb.
    *-- Get the folder Name from the ZZOURULE table
      SELECT zzvalue1_1 zzvalue2_1 zzvalue3_1
      FROM zzourule INTO l_w_zzourule UP TO 1 ROWS
      WHERE zzprog = sy-repid AND
            zzdata = c_oos.
      ENDSELECT.
      IF sy-subrc = 0.
        SELECT foltp folyr folno
               FROM sofd INTO l_w_sofd UP TO 1 ROWS
               WHERE objnam = l_w_zzourule-zzvalue1_1 AND
                     folrg  = c_q.
        ENDSELECT.
        IF sy-subrc = 0.
          SELECT foltp folyr folno doctp docyr docno
                    FROM sofm INTO l_w_sofm UP TO 1 ROWS
            WHERE doctp =      l_w_sofd-foltp AND
                  docyr =      l_w_sofd-folyr AND
                  docno =      l_w_sofd-folno.
          ENDSELECT.
          IF sy-subrc = 0.
            CLEAR t_receivers.
            MOVE l_w_zzourule-zzvalue1_1  TO t_receivers-recnam.
    *-- C means Shared distribution List
            MOVE c_c TO t_receivers-recesc.
            APPEND t_receivers.
            CLEAR t_receivers.
            l_w_swotobjid-logsys  = l_w_zzourule-zzvalue2_1.
            l_w_swotobjid-objtype = l_w_zzourule-zzvalue3_1.
            CONCATENATE l_w_sofm-foltp
                        l_w_sofm-folyr
                        l_w_sofm-folno
                        l_w_sofm-doctp
                        l_w_sofm-docyr
                        l_w_sofm-docno INTO l_w_swotobjid-objkey.
            t_receivers-recextnam = l_w_swotobjid.
    *-- J means external Object
            MOVE c_j TO t_receivers-recesc.
            APPEND t_receivers.
            CLEAR t_receivers.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  send_email
          Sending Email
    FORM send_email .
    *-- Email send to the receipent maintained in the shared folder
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change           = w_object_hd_change
          object_type                = v_obj_type
          owner                      = v_owner
          sender                     = v_sender
        IMPORTING
          object_id_new              = w_object_id_new
          sent_to_all                = v_sent_to_all
        TABLES
          objcont                    = t_objcont
          objhead                    = t_objhead
          objparb                    = t_objparb
          receivers                  = t_receivers
        EXCEPTIONS
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          forwarder_not_exist        = 6
          note_not_exist             = 7
          object_not_exist           = 8
          object_not_sent            = 9
          object_no_authorization    = 10
          object_type_not_exist      = 11
          operation_no_authorization = 12
          owner_not_exist            = 13
          parameter_error            = 14
          substitute_not_active      = 15
          substitute_not_defined     = 16
          system_failure             = 17
          too_much_receivers         = 18
          user_not_exist             = 19
          x_error                    = 20
          OTHERS                     = 21.
    ENDFORM.                    " send_email
    *-- End of Insertion AG2K946177 Scan - Avail date

  • Reg : Issue for Sending of external email using SO_OBJECT_SEND

    There is one issue while sending external email using SO_OBJECT_SEND functional module.
    1. The body of the mail is also included as attachment.
    I want to avoid the same.
    Please anyone can give the solution.

    hi check this example ,
    Sending mail with attachment report in Background
    Content Author: Fernando Faian
    I have read the hint about "Sending mail with attachment report".
    It's great, but how can I make this function work in background??
    I had that needed last year too. See attachment a function group with two functions. The second one has that functionality to send email or fax (SAP office) with attachment objects in background job using SO_ATTACHMENT_INSERT function. 
    Pay attention because it’s working with output list from spool converted to pdf. 
    =================================================================================
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            "MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
          lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
          lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
          lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
           file(60) TYPE c,
           END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
          object_id      LIKE soodk,
          link_folder_id LIKE soodk,
          g_document     LIKE sood4,
         g_header_data  LIKE sood2,
          g_folmem_data  LIKE sofm2,
          g_header_data  LIKE sood2,
          g_receive_data LIKE soos6,
          g_ref_document LIKE sood4,
          g_new_parent   LIKE soodk,
          l_folder_id    LIKE sofdk,
          v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
          name    LIKE tst01-dname,
          objtype LIKE rststype-type,
          type    LIKE rststype-type.
    DATA: numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE 'X',
          store_flag  LIKE sonv-flag,
          delete_flag LIKE sonv-flag,
          owner       LIKE soud-usrnam,
          on          LIKE sonv-flag VALUE 'X',
          sent_to_all LIKE sonv-flag,
          g_authority LIKE sofa-usracc,
          w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
          n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
          real_type LIKE sood-objtp,
          attach_type LIKE sood-objtp,
          otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
          ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
               c_objtp    LIKE g_document-objtp    VALUE 'RAW',
               c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *"  TABLES
    *"      LT_BODY_EMAIL STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      IF sy-subrc NE 0.
        RAISE err_no_abap_spooljob. "doesn't exist
      ELSE.
        client = tsp01-rqclient.
        name   = tsp01-rqo1name.
        CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  authority     = 'SP01'
                  client        = client
                  name          = name
                  part          = 1
             IMPORTING
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4
                  OTHERS        = 5.
        IF objtype(3) = 'OTF'.
          desired_type = otf.
        ELSE.
          desired_type = ali.
        ENDIF.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = src_spoolid
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  owner     = sy-uname
                  region    = ou_fol
             IMPORTING
                  folder_id = l_folder_id
             EXCEPTIONS
                  OTHERS    = 5.
    fill out informations about the header of the email
        CLEAR: g_document.
        g_document-foltp     = l_folder_id-foltp.
        g_document-folyr     = l_folder_id-folyr.
        g_document-folno     = l_folder_id-folno.
        g_document-objtp     = c_objtp.
        g_document-objdes    = header_mail.
        g_document-file_ext  = c_file_ext.
        g_header_data-objdes    = header_mail.
        CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
             EXPORTING
                  method      = 'SAVE'
                  office_user = sy-uname
             IMPORTING
                  authority   = g_authority
             TABLES
                  objcont     = lt_body_email
                  attachments = lt_attachments
             CHANGING
                  document    = g_document
                  header_data = g_header_data
             EXCEPTIONS
                  OTHERS      = 1.
        folder_id-objtp = l_folder_id-foltp.
        folder_id-objyr = l_folder_id-folyr.
        folder_id-objno = l_folder_id-folno.
        object_id-objtp = c_objtp.
        object_id-objyr = g_document-objyr.
        object_id-objno = g_document-objno.
        link_folder_id-objtp = l_folder_id-foltp.
        link_folder_id-objyr = l_folder_id-folyr.
        link_folder_id-objno = l_folder_id-folno.
        REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = 'X'.
       lt_rec_tab-recesc     = object_type.   "This field for FAX/MAIL
       lt_rec_tab-recnam     = 'U-'.
       lt_rec_tab-deliver    = 'X'.
       lt_rec_tab-not_deli   = 'X'.
       lt_rec_tab-read       = 'X'.
       lt_rec_tab-mailstatus = 'E'.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = '5'.
       APPEND lt_rec_tab.
          lt_rec_tab-recextnam = fax_mail_number.
          lt_rec_tab-recesc = object_type.
          lt_rec_tab-sndart = 'INT'.
          lt_rec_tab-sndpri = 1.
          APPEND lt_rec_tab.
        lt_files-file = c_file.
        APPEND lt_files.
    begin of insertion by faianf01
        hd_dat-objdes = header_mail.
        CALL FUNCTION 'SO_ATTACHMENT_INSERT'
             EXPORTING
                  object_id                  = object_id
                  attach_type                = attach_type
                  object_hd_change           = hd_dat
                  owner                      = sy-uname
             TABLES
                  objcont                    = l_objcont
                  objhead                    = l_objhead
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  x_error                    = 1000.
        IF sy-subrc > 0.
        ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
        CALL FUNCTION 'SO_OBJECT_SEND'
             EXPORTING
                  folder_id                  = folder_id
                  object_id                  = object_id
                  outbox_flag                = outbox_flag
                  link_folder_id             = link_folder_id
                  owner                      = sy-uname
                 check_send_authority       = 'X'
             TABLES
                  receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  component_not_available    = 1
                  folder_no_authorization    = 5
                  folder_not_exist           = 6
                  forwarder_not_exist        = 8
                  object_no_authorization    = 13
                  object_not_exist           = 14
                  object_not_sent            = 15
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  too_much_receivers         = 73
                  user_not_exist             = 35.
      ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"  TABLES
    *"      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
      DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
      vg_achou = 1.
      DO 60 TIMES.
        SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
        IF sy-subrc IS INITIAL.
          CLEAR vg_achou.
          EXIT.
        ELSE.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO.
      IF vg_achou = 1.
        RAISE err_no_abap_spooljob. "doesn't exist
      ENDIF.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      IF objtype(3) = 'OTF'.
        desired_type = otf.
      ELSE.
        desired_type = ali.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                rqident              = src_spoolid
                desired_type         = desired_type
           IMPORTING
                real_type            = real_type
           TABLES
                buffer               = l_objcont
           EXCEPTIONS
                no_such_job          = 14
                type_no_match        = 94
                job_contains_no_data = 54
                no_permission        = 21
                can_not_access       = 21
                read_error           = 54.
      IF sy-subrc EQ 0.
        attach_type = real_type.
      ENDIF.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = header_mail.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = header_mail.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      REFRESH lt_rec_tab.
      LOOP AT LIST_FAX_MAIL_NUMBER.
        lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
        lt_rec_tab-recesc = 'U'.
        lt_rec_tab-sndart = 'INT'.
        lt_rec_tab-sndpri = 1.
        APPEND lt_rec_tab.
      ENDLOOP.
      lt_files-file = c_file.
      APPEND lt_files.
      hd_dat-objdes = header_mail.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
      IF sy-subrc > 0.
      ENDIF.
    send email from SAPOFFICE
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                folder_id                  = folder_id
                object_id                  = object_id
                outbox_flag                = outbox_flag
                link_folder_id             = link_folder_id
                owner                      = sy-uname
           TABLES
                receivers                  = lt_rec_tab
                note_text                  = lt_note_text
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                component_not_available    = 1
                folder_no_authorization    = 5
                folder_not_exist           = 6
                forwarder_not_exist        = 8
                object_no_authorization    = 13
                object_not_exist           = 14
                object_not_sent            = 15
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                too_much_receivers         = 73
                user_not_exist             = 35.
    ENDFUNCTION.
    =================================================================================
    regards,
    venkat.

  • Sending email using UTL_SMTP

    Dear experts,
    I am trying to send an email using UTL_SMTP (i switched from UTL_MAIL to UTL_SMTP since i need to send mails with large attachments - BLOB). I am using the demo_mail package given here:
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    While running the program I am getting an error message (from the error.log) saying:
    [Mon Aug 04 14:00:21 2008] [error] [client 192.168.0.7] mod_plsql: /ns/email_p.send HTTP-404 ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first. 9sm12723808qbw.6\nORA-06512: at "SYS.UTL_SMTP", line 20\nORA-06512: at "SYS.UTL_SMTP", line 98\nORA-06512: at "SYS.UTL_SMTP", line 221\nORA-06512: at "NEXTSTEP.SEND_EMAIL_HELPER", line 258\nORA-06512: at "NEXTSTEP.SEND_EMAIL_HELPER", line 119\nORA-06512: at "NEXTSTEP.EMAIL_P", line 33\nORA-06512: at line 31\n, referer: file:///C:/Documents and Settings/Mayank/My Documents/Flex Builder 3/ns5/bin-debug/main.swf
    My code is as follows:
    PACKAGE DECLARATION. This is the DEMO_MAIL package posted under above link (I have renamed it).
    CREATE OR REPLACE PACKAGE NEXTSTEP.send_email_helper IS
      ----------------------- Customizable Section -----------------------
      -- Customize the SMTP host, port and your domain name below.
        smtp_host   VARCHAR2(256) := 'smtp.gmail.com';
        smtp_port   PLS_INTEGER   := 587;
        smtp_domain VARCHAR2(256) := null;
      -- Customize the signature that will appear in the email's MIME header.
      -- Useful for versioning.
      MAILER_ID   CONSTANT VARCHAR2(256) := 'Mailer by Oracle UTL_SMTP';
      --------------------- End Customizable Section ---------------------
      -- A unique string that demarcates boundaries of parts in a multi-part email
      -- The string should not appear inside the body of any part of the email.
      -- Customize this if needed or generate this randomly dynamically.
      BOUNDARY        CONSTANT VARCHAR2(256) := '-----7D81B75CCC90D2974F7A1CBD';
      FIRST_BOUNDARY  CONSTANT VARCHAR2(256) := '--' || BOUNDARY || utl_tcp.CRLF;
      LAST_BOUNDARY   CONSTANT VARCHAR2(256) := '--' || BOUNDARY || '--' ||
                                                  utl_tcp.CRLF;
      -- A MIME type that denotes multi-part email (MIME) messages.
      MULTIPART_MIME_TYPE CONSTANT VARCHAR2(256) := 'multipart/mixed; boundary="'||
                                                      BOUNDARY || '"';
      MAX_BASE64_LINE_WIDTH CONSTANT PLS_INTEGER   := 76 / 4 * 3;
      -- A simple email API for sending email in plain text in a single call.
      -- The format of an email address is one of these:
      --   someone@some-domain
      --   "Someone at some domain" <someone@some-domain>
      --   Someone at some domain <someone@some-domain>
      -- The recipients is a list of email addresses  separated by
      -- either a "," or a ";"
      PROCEDURE mail(sender     IN VARCHAR2,
             recipients IN VARCHAR2,
             subject    IN VARCHAR2,
             message    IN VARCHAR2);
      -- Extended email API to send email in HTML or plain text with no size limit.
      -- First, begin the email by begin_mail(). Then, call write_text() repeatedly
      -- to send email in ASCII piece-by-piece. Or, call write_mb_text() to send
      -- email in non-ASCII or multi-byte character set. End the email with
      -- end_mail().
      FUNCTION begin_mail(sender     IN VARCHAR2,
                  recipients IN VARCHAR2,
                  subject    IN VARCHAR2,
                  mime_type  IN VARCHAR2    DEFAULT 'text/plain',
                  priority   IN PLS_INTEGER DEFAULT NULL)
                  RETURN utl_smtp.connection;
      -- Write email body in ASCII
      PROCEDURE write_text(conn    IN OUT NOCOPY utl_smtp.connection,
                   message IN VARCHAR2);
      -- Write email body in non-ASCII (including multi-byte). The email body
      -- will be sent in the database character set.
      PROCEDURE write_mb_text(conn    IN OUT NOCOPY utl_smtp.connection,
                  message IN            VARCHAR2);
      -- Write email body in binary
      PROCEDURE write_raw(conn    IN OUT NOCOPY utl_smtp.connection,
                  message IN RAW);
      -- APIs to send email with attachments. Attachments are sent by sending
      -- emails in "multipart/mixed" MIME format. Specify that MIME format when
      -- beginning an email with begin_mail().
      -- Send a single text attachment.
      PROCEDURE attach_text(conn         IN OUT NOCOPY utl_smtp.connection,
                data         IN VARCHAR2,
                mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                inline       IN BOOLEAN  DEFAULT TRUE,
                filename     IN VARCHAR2 DEFAULT NULL,
                    last         IN BOOLEAN  DEFAULT FALSE);
      -- Send a binary attachment. The attachment will be encoded in Base-64
      -- encoding format.
      PROCEDURE attach_base64(conn         IN OUT NOCOPY utl_smtp.connection,
                  data         IN RAW,
                  mime_type    IN VARCHAR2 DEFAULT 'application/octet',
                  inline       IN BOOLEAN  DEFAULT TRUE,
                  filename     IN VARCHAR2 DEFAULT NULL,
                  last         IN BOOLEAN  DEFAULT FALSE);
      -- Send an attachment with no size limit. First, begin the attachment
      -- with begin_attachment(). Then, call write_text repeatedly to send
      -- the attachment piece-by-piece. If the attachment is text-based but
      -- in non-ASCII or multi-byte character set, use write_mb_text() instead.
      -- To send binary attachment, the binary content should first be
      -- encoded in Base-64 encoding format using the demo package for 8i,
      -- or the native one in 9i. End the attachment with end_attachment.
      PROCEDURE begin_attachment(conn         IN OUT NOCOPY utl_smtp.connection,
                     mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                     inline       IN BOOLEAN  DEFAULT TRUE,
                     filename     IN VARCHAR2 DEFAULT NULL,
                     transfer_enc IN VARCHAR2 DEFAULT NULL);
      -- End the attachment.
      PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   last IN BOOLEAN DEFAULT FALSE);
      -- End the email.
      PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection);
      -- Extended email API to send multiple emails in a session for better
      -- performance. First, begin an email session with begin_session.
      -- Then, begin each email with a session by calling begin_mail_in_session
      -- instead of begin_mail. End the email with end_mail_in_session instead
      -- of end_mail. End the email session by end_session.
      FUNCTION begin_session RETURN utl_smtp.connection;
      -- Begin an email in a session.
      PROCEDURE begin_mail_in_session(conn       IN OUT NOCOPY utl_smtp.connection,
                      sender     IN VARCHAR2,
                      recipients IN VARCHAR2,
                      subject    IN VARCHAR2,
                      mime_type  IN VARCHAR2  DEFAULT 'text/plain',
                      priority   IN PLS_INTEGER DEFAULT NULL);
      -- End an email in a session.
      PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection);
      -- End an email session.
      PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection);
    END;How should I solve the above error? Can anyone help me with my query please?
    If I add the code to start TLS it still gives me an error. If I add the code
    utl_smtp.command(conn,'STARTTLS');
    utl_smtp.helo(conn, smtp_domain);
    under email_sender_help package just before under begin_session function, it gives me an error saying:
    ORA-29279: SMTP permanent error: 503 5.5.1 EHLO/HELO first. s27sm2097329qbs.12
    So then if i enter the same code after:
    utl_smtp.command(conn,'STARTTLS');
    utl_smtp.helo(conn, smtp_domain);
    It gives me an error:
    ORA-29278: SMTP transient error: 421 Service not available
    Message was edited by:
    Monk
    Message was edited by:
    Monk

    look like rely turned off on the server..
    check this.. or ask your network guys..
    Go to Control Panel->Add or Remove Programs->Click on
    Add/Remove Wndows Components
    Check IIS check box.
    Select Internet Information Service (IIS) option and click on Details button
    Check whether SMTP Service is checked or not.
    If not selected then select SMTP check box.
    This process should be done on server.
    It will help out from ORA-29278: SMTP transient error: 421 Service not available problem.
    thanks

  • Issue to send email (using sp_send_dbmail) with an attachement located in other server within the same network

    I have two servers. One is for databases (DB) with the mail server configured and the other is for SSIS without mail server. Both servers are in the same network. On the SSIS server the SSIS package exports data from the DB server table
    to xls file. The file is saved in SSIS server. When I created a task to send the email (using sp_send_dbmail) to attach that file, I got the error message:
    Error: Executing the query "EXECUTE [msdb].[dbo].[sp_send_dbmail]
     @profile_na..." failed with the following error: "Attachment file H:\test.xls is invalid.".
    Any help will be appreciated. Thanks.
    A Fan of SSIS, SSRS and SSAS

    Where are you running this?
    If its in the other server (DB) you need to use UNC path to the SSIS server folder where file resides
    Also the executing account should have access to the folder as well as the file. So If you're running this from a job make sure you either provider folder and file access to sql agent job service account or create a separate proxy account with the required
    permissions and configure the job to use the account
    see
    http://www.databasejournal.com/features/mssql/article.php/3789881/Proxy-Accounts-in-SQL-Server.htm
    http://www.codeproject.com/Articles/28918/SQL-Server-Agent-Proxy
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • I have BIS but can't surf, send/receive email, use apps

    i have BB Curve 8520. My BIS was running smoothly (sending and receiving emails real time and surfing the net through BIS), until i noticed when i tried to reply to an email that came in, it won't send. i noticed that it's fluctuating. i was able to send the email after a few minutes... then a few minutes later, i received a replied email from my friend, and when i tried to send my reply, i wasn't able to. also, i can't surf using the browser with the "internet browser" as default. i tried using my wifi and then suddenly all my emails started coming in, all emails that were not able to go through hours ago. my big question was why do i need to turn on wifi just to receive emails. but since i had my BIS for 2 months now, i can send and receive emails and surf through BIS itself without turning on the wifi.  also, i can't use any of my apps like facebook, twitter, yahoo messenger, etc.  They used to work fine with BIS... but now, i have to turn on the wifi connection, so i could log in with them.  aren't these supposed to be running through BIS only?
    I have GPRS on top, not gprs. my carrier says i have active data plan/BIS. but under Services Status..it says Blackberry Internet Service:  Connection:  not connected...
    so, i wiped out my BB and deleted all third party apps. when this was done, i received emails telling me "Your handheld has been registered with the wireless network" and even got "Activation Server" emails telling me that the emails that i have previously set up are now up and running. so i thought my BB is now ok.. i tried surfing, it was okay. after like about 5 minutes, it was down again. tried sending email but can't... i turned on the wifi and boom! the emails started coming in again.i have the Host Routing Tables and my Service Books in my BB. I have GPRS (not gprs) on top which means i have active BIS.  i have registered my HRTs several times... and resending my service books... same thing...
    the big mystery is when i turn on the wifi, the emails suddenly go through and i can send emails. i can open apps that used to only run on BIS. this is ok i guess, but i could never do any of these if i'm not connected to wifi.
    my sister and i have the same BB... i removed my sim and inserted it to her BB and the BIS worked fine... i was able to surf and use apps.. but when i put my sim back on my phone, the problem still exists.  i even used a different sim card that is also subscribed to BIS/data plan, and it still has the same problem... my guess is my carrier is right that my data plan is working ok and that my handheld itself has the problem... 
    i updated my OS, same problem.. wiped it out... used BBSAK, reinstalled OS... numerous battery pulls... same thing... i can receive the HRTs and service books, but after that can't do anything else like i used to... (send/receive emails, use apps like facebook, twitter, ym, etc., can't surf with internet browser - except when wifi is on everything else work fine even emails and apps).. 
    i would really appreciate your help guys.. thanks!

    Hi tarifiq and welcome to the BlackBerry Support Community Forums!
    Can you send me a private message with your PIN so I can check this out for you?
    Thanks
    -CptS
    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)!

  • Send smartforms via email using action profiles

    hi,
    i am trying to send smartforms via email using action profiles and i would like to know if anyone has any document or know any steps to do the same. i have created the smartform and i created the action in an action profile. i selected the option "Smartforms Mail". and i have mentioned my smartform in it.
    I have previously worked with action profiles to trigger workflows which sent a mail. That was relatively easier as i could mention that the mail be sent to my mailbox. But in the smartforms option, i dont know how to give the instruction that it be sent to my mailbox.. is there any place i can set it? The action is not person dependant and is done whenever saving a document.
    Please guide.
    Thanks,
    Nisha

    Hi Nisha,
    As u worked on Action profiles, i recommend u use action profile with permitted Process type as Smart Forms Mail to send the mails which contains the data in Smartform u created.
    Use below mail setting
    Form Name              (u r ZSmartform)
    Processing Class      CL_DOC_PROCESSING_CRM_ORDER
    Processing Method    CRM_ACTIVITY_EXEC_SMART_FORM
    Archive Mode            1 Mail only User
    In Action definition details u can mentioned the Processing time, Partner dependent for action to who u want to send the mail, further in action condition using schedule and start condition u can set the criteria to mail trigger.
    Hope it'll help u.
    Regards,
    Dipesh.

Maybe you are looking for

  • How do I export or save smaller sized images?

    I have a design that is A3 size (i.e. 297 × 420mm) and 300dpi. I'd like to save out various versions of the image: one at full size, one at 150 dpi, one at A4 (i.e. 210 × 297mm) 150 dpi, and one at A4 72dpi. At the moment I'm doing this by saving dif

  • New to Mac computers-need advice about hardware

    I purchased a Mac computer on eBay knowing that the mainboard needed to be replaced. I purchased it for the software on the hard drive. I need to replace the mainboard and do not know anything aside from that the bottom is white, round, and has a sil

  • On Flash Player Setting manager(Advanced tab) Active X Version is ok...Plug in Version Not installed

    Please how do I get the Plug in Version? I have only the ActiveX version..11.7.700.169..I need the plugin version..anyone? appreciate

  • CSV export from SSRS gives a line break if there are two tables

    I have a report with two tables. There is no gap between in the reports. The report looks good when I run it, but when I export the report to CSV, there is an extra line between the two tables. Can somebody help me fix this issue. Thanks in advance.

  • Create anchors on a circle

    Hello to all, I am using the AI CS5 (version 15.1.0) I was very nervous yesterday when I wanted to place new anchors on a circle. Sometimes it worked well and sometimes it did not work at all (actually it showed the following pop-up): I have found th