How to send a mail in html format from a send mail workflow node ?

Dear all,
Do you know if it is possible to send an e-mail in HTML format (instead of RAW) from a "send mail" node in a workflow ?  ... if "yes", please, let me know.
(I need to do that because I want to use the "href" tag to insert an hyperlink inside the e-mail)
- I haven't found any parameter to specify the format of the e-mail.
- Inside SCOT I tried to change the parameters for the SMTP node... without success.
- I don't want to use a task calling the FM SO_OBJECT_SEND.
Nicolas

Hi Nicolas!
Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
Hope this helps!
Regards
Geir

Similar Messages

  • How to send mails in HTML format from the send mail step of workflow?

    Hi,
    I have a requirement where I need to send mails in the html format from the send mail step of the workflows.
    But what I found out that the html tags are not renderd and as such the output is in plain text.
    I know that there is an alternative of using an activity step and use my own custom code from within there,But due to certain business constraints, I need to use the send mail step only.
    My SCOT settings are all right.
    Please let me know how it can be done.
    Thanks,
    Samrat.

    Samrat,
    It can't be done, you have to use your own activity step.
    What are these constraints that refrain you from doing that?
    Rgds,
    Patrick

  • How do I mix text and Html format in a java mail?

    How do I mix text and Html format in a java mail? some part I want to keep the text format, the other part I want to use Html functions(like fond, color, etc)

    You don't mix them. Pick one or the other.
    However if you want to have a text version and an HTML version, so that mail readers that don't handle HTML can see regular text instead, then you could produce a "multipart/alternative" message. There's an explanation of how to do that in this article:
    http://www-128.ibm.com/developerworks/java/library/x-xmlist2/

  • How to send the body of mail in html format using servlet

    Hi
    i developed an servlet using sun.net.smtp.SmtpClient package,my servlet receiving data from an form,i can able to send mail successfully,but my mail body part is in the text format,but i would like to send it as an html format,for ex <input type="text" size="25" name="Name"> as an input field with value received from the form instead of showing tags as i mentioned<input type="text" size="25" name="Name"> ,any help would be appreciated.
    Regards.

    See this program
    But here whats the problem is ,
    some maiservers doesnot support html code if u send this mail to yahoo account it will show html code as it is,
    hotmail account encodes the html and shows proper fonts and headings
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import sun.net.smtp.SmtpClient;
    public class SendMail {
              public static void main(String args[]){
              int i = 0;
              //while (true) {
              SmtpClient mail;
              try{
                   i++;
                   String email = "[email protected]";
                   String from="[email protected]";
                   mail=new SmtpClient("bizpivot.com");
                   mail.from(from);
              mail.to(email);
                   PrintStream msg=mail.startMessage();
                   msg.println("To: " +email);
                   msg.println("Subject: Hai" i "!!!");
                   msg.println("<html><head><title>Untitled</title></head><body bgcolor='red' text='#00ffff'><font face='Courier New' size='+3'>Hai How are you Man!!!</font></body></html>");
                   mail.closeServer();
              System.out.println(i);
              catch(Exception e){e.printStackTrace();}

  • How to send mail in  HTML  format using SMTP

    I want to send mail in HTML format using SMTP.Can anybody please suggest how to do it.Can anybody send me the code.
    Thnx.

    If you don't know how to send a message using JavaMail see here : http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.html#JavaMailSending
    To send a html format mail you need to set the content type like this (msg is a javax.mail.internet.MimeMessage) :
    String subject = "An Email 4 U";
    String message = "<HTML><BODY>Here is a link<br><a href='http://javasoft.com'>Java</a></BODY></HTML>";
    msg.setSubject(subject);
    msg.setContent(message, "text/html");p.s This isn't really an advanced topic

  • How to send program output as  mail in HTML format

    Hi Friends,
    I have a BDc which runs in background and its been Stored in my system and displayed as HTML format.
    My requirement is now i want that Same HTML file which i am displaying to be sent as a mail in HTML format itself..Kindly help me on this
    Thanks in advance
    kishore

    Hi,
    Below sample program might give you idea on sending HTML attachment.
    TYPES: BEGIN OF t_sal_ord,
               vbeln TYPE vbeln_va,
               posnr TYPE posnr_va,
               auart TYPE auart,
               vkorg TYPE vkorg,
               matnr TYPE matnr,
             END OF t_sal_ord.
      DATA: i_sal_ord TYPE STANDARD TABLE OF t_sal_ord,
            i_header TYPE STANDARD TABLE OF w3head,
            i_fields TYPE STANDARD TABLE OF w3fields,
            i_html TYPE STANDARD TABLE OF w3html,
            wa_header TYPE w3head.
      DATA: i_fcat TYPE lvc_t_fcat,
            wa_fcat TYPE lvc_s_fcat.
      DATA: g_send_request TYPE REF TO cl_bcs,
            g_document TYPE REF TO cl_document_bcs,
            g_recipient TYPE REF TO cl_cam_address_bcs,
            g_cx_bcs TYPE REF TO cx_bcs,
            g_sent_to_all TYPE os_boolean.
      DATA: g_lines TYPE i,
            g_size TYPE so_obj_len.
      PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY,
                  p_mailad TYPE ad_smtpadr OBLIGATORY.
    START-OF-SELECTION.
      SELECT a~vbeln b~posnr a~auart a~vkorg b~matnr
        INTO TABLE i_sal_ord
        UP TO 20 ROWS
        FROM vbak AS a
        INNER JOIN vbap AS b
        ON a~vbeln  = b~vbeln
        WHERE a~vkorg = p_vkorg.
      wa_fcat-coltext = 'SalesOrd#'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Item#'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'OrdType'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Sales.Org'.
      APPEND wa_fcat TO i_fcat.
      wa_fcat-coltext = 'Material'.
      APPEND wa_fcat TO i_fcat.
      LOOP AT i_fcat INTO wa_fcat.
        wa_header-text = wa_fcat-coltext.
        CALL FUNCTION 'WWW_ITAB_TO_HTML_HEADERS'
          EXPORTING
            field_nr = sy-tabix
            text     = wa_header-text
            size     = '2'
            fgcolor  = 'BLACK'
            bgcolor  = 'VIOLET'
            font     = 'CALIBRI'
          TABLES
            header   = i_header.
        CALL FUNCTION 'WWW_ITAB_TO_HTML_LAYOUT'
          EXPORTING
            field_nr = sy-tabix
            size     = '2'
            fgcolor  = 'BLACK'
            bgcolor  = 'WHITE'
            font     = 'CALIBRI'
          TABLES
            fields   = i_fields.
      ENDLOOP.
      wa_header-text = 'Sales Order Details'.
      wa_header-size = '2'.
      wa_header-font = 'CALIBRI'.
      CALL FUNCTION 'WWW_ITAB_TO_HTML'
       EXPORTING
    *     TABLE_ATTRIBUTES       = 'BORDER=1'
         table_header           = wa_header
    *     ALL_FIELDS             = 'X'
        TABLES
          html                   = i_html
          fields                 = i_fields
          row_header             = i_header
          itable                 = i_sal_ord.
      TRY .
          g_send_request = cl_bcs=>create_persistent( ).
          g_document = cl_document_bcs=>create_document(
                        i_type  = 'RAW'
    *                i_text  = i_content[]  " Body for Mail
                        i_subject = 'Sales Order Details' ).
          DESCRIBE TABLE i_html LINES g_lines.
          g_size = g_lines * 2 * 255.
          CALL METHOD g_document->add_attachment
            EXPORTING
              i_attachment_type    = 'HTM'
              i_attachment_subject = 'Sales Order Details'
              i_attachment_size    = g_size
              i_att_content_text   = i_html[].
          g_send_request->set_document( g_document ).
    g_recipient = cl_cam_address_bcs=>create_internet_address( p_mailad ).
          g_send_request->add_recipient(
             EXPORTING
               i_recipient = g_recipient
               i_express = 'X' ).
          g_send_request->set_send_immediately( 'X' ).
          g_send_request->send(
              EXPORTING
                i_with_error_screen = 'X'
              RECEIVING
                result = g_sent_to_all ).
          COMMIT WORK.
        CATCH cx_bcs INTO g_cx_bcs.
          WRITE:/ g_cx_bcs->error_type.
      ENDTRY.
    Kind Regards
    Eswar

  • How to send a mail with HTML body from Oracle

    Hi Team,
    Can somebody guide me how to send a mail with HTML body from oracle.
    Here is the piece of code i am trying to send a mail.
    procedure SEND_MAIL is
    cursor c_1 is select * from table_name;
    l_mail_id varchar2(40);
    -- ls_mailhost VARCHAR2(64) := Mailhost;
    ls_from VARCHAR2(64) := ‘[email protected]
    ls_subject VARCHAR2(200);
    ls_to VARCHAR2(64);
    l_mail_conn UTL_SMTP.connection;
    ls_left_menu_name VARCHAR2(64);
    ll_emp_num number(8);
    begin
    for i in c_1 loop
    begin
    l_mail_conn := UTL_SMTP.OPEN_CONNECTION('IP');
    UTL_SMTP.HELO(l_mail_conn, 'IP');
    UTL_SMTP.MAIL(l_mail_conn, LS_FROM);
    UTL_SMTP.RCPT(L_mail_conn, LS_TO);
    UTL_SMTP.DATA(l_mail_conn,'From: ' ||ls_from || utl_tcp.crlf ||
    'To: ' ||ls_to || utl_tcp.crlf ||
    'Subject: ' ||ls_subject|| utl_tcp.crlf);
    UTL_SMTP.QUIT(l_mail_conn);
    exception
    when no_data_found then
    null;
    when others then
    RAISE_APPLICATION_ERROR(-20000, 'Failed to send mail due to the following error: ' || sqlerrm);
    end;
    end loop;
    end;
    Thnx

    Hi Nicolas!
    Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
    If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
    SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
    Hope this helps!
    Regards
    Geir

  • Urgent Help. How to send the email in HTML format in Version 4.6c

    Hi,
      Please help me how to send a mail in HTML format with logo and specified format. Is it possible to send the SAPscript or Smartform in HTML format to external mail address.  The logo and the format is very important in this e-mail.
      quick response will help me better.
    Regards,
    Naidu

    Here is a sample program which emails HTML in the body.  Of course you can put an HTML tag in there that would point to the logo on some server(internet).  Notice we are just putting the HTML code in the MAILTXT table,  This is how we do it at my company.
    report zrich_0002.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
      clear:    maildata, mailtxt,  mailrec.
      refresh:  mailtxt, mailrec.
      perform build_text_message.
      perform build_receivers.
      perform send_mail_nodialog..
    *      Form  BUILD_TEXT_MESSAGE
    form build_text_message.
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      mailtxt  = '<html>'.
      append mailtxt.
      mailtxt  = '<head>'.
      append mailtxt.
      mailtxt  = '<title>Untitled Document</title>'.
      append mailtxt.
      mailtxt  = '<meta http-equiv="Content-Type" content="text/html;'.
      append mailtxt.
      mailtxt  = 'charset=iso-8859-1">'.
      append mailtxt.
      mailtxt  = '</head>'.
      append mailtxt.
      mailtxt  = '<body>'.
      append mailtxt.
      mailtxt  = '<div align="center"><em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif">THIS'.
      append mailtxt.
      mailtxt  = '  IS A TEST </font></em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif"></font>'.
      append mailtxt.
      mailtxt  = '</div>'.
      append mailtxt.
      mailtxt  = '</body>'.
      append mailtxt.
      mailtxt  = '</html>'.
      append mailtxt.
    endform.
    *      Form  BUILD_RECEIVERS
    form build_receivers.
    *  mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    endform.
    *      Form  SEND_MAIL_NODIALOG
    form send_mail_nodialog.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.
    Regards,
    Rich Heilman

  • Send e-mail in HTML-format with attachment

    Does function SO_OBJECT_SEND allow to send e-mail with attachment?
    Does function SO_DOCUMENT_SEND_API1 allow to send e-mail in HTML format?

    Hi SS
    See if you can understand this sample program
    PARAMETERS: po_email TYPE AD_SMTPADR LOWER CASE.
    DATA: li_objcont TYPE STANDARD TABLE OF solisti1,
    li_reclist TYPE STANDARD TABLE OF somlreci1,
    li_objpack TYPE STANDARD TABLE OF sopcklsti1,
    li_objhead TYPE STANDARD TABLE OF solisti1,
    li_content TYPE STANDARD TABLE OF solisti1,
    lwa_objcont TYPE solisti1,
    lwa_reclist TYPE somlreci1,
    lwa_objpack TYPE sopcklsti1,
    lwa_objhead TYPE solisti1,
    lwa_content TYPE solisti1,
    lwa_doc TYPE sodocchgi1,
    l_lines TYPE i.
    REFRESH: li_objcont[], li_reclist[],
    li_objpack[], li_objhead[],
    li_content[].
    CLEAR: lwa_objcont, lwa_reclist,
    lwa_objpack, lwa_objhead,
    lwa_content, lwa_doc.
    MOVE '<body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '<p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE 'This is a sample HTML content from test program' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    lwa_reclist-receiver = po_email.
    lwa_reclist-rec_type = 'U'.
    APPEND lwa_reclist TO li_reclist.
    lwa_objhead = 'test.htm'.
    APPEND lwa_objhead TO li_objhead.
    lwa_content = 'Please find attached document for more details'.
    APPEND lwa_content TO li_content.
    CLEAR l_lines.
    DESCRIBE TABLE li_content LINES l_lines.
    READ TABLE li_content INTO lwa_content INDEX l_lines.
    lwa_doc-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_content ).
    lwa_doc-obj_langu = 'E'.
    lwa_doc-obj_name = 'Test HTML file'.
    lwa_doc-obj_descr = 'Test HTML file'.
    CLEAR lwa_objpack-transf_bin.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'RAW'.
    APPEND lwa_objpack TO li_objpack.
    CLEAR: lwa_objpack, l_lines.
    DESCRIBE TABLE li_objcont LINES l_lines.
    READ TABLE li_objcont INTO lwa_objcont INDEX l_lines.
    lwa_objpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_objcont ).
    lwa_objpack-transf_bin = 'X'.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'HTM' .
    lwa_objpack-obj_name = 'Test HTML file'.
    lwa_objpack-obj_descr = 'Test HTML file'.
    APPEND lwa_objpack TO li_objpack.
    *Sending the mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc
    put_in_outbox = 'X'
    TABLES
    packing_list = li_objpack
    object_header = li_objhead
    contents_bin = li_objcont
    contents_txt = li_content
    receivers = li_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    IF sy-subrc NE 0.
    WRITE:/ 'Document sending failed'.
    ELSE.
    WRITE:/ 'Document successfully sent'.
    COMMIT WORK.
    ENDIF.
    This should give you all you need to know to send an HTML file.
    Thanks buddy

  • Need to send my spool in HTML format as Email attachment

    Hi All,
        Can anyone let me know how to send a HTML attachment in a mail.
    I have a ALV Report, when i execute, my report should pick the ALV Report output from spool, and should send a mail with spool output as HTML attachment.
    Please explain me how i need to do the above.
    Regards
    Nanda

    Hi Nanda,
    You can use 2 reports for this.
    In one report just display the ALV..
    and in the second report submit this first report  to memory and get it html format and then send it as an email.
    Just check this code (instead of alv...this is a normal report that is sent as HTML attachment)
    *--Tables
    TABLES: VBRK.
                     TYPES DECLARATION                                   *
    TYPES: BEGIN OF TY_VBRK,
            KUNAG TYPE KUNAG," Payer Id
           END OF TY_VBRK,
    *-- customer details
           BEGIN OF TY_KNA1,
            KUNNR TYPE KUNNR," Customer Id
            NAME1 TYPE NAME1," Customer Name
            ADRNR TYPE ADRNR," Address No
           END OF TY_KNA1,
    *-- Mailing details
           BEGIN OF TY_ADDR,
            ADDRNUMBER TYPE AD_ADDRNUM, " Address No
            MAIL_ID TYPE AD_SMTPADR,    " Email Address
           END OF TY_ADDR,
    *-- Log details
           BEGIN OF TY_MSG,
            STR1 TYPE AD_SMTPADR, " Email Address
            STR2 TYPE KUNNR,      " Payer Id
            STR3 TYPE NAME1,      " Payer Name
            STR4 TYPE D,          " Date
            STR5 TYPE T,          " Time
           END OF TY_MSG.
                 I N T E R N A L  T A B L E S                            *
    DATA: RECEPIENTS TYPE TABLE OF AD_SMTPADR, "table for email id's
          LISTOBJECT TYPE TABLE OF ABAPLIST,   "table with displayed list
          HTML TYPE TABLE OF W3HTML,           "html container
          RETURN TYPE TABLE_OF_STRINGS,        "message table
          IT_VBRK TYPE TABLE OF TY_VBRK,       "Billing Details
          IT_KNA1 TYPE TABLE OF TY_KNA1,       "Customer Details
          IT_ADDR TYPE TABLE OF TY_ADDR,       "Mail id
          IT_MSG TYPE TABLE OF TY_MSG.         "Log Details
    *-- Structure Declarations
    DATA: WA_REC TYPE AD_SMTPADR,
          WA_KNA1 TYPE TY_KNA1,
          WA_ADDR TYPE TY_ADDR,
          WA_MSG TYPE TY_MSG.
          Declarations for Sending mail                                  *
    *-- To Create link and add recepients address
    DATA: SEND_REQUEST TYPE REF TO CL_BCS.
    *-- To Create HTML document
    DATA: DOCUMENT TYPE REF TO CL_DOCUMENT_BCS.
    *-- To Create Sender Id
    DATA: SENDER_ID TYPE REF TO IF_SENDER_BCS.
    *-- To Create recepient address
    DATA: RECIPIENT TYPE REF TO IF_RECIPIENT_BCS.
    *-- To Handle Exceptions
    DATA: BCS_EXCEPTION TYPE REF TO CX_BCS.
    *-- To check if the mail is sent to all recepients
    DATA: SENT_TO_ALL TYPE OS_BOOLEAN.
    DATA: CONLENGTHS TYPE SO_OBJ_LEN . "To calculate length of the HTML file
                  V A R I A B L E S                                      *
    DATA: REPORT TYPE PROGRAMM,    "Report name
          SENDER TYPE AD_SMTPADR,  "Sender Address
          SUBJECT TYPE SO_OBJ_DES. "Subject
    DATA: BCS_MESSAGE TYPE STRING ."String to store exceptions
    DATA: V_KUNAG TYPE KUNAG.      "Payer Id
    DATA: V_MAIL TYPE AD_SMTPADR,  "Mail Address
          V_DATE TYPE ZZBCDATE.    "To Validate Entered Date
                 S E L C T I O N - S C R E E N                           *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_ZZBCDA FOR VBRK-ZZBCDAT. "Billing Complete Date
    PARAMETERS:     P_MAILFT TYPE AD_SMTPADR,  "Mail id
                    P_MAILSC TYPE AD_SMTPADR.  "Mail id
    SELECTION-SCREEN END OF BLOCK B1.
                      At Selection Screen                                *
    AT SELECTION-SCREEN.
    *-- Validate the dates entered
      SELECT ZZBCDAT UP TO 1 ROWS
              FROM VBRK
              INTO V_DATE
              WHERE ZZBCDAT IN S_ZZBCDA.
      ENDSELECT.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH 'Dates Not Found In The Given Range'(002).
      ENDIF.
                 S T A R T - O F - S E L E C T I O N                     *
      CONCATENATE SY-UNAME '@YAHOO.COM'(003) INTO SENDER.
    *-- Populating the Subject Line
      MOVE 'Invoice Due Date Details'(004) TO SUBJECT.
    *-- Selecting the Payer Details Based on Input Dates
      SELECT KUNAG
              FROM VBRK
              INTO TABLE IT_VBRK
                   WHERE ZZBCDAT IN S_ZZBCDA.
    *-- Selecting the Address Number from Customer Master
      SELECT KUNNR
             NAME1
             ADRNR
              FROM KNA1
              INTO TABLE IT_KNA1
                   FOR ALL ENTRIES IN IT_VBRK
                   WHERE KUNNR = IT_VBRK-KUNAG.
    *-- Selecting the Mail Id's
      SELECT ADDRNUMBER
             SMTP_ADDR
              FROM ADR6
              INTO TABLE IT_ADDR
                   FOR ALL ENTRIES IN IT_KNA1
                   WHERE ADDRNUMBER = IT_KNA1-ADRNR.
    *-- Getting all the selected mail Id's
      RECEPIENTS = IT_ADDR[].
      MOVE (your first report name) TO REPORT.
      IF NOT RECEPIENTS[] IS INITIAL .
        LOOP AT IT_KNA1 INTO WA_KNA1.
          AT NEW KUNNR.
            READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNA1-KUNNR
                                                              BINARY SEARCH.
            REFRESH RECEPIENTS.
    *-- Populating the Recepients Mail Id's for the Particular Kunnr
            LOOP AT IT_ADDR INTO WA_ADDR WHERE ADDRNUMBER = WA_KNA1-ADRNR.
              IF NOT WA_ADDR IS INITIAL.
                TRANSLATE WA_ADDR-MAIL_ID TO UPPER CASE.
                APPEND WA_ADDR-MAIL_ID TO RECEPIENTS.
              ENDIF.
            ENDLOOP.
    *-- Appending the mail id's from the input fields when not initial
            IF NOT P_MAILFT IS INITIAL.
              TRANSLATE P_MAILFT TO UPPER CASE.
              APPEND P_MAILFT TO RECEPIENTS.
            ENDIF.
            IF NOT P_MAILSC IS INITIAL.
              TRANSLATE P_MAILSC TO UPPER CASE.
              APPEND P_MAILSC TO RECEPIENTS.
            ENDIF.
    *-- Sending the Kunnr while Submitting the Report
            V_KUNAG = WA_KNA1-KUNNR.
            TRANSLATE REPORT TO UPPER CASE .
    *--Submitting the Report Exporting the List to Memory
            SUBMIT (REPORT) WITH S_ZZBCDA IN S_ZZBCDA
                            WITH P_KUNAG = V_KUNAG
                             EXPORTING LIST TO MEMORY AND RETURN.
            CLEAR: LISTOBJECT , HTML .
            REFRESH : LISTOBJECT, HTML .
    *-- Calling the Fn Module to get the list from the Memory
            CALL FUNCTION 'LIST_FROM_MEMORY'
              TABLES
                LISTOBJECT = LISTOBJECT.
    *-- Calling Fn Module to get the List in HTML Format
            CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
              EXPORTING
                REPORT_NAME = REPORT
              TABLES
                HTML        = HTML
                LISTOBJECT  = LISTOBJECT.
    *-- Getting the Size of the Html Document
            DATA: V_LINES TYPE I.
            DESCRIBE TABLE HTML LINES V_LINES.
            CLEAR CONLENGTHS .
            CONLENGTHS = V_LINES * 255.
            TRY.
                CLEAR SEND_REQUEST .
                SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
                CLEAR DOCUMENT .
    *-- Creating the Document
                DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                I_TYPE = 'HTM'
                I_TEXT = HTML
                I_LENGTH = CONLENGTHS
                I_SUBJECT = SUBJECT ).
    *-- add document to send request
                CALL METHOD SEND_REQUEST->SET_DOCUMENT( DOCUMENT ).
                CLEAR SENDER_ID .
    *-- Creating the internet address for the sender id.
          SENDER_ID = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( SENDER ).
                CALL METHOD SEND_REQUEST->SET_SENDER
                  EXPORTING
                    I_SENDER = SENDER_ID.
                CLEAR WA_REC .
    *-- Creating the Recepients address
                LOOP AT RECEPIENTS INTO WA_REC .
                  CLEAR RECIPIENT .
                  RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
                  WA_REC ).
    add recipient with its respective attributes to send request
                  CALL METHOD SEND_REQUEST->ADD_RECIPIENT
                    EXPORTING
                      I_RECIPIENT = RECIPIENT
                      I_EXPRESS   = 'X'.
                ENDLOOP .
                CALL METHOD SEND_REQUEST->SET_STATUS_ATTRIBUTES
                  EXPORTING
                    I_REQUESTED_STATUS = 'E'
                    I_STATUS_MAIL      = 'E'.
                CALL METHOD SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
    *-- Sending the Document
                CALL METHOD SEND_REQUEST->SEND(
                EXPORTING
                I_WITH_ERROR_SCREEN = 'X'
                RECEIVING
                RESULT = SENT_TO_ALL ).
                IF SENT_TO_ALL = 'X'.
    *-- Getting the details to display the Job Log
                  LOOP AT RECEPIENTS INTO V_MAIL.
                    WA_MSG-STR1 = V_MAIL.
                    WA_MSG-STR2 = WA_KNA1-KUNNR.
                    WA_MSG-STR3 = WA_KNA1-NAME1.
                    WA_MSG-STR4 = SY-DATUM.
                    WA_MSG-STR5 = SY-UZEIT.
                    APPEND WA_MSG TO IT_MSG.
                  ENDLOOP.
                ELSE.
                  APPEND 'Mail not sent'(005)  TO RETURN.
                ENDIF.
                COMMIT WORK.
              CATCH CX_BCS INTO BCS_EXCEPTION.
                BCS_MESSAGE = BCS_EXCEPTION->GET_TEXT( ).
                APPEND BCS_MESSAGE TO RETURN .
                EXIT.
            ENDTRY.
          ENDAT.
        ENDLOOP.
      ELSE .
        APPEND 'Specify email address for sending'(006) TO RETURN .
      ENDIF .
                     E N D - O F - S E L E C T I O N                     *
    END-OF-SELECTION.
    *-- Displaying the Job Log
      FORMAT COLOR 1 INTENSIFIED ON.
      WRITE:/        SY-ULINE(121),
                (40) 'Mail Sent to'(007),
                     SY-VLINE,
                (12) 'Payer Id'(008),
                     SY-VLINE,
                (35) 'Payer Name'(009),
                     SY-VLINE,
                (10) 'Sent Date'(010),
                     SY-VLINE,
                (10) 'Sent Time'(011),
                     SY-VLINE,
                     SY-ULINE(121).
      LOOP AT IT_MSG INTO WA_MSG.
        FORMAT COLOR 2 INTENSIFIED ON.
        WRITE:/         SY-ULINE(121),
                   (40) WA_MSG-STR1,
                        SY-VLINE,
                   (12) WA_MSG-STR2,
                        SY-VLINE,
                   (35) WA_MSG-STR3,
                        SY-VLINE,
                   (10) WA_MSG-STR4  DD/MM/YYYY,
                        SY-VLINE,
                   (10) WA_MSG-STR5  USING EDIT MASK '__:__:__',
                        SY-VLINE,
                        SY-ULINE(121).
      ENDLOOP.

  • How to generate my report in HTML format

    Hi
    I am using Forms and reports 6i . How to generate a report in Html format.
    Please explain what are the option available in reports and the way to do
    thanks in advance
    prasanth a.s.

    *specify  desformat=html  in cmd line
    refer
    * Forms Reports integration 6i
    http://otn.oracle.com/products/forms/pdf/277282.pdf
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

  • How to convert table content into html format?

    Hi,
    Experts,
    How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
    Thank u,
    Shabeer Ahmed.

    Then use this code....
    REPORT  ytest_table_html1.
    *        D A T A   D E C L A R A T I O N
    *-HTML Table
    DATA:
      t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
                                           " Html Table
    *- Declare Internal table and Fieldcatalog
      it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
                                           " Flights Details
      it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
                                           " Fieldcatalog
    *-Variables
    DATA:
      v_lines TYPE i,
      v_field(40).
    *-Fieldsymbols
    FIELD-SYMBOLS: <fs> TYPE ANY.
    *        S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
      SELECT *
        FROM sflight
        INTO TABLE it_flight
        UP TO 20 ROWS.
    *        E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *-Fill the Column headings and Properties
    * Field catalog is used to populate the Headings and Values of
    * The table cells dynamically
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'SFLIGHT'
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2.
      DELETE it_fcat WHERE fieldname = 'MANDT'.
      t_html-line = '<html>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<thead>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<tr>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<td><h1>Flights Details</h1></td>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '</tr>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '</thead>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<table border = "1">'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<tr>'.
      APPEND t_html.
      CLEAR t_html.
    *-Populate HTML columns from Filedcatalog
      LOOP AT it_fcat.
        CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
            it_fcat-scrtext_l
            '</th>' INTO t_html-line.
        APPEND t_html.
        CLEAR t_html.
      ENDLOOP.
      t_html-line = '</tr>'.
      APPEND t_html.
      CLEAR t_html.
      DESCRIBE TABLE it_fcat LINES v_lines.
    *-Populate HTML table from Internal table data
      LOOP AT it_flight.
        t_html-line = '<tr>'.
        APPEND t_html.
        CLEAR t_html.
    *-Populate entire row of HTML table Dynamically
    *-With the Help of Fieldcatalog.
        DO v_lines TIMES.
          READ TABLE it_fcat INDEX sy-index.
          CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
          ASSIGN (v_field) TO <fs>.
          t_html-line = '<td>'.
          APPEND t_html.
          CLEAR t_html.
          t_html-line = <fs>.
          APPEND t_html.
          CLEAR t_html.
          t_html-line = '</td>'.
          APPEND t_html.
          CLEAR t_html.
          CLEAR v_field.
          UNASSIGN <fs>.
        ENDDO.
        t_html-line = '</tr>'.
        APPEND t_html.
        CLEAR t_html.
      ENDLOOP.
      t_html-line = '</table>'.
      APPEND t_html.
      CLEAR t_html.
    *-Download  the HTML into frontend
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'C:\Flights.htm'
        TABLES
          data_tab                = t_html
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *-Display the HTML file
      CALL METHOD cl_gui_frontend_services=>execute
        EXPORTING
          document               = 'C:\Flights.htm'
          operation              = 'OPEN'
        EXCEPTIONS
          cntl_error             = 1
          error_no_gui           = 2
          bad_parameter          = 3
          file_not_found         = 4
          path_not_found         = 5
          file_extension_unknown = 6
          error_execute_failed   = 7
          synchronous_failed     = 8
          not_supported_by_gui   = 9
          OTHERS                 = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    none of the above function modules r obsolete...

  • ICS 2.x: How do I change the hour display format from AM/PM to 24 hour mode in the JavaScript?

    How do I change the hour display format from the AM/PM mode to the 24 hour mode
    in the JavaScript?
    <P>
    To change the hour display format,<BR>
    <P>
    <OL>
    <LI>Open the <I>loadpoint</I>/CalendarServer/cal/uicust/en/main.html
    file.
    <P>
    <LI>Go to the "Misc." section.
    <P>
    <LI>Edit the following line:<BR>
    <P>
    i18n['def clock'] = '24';
    </OL>

    laugh
    how analog. 
    neat idea, but i need to see that part of the screen after login on a fairly regular basis, otherwise i might seriously do this.

  • I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    You may have to try deleting all the music from your phone (by going to Settings>General>Usage>Music, swipping All Music and tapping Delete), then sync it all back on with iTunes in order to fix this.

  • How do I fully delete an email account from my Apple Mail app on my iMac?

    Hello all,
    How do I fully delete an email account from my Apple Mail app on my iMac?
    When I go here: Mail > Preferences Mail > Accounts
    I got the message that I needed to delete it from my Internet Accounts.
    When I go here: System Preferences > Internet Accounts > select the account >
    I cannot select or click the minus sign on the bottom left to delete the account because it does not appear in the list.
    Yet the email account still shows up in my email logs with errors that it cannot connect.
    The email account no longer appears in the left column where all my email accounts are in Apple Mail as I have deleted that domain and no longer use it, so the email was deleted at the server level. However, again, the email account still shows up in my email logs with errors that it cannot connect.
    This is driving me bananas!
    Thank you for any help you can provide!
    ~ Angela

    If you haven't already done so, please quit and relaunch Mail. See whether the account goes away.

Maybe you are looking for

  • Purpose of Prefix and Suffix in Logical Data Member?

    Hi, What is the purpose of the prefix and suffix fieldin a logical member? For instance, I have the word "Off" entered in the On field and the word "On" entered in the Off field. The  "Invert Logical Signal" is unchecked.  So is this the same as havi

  • Credit note for Returns

    Hello, I did a credit note for a "returns order". Does someone know why I get the message: Document xxx saved (no accounting document generated) After that I have to press the "green flag" in change billing document or the ReleaseToAccounting within

  • Want know a table name in which material movement field exits

    hi, if any know the table name which contains "material movement" field and  ("vendor number" or any vendor related field)

  • What happened to library menu (e.g., golden oldies)?

    hi. i just updated my apple software this evening.  i love the changes.  that said, i'm not able to find, in iTunes 12.0.1.26, my library where i had the option to see different music genres (golden oldies, etc.).  i'm missing my all elvis presley st

  • Downloading Logic Studio?

    I recently bought a Logic Studio, and as I'm trying to install it, it seems difficult cuz the CD drive in my macbook is not working well sometimes. I, once, braught to the retail store and tried to fix it but decided not to cuz it costs a lot, and lu