Email smartform in html format

Hello all,
I've been searching SDN for help with creating an email in html format via smartforms. Pavan Bayyapu's blog was really helpful and I've also used program SF_XSF_DEMO_MAIL as the basis for my program.  I followed their examples exactly but my emails always appear as a .MTL attachment, never as just the body of the email. 
I tried removing the file name from lo_mime_helper->set_main_html and from lo_mime_helper->add_binary_part as suggested by some other folks but I haven't had any success.
Has anyone solved this same issue?  Maximum points will be given to helpful suggestions. 
Thank you.

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/59/cd7da407d711d5b66f006094192fe3/content.htm">converting SF to html format</a>
Here is the code to send the Smartform to mail as PDF attachment.
*& Report ZTEST_PDF_MAIL
REPORT ZTEST_PDF_MAIL.
Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
Create Message Body Title and Description
I_OBJTXT = 'test with pdf-Attachment!'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = '[email protected]'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
regards,
srinivas
<b>*reward for useful answers*</b>

Similar Messages

  • Smartforms in HTML Format

    Hi Guru's,
    Please help me.
    I want to display Smartforms in HTML Format.
    i.e when I run my Tcode inspite of Print Preview the data should open in HTML Format.
    Thanks in Advance.

    Chk this..
    http://help.sap.com/saphelp_nw04/helpdata/EN/59/cd7da407d711d5b66f006094192fe3/content.htm
    Re: FM for conversion of graphical display of spool to html
    Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 11, 2008 9:35 AM

  • Solution manager Smartform in HTML format.

    Hi All,
       Here , I ahve a requirement, the smartform <b>CRM_SLFN_ORDER_SERVICE_01</b> is going to the service desk in PDF format as all the Output types in SCOT for Scripts and Smartforms have been configured as PDF. But I have to send it in HTML format.... is there any way other than coping the Class and modifying........
    if there is no way other than that PL. let me know how to modify the code to convert the output into HTML format......
    thank you,
    Girish.

    Hi,
    It is possible to send mail in html.
    Copy the Processing Class CL_DOC_PROCESSING_CRM_ORDER into own namespace (for example Z_CL_DOC_PROCESSING_CRM_ORDER)
    Create a new Processing Method (or copy the SAP Standard CRM_SRVORDER_EXEC_SMART_FROM) and insert (or replace) the following code:
    Z_CRM_SRVORDER_EXEC_SMARTFORM
    METHOD Z_CRM_SRVORDER_EXEC_SMART_FORM.
    INCLUDE: crm_direct.
      TYPES:
        SWC_OBJECT TYPE OBJ_RECORD.
      DATA:
            LS_CONTROL_PARAMETERS TYPE SSFCTRLOP.
    function name
      DATA: function_name TYPE rs38l_fnam,
            DUMMY(254)        TYPE C,
            ls_archive_index  TYPE  toa_dara,
            ls_orderadm_h     TYPE  crmt_output_orderadm_h_com,
            ls_activity_h     TYPE  crmt_output_activity_h_com,
            ls_opport_h       TYPE  crmt_output_opport_h_com,
            ls_orgman_h       TYPE  crmt_output_orgman_h_com,
            lt_partner_h      TYPE  crmt_output_partner_h_comt,
            ls_pricingdata_h  TYPE  crmt_output_pricingdata_h_com,
            ls_sales_h        TYPE  crmt_output_sales_h_com,
            ls_shipping_h     TYPE  crmt_output_shipping_h_com,
            lt_payplan_d_h    TYPE  crmt_output_payplan_d_h_comt,
            ls_customer_h     TYPE  crmt_output_customer_h_com,
            ls_cumulat_h      TYPE  crmt_output_cumulat_h_com,
            lt_billing_h      TYPE  crmt_output_billing_h_comt,
            lt_cancel_h       TYPE  crmt_output_cancel_h_comt,
            lt_appointment_h TYPE   crmt_output_appointment_h_comt,
            lt_billplan_d_h  TYPE   crmt_output_billplan_d_h_comt,
            lt_billplan_h    TYPE   crmt_output_billplan_h_comt,
            lt_status_d_h    TYPE   crmt_output_status_d_h_comt,
            lt_status_h      TYPE   crmt_output_status_h_comt,
            lt_srv_subject_h TYPE   crmt_output_srv_subject_h_comt,
            lt_srv_reason_h  TYPE   crmt_output_srv_reason_h_comt,
            lt_srv_result_h  TYPE   crmt_output_srv_result_h_comt,
            ls_acs_h         TYPE   crmt_acs_h_com,
            lt_srv_subject_i TYPE   crmt_output_srv_subject_h_comt,
            lt_srv_refobj_h  TYPE   crmt_output_srv_refobj_h_comt,
            lt_srv_refobj_i  TYPE   crmt_output_srv_refobj_h_comt,
            lt_orderadm_i    TYPE   crmt_output_orderadm_i_comt,
            lt_orgman_i      TYPE   crmt_output_orgman_i_comt,
            lt_pricingdata_i TYPE   crmt_output_pricingdata_i_comt,
            lt_pricing_i     TYPE   crmt_output_pricing_i_comt,
            lt_product_i     TYPE   crmt_output_product_i_comt,
            lt_sales_i       TYPE   crmt_output_sales_i_comt,
            lt_service_i       TYPE   crmt_output_service_i_comt,
            lt_shipping_i    TYPE   crmt_output_shipping_i_comt,
            lt_schedlin_i    TYPE   crmt_output_schedlin_i_comt,
            lt_customer_i    TYPE   crmt_output_customer_i_comt,
            lt_partner_i     TYPE   crmt_output_partner_i_comt,
            lt_item_cstics_i TYPE   crmt_item_cstics_tab,
            lt_billing_i     TYPE   crmt_output_billing_i_comt,
            lt_cancel_i      TYPE   crmt_output_cancel_i_comt,
            lt_finprod_i     TYPE   crmt_output_finprod_i_comt,
            lt_ordprp_i      TYPE   crmt_output_ordprp_i_comt,
            lt_appointment_i TYPE   crmt_output_appointment_i_comt,
            lt_billplan_d_i  TYPE   crmt_output_billplan_d_i_comt,
            lt_billplan_i    TYPE   crmt_output_billplan_i_comt,
            lt_orderadm_i_qt TYPE   crmt_output_orderadm_i_qt_comt,
            lt_orderadm_i_in TYPE   crmt_output_orderadm_i_in_comt,
            lt_schedlin_i_cf TYPE   crmt_output_schedlin_i_cf_comt,
            lt_status_i      TYPE   crmt_output_status_i_comt,
            lt_working_set_e_s_bbp TYPE /1cn/working_set_e_s_bbp_t,
            lv_language LIKE  sy-langu,
            lo_order TYPE REF TO cl_doc_crm_order,
            lv_object_guid TYPE crmt_object_guid,
            lv_status TYPE jstat,
            lt_status TYPE TABLE OF jstat,
            lv_error_tab_wrk TYPE ssferror,
            ls_output_options TYPE ssfcompop,
            lt_service_i_assi          TYPE   crmt_output_service_i_***_comt.
    fill internal structure for the output options
      ls_output_options = is_output_options.
    get the function name for this smart form
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                formname           = ip_smart_form
    VARIANT            = ' '
    DIRECT_CALL        = ' '
           IMPORTING
                fm_name            = function_name
           EXCEPTIONS
                no_form            = 1
                no_function_module = 2
                OTHERS             = 3
      IF sy-subrc <> 0.
    add an error message to processing protocol
        MESSAGE i015(sppf_media) WITH ip_smart_form INTO dummy.
        CALL METHOD cl_log_ppf=>add_message
          EXPORTING
            ip_problemclass = '1'
            ip_handle       = ip_application_log.
        EXIT.
      ENDIF.
    determine the tables of the application
      CALL FUNCTION 'CRM_OUTPUT_SINGLE_READ'
        EXPORTING
          iv_object                 = io_appl_object
          iv_smart_form             = ip_smart_form
          ir_partner                = io_partner
        IMPORTING
          es_output_orderadm_h      = ls_orderadm_h
          es_output_activity_h      = ls_activity_h
          es_output_opport_h        = ls_opport_h
          es_output_orgman_h        = ls_orgman_h
          es_output_pricingdata_h   = ls_pricingdata_h
          es_output_sales_h         = ls_sales_h
          es_output_shipping_h      = ls_shipping_h
          et_output_partner_h       = lt_partner_h
          et_output_payplan_d_h     = lt_payplan_d_h
          es_output_customer_h      = ls_customer_h
          es_output_cumulat_h       = ls_cumulat_h
          et_output_billing_h       = lt_billing_h
          et_output_cancel_h        = lt_cancel_h
          et_output_appointment_h   = lt_appointment_h
          et_output_billplan_d_h    = lt_billplan_d_h
          et_output_billplan_h      = lt_billplan_h
          et_output_status_d_h      = lt_status_d_h
          et_output_status_h        = lt_status_h
          et_output_srv_subject_h   = lt_srv_subject_h
          et_output_srv_reason_h    = lt_srv_reason_h
          et_output_srv_result_h    = lt_srv_result_h
          et_output_srv_refobj_h    = lt_srv_refobj_h
          et_output_srv_refobj_i    = lt_srv_refobj_i
          et_output_srv_subject_i   = lt_srv_subject_i
          es_output_acs_h           = ls_acs_h
          et_output_orderadm_i      = lt_orderadm_i
          et_output_orgman_i        = lt_orgman_i
          et_output_pricingdata_i   = lt_pricingdata_i
          et_output_pricing_i       = lt_pricing_i
          et_output_product_i       = lt_product_i
          et_output_sales_i         = lt_sales_i
          et_output_service_i       = lt_service_i
          et_output_shipping_i      = lt_shipping_i
          et_output_schedlin_i      = lt_schedlin_i
          et_output_partner_i       = lt_partner_i
          et_item_cstics_i          = lt_item_cstics_i
          et_output_customer_i      = lt_customer_i
          et_output_billing_i       = lt_billing_i
          et_output_cancel_i        = lt_cancel_i
          et_output_finprod_i       = lt_finprod_i
          et_output_ordprp_i        = lt_ordprp_i
          et_output_appointment_i   = lt_appointment_i
          et_output_billplan_d_i    = lt_billplan_d_i
          et_output_billplan_i      = lt_billplan_i
          et_output_orderadm_i_qt   = lt_orderadm_i_qt
          et_output_orderadm_i_in   = lt_orderadm_i_in
          et_output_schedlin_i_cf   = lt_schedlin_i_cf
          et_output_status_i        = lt_status_i
          et_output_wrk_set_e_s_bbp = lt_working_set_e_s_bbp
          ev_language               = lv_language
          et_output_service_i_assi  = lt_service_i_assi.
    set mail title
      SELECT SINGLE caption INTO ls_output_options-tdtitle
        FROM stxfadmt WHERE
        formname = ip_smart_form AND
        langu    = lv_language.
      IF ls_output_options-tdtitle  IS INITIAL.
        SELECT SINGLE caption INTO ls_output_options-tdtitle
         FROM stxfadmt WHERE
         formname = ip_smart_form.
      ENDIF.
      REPLACE '&' WITH ls_orderadm_h-object_id
        INTO ls_output_options-tdtitle.
    *--language of smart form--
    determin here the language of the smart form
      ls_control_parameters = is_control_parameters.
      ls_control_parameters-langu = lv_language.
      CONSTANTS: C_GR_DIR TYPE TDTEXT VALUE 'MYGRAPHICS/'.      "#EC NOTEXT
      DATA:
        LS_XSFPARAM_LINE       TYPE SSFXSFP,
        LS_HTML                TYPE TRFRESULT,
        LT_GRAPHICS            TYPE TSF_XSF_GR.
    *SET SMARTFORM OUTPUT OPTIONS
      LS_OUTPUT_OPTIONS-XSFCMODE = 'X'.
      LS_OUTPUT_OPTIONS-XSF = 'X'.
      LS_OUTPUT_OPTIONS-XSFOUTMODE = 'A'.
      LS_OUTPUT_OPTIONS-XSFFORMAT = 'X'.
      LS_OUTPUT_OPTIONS-TDARMOD = '' .
      CLEAR LS_OUTPUT_OPTIONS-XSFOUTDEV.
      LS_XSFPARAM_LINE-NAME  = 'GRAPHICS'.                      "#EC NOTEXT
      LS_XSFPARAM_LINE-VALUE = 'EXTRACT'.                       "#EC NOTEXT
      APPEND LS_XSFPARAM_LINE TO LS_OUTPUT_OPTIONS-XSFPARS.
      LS_XSFPARAM_LINE-NAME  = 'GRAPHICS-DIRECTORY'.            "#EC NOTEXT
      LS_XSFPARAM_LINE-VALUE = C_GR_DIR.
      APPEND LS_XSFPARAM_LINE TO LS_OUTPUT_OPTIONS-XSFPARS.
      LS_XSFPARAM_LINE-NAME  = 'CONTENT-ID'.                    "#EC NOTEXT
      LS_XSFPARAM_LINE-VALUE = 'ENABLE'.                        "#EC NOTEXT
      APPEND LS_XSFPARAM_LINE TO LS_OUTPUT_OPTIONS-XSFPARS.
    SILENT MODE ON
      LS_OUTPUT_OPTIONS-TDIMMED = SPACE.
      LS_OUTPUT_OPTIONS-TDNEWID = SPACE.
      LS_CONTROL_PARAMETERS-NO_DIALOG = 'X'.                    "#EC NOTEXT
      LS_CONTROL_PARAMETERS-DEVICE = ''.  "EC NOTEXT
    call function to process smart form (old forms)
      CALL FUNCTION function_name
        EXPORTING
          archive_index        = is_archive_index
          archive_index_tab    = ct_archive_index_tab
          archive_parameters   = is_archive_parameters
          control_parameters   = ls_control_parameters
          mail_appl_obj        = is_mail_appl_obj
          mail_recipient       = is_mail_recipient
          mail_sender          = is_mail_sender
          output_options       = ls_output_options
          user_settings        = ip_user_settings
          orderadm_h           = ls_orderadm_h
          activity_h           = ls_activity_h
          opport_h             = ls_opport_h
          orgman_h             = ls_orgman_h
          partner_h            = lt_partner_h
          pricingdata_h        = ls_pricingdata_h
          sales_h              = ls_sales_h
          shipping_h           = ls_shipping_h
          payplan_d_h          = lt_payplan_d_h
          cumulat_h            = ls_cumulat_h
          customer_h           = ls_customer_h
          acs_h                = ls_acs_h
          billing_h            = lt_billing_h
          cancel_h             = lt_cancel_h
          appointment_h        = lt_appointment_h
          billplan_d_h         = lt_billplan_d_h
          billplan_h           = lt_billplan_h
          status_d_h           = lt_status_d_h
          status_h             = lt_status_h
          srv_subject_h        = lt_srv_subject_h
          srv_reason_h         = lt_srv_reason_h
          srv_result_h         = lt_srv_result_h
          srv_subject_i        = lt_srv_subject_i
          srv_refobj_h         = lt_srv_refobj_h
          srv_refobj_i         = lt_srv_refobj_i
          orderadm_i           = lt_orderadm_i
          orderadm_i_qt        = lt_orderadm_i_qt
          orgman_i             = lt_orgman_i
          pricingdata_i        = lt_pricingdata_i
          pricing_i            = lt_pricing_i
          product_i            = lt_product_i
          sales_i              = lt_sales_i
          service_i            = lt_service_i
          schedlin_i           = lt_schedlin_i
          schedlin_i_cf        = lt_schedlin_i_cf
          shipping_i           = lt_shipping_i
          partner_i            = lt_partner_i
          item_cstics_i        = lt_item_cstics_i
          customer_i           = lt_customer_i
          billing_i            = lt_billing_i
          cancel_i             = lt_cancel_i
          finprod_i            = lt_finprod_i
          ordprp_i             = lt_ordprp_i
          appointment_i        = lt_appointment_i
          billplan_d_i         = lt_billplan_d_i
          billplan_i           = lt_billplan_i
          status_i             = lt_status_i
          working_set_e_s_bbp  = lt_working_set_e_s_bbp
          language             = lv_language
          service_i_assi       = lt_service_i_assi
        IMPORTING
          document_output_info = es_document_output_info
          job_output_info      = es_job_output_info
          job_output_options   = es_job_output_options
        EXCEPTIONS
          output_canceled      = 1
          parameter_error      = 2
          OTHERS               = 3.
      IF sy-subrc = 0.
        DATA:
          LT_RETURN TYPE BAPIRET2_TAB,
          LT_RECEIVERS TYPE TABLE OF SOMLRECI1,
          LV_MAIL_SUBJECT TYPE  SO_OBJ_DES,
          LV_SEND_PARTNER TYPE BU_PARTNER.
    retrieve the sender and recipient from business objects
    provided by postprocessing framework
        DATA:
          LS_SENDER         TYPE SWC_OBJECT,
          LS_RECIPIENT      TYPE SWC_OBJECT,
          WA_RECEIVER       TYPE SOMLRECI1.
          SWC_CREATE_OBJECT LS_SENDER 'RECIPIENT' SPACE.
          SWC_OBJECT_FROM_PERSISTENT IS_MAIL_SENDER LS_SENDER.
          SWC_GET_PROPERTY LS_SENDER 'AddressString' LV_SEND_PARTNER.
        SWC_CREATE_OBJECT LS_RECIPIENT 'RECIPIENT' SPACE.
        SWC_OBJECT_FROM_PERSISTENT IS_MAIL_RECIPIENT LS_RECIPIENT.
        SWC_GET_PROPERTY LS_RECIPIENT 'AddressString' WA_RECEIVER-RECEIVER.
        SWC_GET_PROPERTY LS_RECIPIENT 'TypeId' WA_RECEIVER-REC_TYPE.
        WA_RECEIVER-COM_TYPE = 'INT'.                           "#EC NOTEXT
        APPEND WA_RECEIVER TO LT_RECEIVERS.
    Set Email Subject
      SELECT SINGLE caption INTO LV_MAIL_SUBJECT
        FROM stxfadmt WHERE
        formname = ip_smart_form AND
        langu    = lv_language.
      IF ls_output_options-tdtitle  IS INITIAL.
        SELECT SINGLE caption INTO LV_MAIL_SUBJECT
         FROM stxfadmt WHERE
         formname = ip_smart_form.
      ENDIF.
      REPLACE '&' WITH ls_orderadm_h-object_id
        INTO LV_MAIL_SUBJECT.
    ===========
        LS_HTML       = ES_JOB_OUTPUT_INFO-XMLOUTPUT-TRFRESULT.
        LT_GRAPHICS[] = ES_JOB_OUTPUT_INFO-XMLOUTPUT-XSFGR[].
        DATA: L_GRAPHIC       TYPE SSF_XSF_GR,
              HTML_DATA       TYPE TRFRESULT,
              GRAPHICS        TYPE TSF_XSF_GR,
              LV_SENT_TO_ALL  TYPE BOOLEAN,
              LV_SEND_ADDRESS TYPE ADR6-SMTP_ADDR,
              LI_SENDER       TYPE REF TO IF_SENDER_BCS,
              RECEIVER TYPE SOMLRECI1,
              LO_BCS          TYPE REF TO CL_BCS,
              LO_DOC_BCS      TYPE REF TO CL_DOCUMENT_BCS,
              LO_MIME_HELPER  TYPE REF TO CL_GBT_MULTIRELATED_SERVICE,
              LO_RECIPIENT    TYPE REF TO IF_RECIPIENT_BCS,
              L_FILENAME      TYPE STRING,
              LT_SOLI         TYPE SOLI_TAB,
              LT_SOLIX        TYPE SOLIX_TAB,
              LS_SOLI         TYPE SOLI,
              LS_SOLIX        TYPE SOLIX,
              L_HTML_RAW      LIKE LINE OF HTML_DATA-CONTENT,
              HTML_XSTR       TYPE XSTRING,
              HTML_STR        TYPE STRING,
              HTML_LEN        TYPE I,
              L_OFFSET        TYPE I,
              L_LENGTH        TYPE I,
              L_DIFF          TYPE I,
              L_CONTENT_ID    TYPE STRING,
              L_CONTENT_TYPE  TYPE W3CONTTYPE,
              L_OBJ_LEN       TYPE SO_OBJ_LEN,
              GR_XSTR         TYPE XSTRING,
              L_GR_RAW        TYPE BAPICONTEN,
              L_USERNAME      TYPE UNAME,
              L_MAIL_ADDRESS  TYPE AD_SMTPADR,
              WA_RETURN       TYPE BAPIRET2,
              LV_SEND_REQ_BCS TYPE REF TO CX_SEND_REQ_BCS,
              LV_ADDRESS_BCS  TYPE REF TO CX_ADDRESS_BCS,
              LV_GBT_MIME     TYPE REF TO CX_GBT_MIME,
              LV_BCOM_MIME    TYPE REF TO CX_BCOM_MIME,
              LV_DOCUMENT_BCS TYPE REF TO CX_DOCUMENT_BCS.
        CLEAR HTML_XSTR.
        LOOP AT LS_HTML-CONTENT INTO L_HTML_RAW.
          CONCATENATE HTML_XSTR L_HTML_RAW INTO HTML_XSTR IN BYTE MODE.
        ENDLOOP.
        HTML_XSTR = HTML_XSTR(LS_HTML-LENGTH).
        CALL FUNCTION 'SCP_TRANSLATE_CHARS'                     "#EC NOTEXT
          EXPORTING  INBUFF       = HTML_XSTR
                     INCODE       = '4110'       " UTF-8 "#EC NOTEXT
                   OUTCODE      = '0000'       " ACTUAL CODEPAGE
                     CSUBST       = 'X'                         "#EC NOTEXT
                     SUBSTC_SPACE = 'X'                         "#EC NOTEXT
          IMPORTING  OUTBUFF      = HTML_STR
                     OUTUSED      = HTML_LEN
          EXCEPTIONS OTHERS       = 1.
    CHANGE ENCODING UTF-8 TO LATIN1
        REPLACE ALL OCCURRENCES OF 'UTF-8' IN HTML_STR WITH 'iso-8859-1'
    IGNORING CASE.                                             "#EC NOTEXT
    *HACK THE HTML CODE GENERATED BY SMARTFORM TO MAKE THE
    *EXTERNAL IMAGES APPEAR AS <IMG> TAG IN HTML
      REPLACE ALL OCCURRENCES OF '&lt;IMG' IN HTML_STR WITH '<IMG' IGNORING
    CASE.                                                       "#EC NOTEXT
        REPLACE ALL OCCURRENCES OF '/&gt;' IN HTML_STR WITH '/>' IGNORING
    CASE.                                                      "#EC NOTEXT
        REPLACE ALL OCCURRENCES OF '&lt;/A&gt;' IN HTML_STR WITH '</A>'
              IGNORING CASE.                                    "#EC NOTEXT
        REPLACE ALL OCCURRENCES OF '&lt;' IN HTML_STR WITH '<'
              IGNORING CASE.                                    "#EC NOTEXT
        REPLACE ALL OCCURRENCES OF '&gt;' IN HTML_STR WITH '>'
              IGNORING CASE.                                    "#EC NOTEXT
        HTML_LEN = STRLEN( HTML_STR ).
        L_OFFSET = 0.
        L_LENGTH = 255.
        WHILE L_OFFSET < HTML_LEN.
          L_DIFF = HTML_LEN - L_OFFSET.
          IF L_DIFF > L_LENGTH.
            LS_SOLI-LINE = HTML_STR+L_OFFSET(L_LENGTH).
          ELSE.
            LS_SOLI-LINE = HTML_STR+L_OFFSET(L_DIFF).
          ENDIF.
          APPEND LS_SOLI TO LT_SOLI.
          ADD L_LENGTH TO L_OFFSET.
        ENDWHILE.
        CREATE OBJECT LO_MIME_HELPER.
        CALL METHOD LO_MIME_HELPER->SET_MAIN_HTML
          EXPORTING
            CONTENT     = LT_SOLI
          FILENAME    = 'SAPWEBFORM.HTM'                      "#EC NOTEXT
            DESCRIPTION =
               'SAP WEB FORM'.                                  "#EC NOTEXT
    *prepare the graphic content from the smartform
        LOOP AT LT_GRAPHICS INTO L_GRAPHIC.
          CLEAR GR_XSTR.
          LOOP AT L_GRAPHIC-CONTENT INTO L_GR_RAW.
            CONCATENATE GR_XSTR L_GR_RAW-LINE INTO GR_XSTR IN BYTE MODE.
          ENDLOOP.
          GR_XSTR = GR_XSTR(L_GRAPHIC-LENGTH).
          L_OFFSET = 0.
          L_LENGTH = 255.
          CLEAR LT_SOLIX[].
          WHILE L_OFFSET < L_GRAPHIC-LENGTH.
            L_DIFF = L_GRAPHIC-LENGTH - L_OFFSET.
            IF L_DIFF > L_LENGTH.
              LS_SOLIX-LINE = GR_XSTR+L_OFFSET(L_LENGTH).
            ELSE.
              LS_SOLIX-LINE = GR_XSTR+L_OFFSET(L_DIFF).
            ENDIF.
            APPEND LS_SOLIX TO LT_SOLIX.
            ADD L_LENGTH TO L_OFFSET.
          ENDWHILE.
          CONCATENATE C_GR_DIR L_GRAPHIC-GRAPHICS
           '.BMP' INTO L_FILENAME.                              "#EC NOTEXT
          CONCATENATE C_GR_DIR L_GRAPHIC-GRAPHICS
           '.BMP' INTO L_CONTENT_ID.                            "#EC NOTEXT
          L_CONTENT_TYPE = L_GRAPHIC-HTTPTYPE.
          L_OBJ_LEN      = L_GRAPHIC-LENGTH.
          CALL METHOD LO_MIME_HELPER->ADD_BINARY_PART
            EXPORTING
              CONTENT      = LT_SOLIX
            FILENAME     = L_FILENAME
              EXTENSION    = 'BMP'                              "#EC NOTEXT
              DESCRIPTION  = 'GRAPHIC IN BMP FORMAT'            "#EC NOTEXT
              CONTENT_TYPE = L_CONTENT_TYPE
              LENGTH       = L_OBJ_LEN
              CONTENT_ID   = L_CONTENT_ID.
        ENDLOOP.
        TRY.
            LO_DOC_BCS = CL_DOCUMENT_BCS=>CREATE_FROM_MULTIRELATED(
                                      I_SUBJECT          = LV_MAIL_SUBJECT
                                      I_MULTIREL_SERVICE = LO_MIME_HELPER ).
          CATCH CX_DOCUMENT_BCS INTO LV_DOCUMENT_BCS.
      ERROR HANDLING
            CLEAR WA_RETURN.
            WA_RETURN-TYPE = 'E'.                               "#EC NOTEXT
            MOVE LV_DOCUMENT_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
            INSERT WA_RETURN INTO TABLE LT_RETURN.
            EXIT.
          CATCH CX_BCOM_MIME INTO LV_BCOM_MIME.
            CLEAR WA_RETURN.
            WA_RETURN-TYPE = 'E'.                               "#EC NOTEXT
            MOVE LV_BCOM_MIME->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
            INSERT WA_RETURN INTO TABLE LT_RETURN.
            EXIT.
          CATCH CX_GBT_MIME INTO LV_GBT_MIME.
            CLEAR WA_RETURN.
            WA_RETURN-TYPE = 'E'.                               "#EC NOTEXT
            MOVE LV_GBT_MIME->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
            INSERT WA_RETURN INTO TABLE LT_RETURN.
            EXIT.
        ENDTRY.
    REUSE THE CONTENT PREPARED FOR ALL RECEIVERS
        LOOP AT LT_RECEIVERS  INTO RECEIVER.
          L_MAIL_ADDRESS = RECEIVER-RECEIVER.
    CREATE SEND_REQUEST
          TRY.
              LO_BCS = CL_BCS=>CREATE_PERSISTENT( ).
              LO_BCS->SET_DOCUMENT( I_DOCUMENT = LO_DOC_BCS ).
            CATCH CX_SEND_REQ_BCS INTO LV_SEND_REQ_BCS.
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'E'.                             "#EC NOTEXT
              MOVE LV_SEND_REQ_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
              EXIT.
          ENDTRY.
    CREATE SENDER
          CLASS CL_CAM_ADDRESS_BCS DEFINITION LOAD.
          TRY.
              IF L_USERNAME NS '@'.                             "#EC NOTEXT
                L_USERNAME = LV_SEND_PARTNER .
                TRANSLATE L_USERNAME TO UPPER CASE. "#EC TRANSLANG
                LI_SENDER ?= CL_SAPUSER_BCS=>CREATE( L_USERNAME ).
              ELSE.
                DATA: L_FROM_MAIL_ADDRESS TYPE AD_SMTPADR.
                L_FROM_MAIL_ADDRESS = L_USERNAME.
                LI_SENDER ?=
                  CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
                    I_ADDRESS_STRING = L_FROM_MAIL_ADDRESS ).
              ENDIF.
              CALL METHOD LO_BCS->SET_SENDER
                EXPORTING
                  I_SENDER = LI_SENDER.
            CATCH CX_ADDRESS_BCS INTO LV_ADDRESS_BCS.
    ERROR HANDLING
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'E'.                             "#EC NOTEXT
              MOVE LV_ADDRESS_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
              EXIT.
            CATCH CX_SEND_REQ_BCS INTO LV_SEND_REQ_BCS.
    FAILED TO ADD A RECIPIENT
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'E'.                             "#EC NOTEXT
              MOVE LV_SEND_REQ_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
              EXIT.
          ENDTRY.
    CREATE RECIPIENT
          TRY.
              LO_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
        I_ADDRESS_STRING = L_MAIL_ADDRESS ).
            CATCH CX_ADDRESS_BCS INTO LV_ADDRESS_BCS.
    ERROR HANDLING
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'W'.                             "#EC NOTEXT
              MOVE LV_ADDRESS_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
              CONTINUE.
          ENDTRY.
          TRY.
              LO_BCS->ADD_RECIPIENT( I_RECIPIENT = LO_RECIPIENT ).
            CATCH CX_SEND_REQ_BCS INTO LV_SEND_REQ_BCS.
    FAILED TO ADD A RECIPIENT
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'W'.                             "#EC NOTEXT
              MOVE LV_SEND_REQ_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
              CONTINUE.
          ENDTRY.
    SEND
          TRY.
    RECEIPTS ONLY FOR ERRORS
              CALL METHOD LO_BCS->SEND_REQUEST->SET_REQUESTED_STATUS
                EXPORTING
                  I_REQUESTED_STATUS =
                     'N'.                                       "#EC NOTEXT
              LV_SENT_TO_ALL = LO_BCS->SEND( ).
            CATCH CX_SEND_REQ_BCS INTO LV_SEND_REQ_BCS.
              CLEAR WA_RETURN.
              WA_RETURN-TYPE = 'E'.                             "#EC NOTEXT
              MOVE LV_SEND_REQ_BCS->GET_LONGTEXT( ) TO WA_RETURN-MESSAGE.
              INSERT WA_RETURN INTO TABLE LT_RETURN.
    ERROR HANDLING
              EXIT.
          ENDTRY.
        ENDLOOP.     "  END LOOP AT LT_RECEIVERS
        COMMIT WORK.
        ES_JOB_OUTPUT_INFO-OUTPUTDONE = 'X'.
    SET THE SUCCESS INFORMATION
        WA_RETURN-TYPE = 'I'.                                   "#EC NOTEXT
        WA_RETURN-MESSAGE = 'MAIL SENT SUCCESSFULLY'.           "#EC NOTEXT
        INSERT WA_RETURN INTO TABLE LT_RETURN.
    SET STATUS PRINTED INTO THE CRM ORDER
        CALL FUNCTION 'CRM_STATUS_SET_INTERN'
          EXPORTING
            IV_OBJNR            = LV_OBJECT_GUID
            IV_STATUS           = GC_STATUS-PRINTED
            XNOAUTO             = TRUE
          EXCEPTIONS
            OBJECT_NOT_FOUND    = 1
            STATUS_INCONSISTENT = 2
            STATUS_NOT_ALLOWED  = 3
            OTHERS              = 4.
      ELSE.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE E016(SPPF_MEDIA) INTO DUMMY.
          WHEN 2.
            MESSAGE E017(SPPF_MEDIA) WITH FUNCTION_NAME INTO DUMMY.
          WHEN 3.
            MESSAGE E018(SPPF_MEDIA) WITH FUNCTION_NAME INTO DUMMY.
        ENDCASE.
        CALL METHOD CL_LOG_PPF=>ADD_MESSAGE
          EXPORTING
            IP_PROBLEMCLASS = '1'
            IP_HANDLE       = IP_APPLICATION_LOG.
      ENDIF.
    GET ERROR TABLE
      CALL FUNCTION 'SSF_READ_ERRORS'
        IMPORTING
          ERRORTAB = ET_ERROR_TAB.
    FILL ERROR INTO CRM_ORDER STATUS
      LOOP AT ET_ERROR_TAB INTO LV_ERROR_TAB_WRK
               WHERE MSGTY = GC_MSGTYPE-ERROR.
        CALL FUNCTION 'CRM_MESSAGE_COLLECT'
             EXPORTING
                  IV_CALLER_NAME     = GC_OBJECT_NAME-ORDER
                  IV_MSGNO           = LV_ERROR_TAB_WRK-MSGNO
                  IV_MSGID           = LV_ERROR_TAB_WRK-MSGID
                  IV_MSGTY           = LV_ERROR_TAB_WRK-MSGTY
                  IV_MSGV1           = LV_ERROR_TAB_WRK-MSGV1
                  IV_MSGV2           = LV_ERROR_TAB_WRK-MSGV2
                  IV_MSGV3           = LV_ERROR_TAB_WRK-MSGV3
                  IV_MSGV4           = LV_ERROR_TAB_WRK-MSGV4
                IV_MSGTYPE         = GC_MSGTYPE-WARNING
                  IV_MSGLEVEL        = GC_MSGLEVEL-ADMINISTRATOR
             EXCEPTIONS
                  NOT_FOUND          = 1
                  APPL_LOG_ERROR     = 2
                  OTHERS             = 3.
      ENDLOOP.
    ENDMETHOD.
    Now put the class and method into the action definition.
    Kind regards,
    Remy Piets

  • Trying to send SmartForm in HTML format - error

    Hello
    I am having some trouble when i try to send a smart form in a html format to some e-mail recipients. I have written an program in ABAP that does the extraction of smartform contents and translates in HTML (+CSS) format, ready to be send. I got the program here
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
    and modified it just a little bit - no major changes.
    I guess the problem is in a service that is not running on the system but i don't know which is that and even where to look for that. I also explained my problem to my BC group but they don't seem to have any ideas .
    I checked the system info (which comp. version we are running):
    Comp. version: CRM 5.0
    Detailed view:
    SAP_ABA         700             0006
    SAP_BASI    700             0006
    PI_BASI     2005_1_700     0006
    ST-PI         2005_1_700     0001
    SAP_BW         700             0006
    SAP_AP         700             0003
    BBPCRM         500             0003
    I have this program properly WORKING on our other system.
    Info:
    Comp. version: BBPCRM 4.0
    Detailed view:
    SAP_BASIS     620     0046
    SAP_ABA             620     0046
    BBPCRM             400     0007
    PI_BASIS     2004_1_620     0009
    ST-PI             2005_1_620     0003
    ST-A/PI             01G_CRM400     0000
    I get the error below. Thanks for all your answers in advance!
    error -
    Service cannot be reached
    What has happened?
    URL http://localhost/SAP/BC/BSP/SAP/SMART_FORMS/DEFAULT.CSS call was terminated because the corresponding service is not available.
    Note
    The termination occurred in system TC1 with error code 403 and for the reason Forbidden.
    The selected virtual host was 0 .
    What can I do?
    Please select a valid URL.
    If you do not yet have a user ID, contact your system administrator.
    ErrorCode:ICF-NF-http-c:005-u:UPUKOLBL-l:5-i:peca_TC1_48-v:0-s:403-r:Forbidden
    HTTP 403 - Forbidden
    Your SAP Internet Communication Framework Team
    .ZETEDNIKSTYLE div#N1.par{ font-family : "Arial" ; font-size : 30pt ; font-weight : bold ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; clear : both ;}.ZETEDNIKSTYLE div#N2.par{ font-family : "Arial" ; font-size : 30pt ; font-weight : bold ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; color : #000000 ; clear : both ;}.ZETEDNIKSTYLE div#P1.par{ font-family : "Arial" ; font-size : 11pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; color : #000000 ; clear : both ;}.ZETEDNIKSTYLE div#P2.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : underline ; text-align : left ; color : #0000FF ; clear : both ;}.ZETEDNIKSTYLE a#FIRST-001.page@media screen {#WINBACKGROUND.win{ overflow : hidden ;}}@media print {#WINBACKGROUND.win{ overflow : hidden ;}}#FIRST-001.page #WINBACKGROUND.win@media screen {#WINBODYTEXT.win{ overflow : auto ;}}@media print {#WINBODYTEXT.win{ overflow : hidden ;}}#FIRST-001.page #WINBODYTEXT.win@media screen {#WINLOGO.win{ overflow : hidden ;}}@media print {#WINLOGO.win{ overflow : hidden ;}}#FIRST-001.page #WINLOGO.win

    I have the same problem even the service in SICF is active. Is it something to do with the default.css url which pointing to localhost? http://localhost/SAP/BC/BSP/SAP/SMART_FORMS/DEFAULT.CSS
    Pls help.

  • EMail report in HTML format in Background

    Hi all,
    We have a report which sends the output in HTML format to the internet email address. We use the function module SO_NEW_DOCUMENT_ATT_SEND_API1 for doing this.
    When we are executing this in foreground the entire output is available in the HTML file, but when we execute this in background only the last page of the spool request is sent in the HTML file. Please help us in what way we can avoid this.
    There are 5 pages in the report. Please advise us what exactly has to be done.
    Thanks in advance.
    Regards,
    Vivek ...
    Message was edited by:
            Vivek Krishnan Kandasamy

    Hi Vivek,
    have a look at this thread ...
    Issue facing background email attachment.
    Regards
    Sudheer

  • Bid emails needed in HTML format

    Hello Experts,
    For SRM project at our client we need to send Bid Invitation, Bid Accept and Bid Reject emails to Vendors. We are using the standard SAP functionality for this process.
    Emails get sent to the bidders properly but these emails are in normal text format. The emails do not display any logos and also the urls are not hot links.
    We could not find any BADI to change the settings to send emails as HTML format and not text and help getting the logos and links displayed properly.
    It is very important to the client to have the company logo displayed in the emails and have url's clickable !
    Any help on this will be greatly appreciated.
    Regards,
    Neeraja

    Hello dickretired,
    You may the article "Lion Mail: Display or hide remote images" goes over how to enable this.
    Note: Though the article title stated that it is for Lion, the process should be aplicable in OS X 10.6
    Some messages may use HTML to include remote images that, when retrieved from the sender’s servers, reveal information about your computer’s address. You can protect your privacy by not loading remote images contained in messages you receive. In addition, when you don’t load remote images, messages display more quickly.
    Choose Mail > Preferences, and then click Viewing.
    Select or deselect the “Display remote images in HTML messages” checkbox to show or hide the images.
    If you have chosen to hide remote images, a banner is displayed across the top of messages that contain remote images, asking whether you want to load them for viewing.
    If Mail detects that a message is junk mail, HTML images aren’t displayed.
    Hope that helps,
    Griff W.

  • Send email with attachment html format.

    Hello experts,
    I have 1 screen with 4 tables , 3  is table control , and 1 is container .
    I want sent e-mail which include this screen in html format.
    How can i do this?
    Thanks for the help.
    Avi.
    Edited by: avi azulay on Oct 13, 2010 10:38 PM

    Hello ,
    It is not help me, i want to know how convert screen with 3 table control and 1 container to html format?
    Thanks for the help,
    Avi.

  • 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

  • Smartforms output in HTML format

    Hi Experts,
    I want to save my smartforms in HTML format.Is there any Standard programe is available for it.
    Like as RSTXPDFT4 for converting output in PDF format.

    Hi,
    Check this link.In that,I am converting the output of smartform to PDF and then attaching it through mail.
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/smartforms/smartform in abap.pdf

  • Desktop.mail  Mailto with HTML formatted email

    I'm trying to make my application send an email with an HTML formatted table in the body. I've got the text to be visible in the email, but it doesn't format according to the tags and the tags are visible. HTML email is turned on in the email client.
    I've been searching all over for a solution. Are there some escape characters I need to use? Has anyone been able to do this or have any ideas?
    String html = "<table>";
            for (int x = 0; x < reportTable.size();x++){
                ReporterObject table = reportTable.get(x);
                html = html+"<tr>" +
                        "<td>"+table.getReportDate()+"</td>" +
                        "<td>"+table.getSchoolName()+"</td>" +
                        "<td>"+table.getTeacherSpoken()+"</td>"+
                        "<td>"+table.getGoal()+"</td>" +
                         "<td>"+table.getAchieved()+"</td>" +
                         "<td>"+table.getPercentAchieved()+"</td>"+
                         "<td>"+table.getApproaches()+"</td>" +
                         "<td>"+table.getAppointments()+"</td>"+
                         "<td>"+table.getGIEA()+"</td>" +
                         "<td>"+table.getReport()+"</td>" +
                         "</tr>";
            html = html + "</table>";
    URI email = new URI("mailto", "mailto:?to=" + emailField.getText() + " &SUBJECT=AL Reports &BODY=" + greeting + html + salutation, null);

    Please see
    http://javaalmanac.com/egs/javax.mail/SendApp.html
    for Quintessential Program to Send E-Mail.
    Then substitute line
    msg.setText(content);
    /with this one
    msg.setContent( content , "text/html");
    it should do in simplest form.

  • Email notifications begin sent in text format rather than html format

    Hi all,
    I have encountered a strange issue wherein i get email notifications in text format with all html code in the email(trying to open wf emails in netscape navigator)...but for all others the emails are begin sent in correct and decent HTML format......is there any prefernce that has to be set up in local mail client for me to receive email notifications in HTML format.
    Thanks in advance
    Aparna

    Open the message and see if there are contents in HTML body.
    If you need the message in HTML format, make sure the correct HTML tags are in place in HTML Body.
    If you do not need the message in HTML format, make sure the HTML Body is empty.

  • Send smartform as html email

    Hello all,
    I've been searching SDN for help with creating an email in html format via smartforms. Pavan Bayyapu's blog was really helpful and I've also used program SF_XSF_DEMO_MAIL as the basis for my program. I followed their examples exactly but my emails always appear as a .MTL attachment, never as just the body of the email.
    I tried removing the file name from lo_mime_helper->set_main_html and from lo_mime_helper->add_binary_part as suggested by some other folks but I haven't had any success.
    Has anyone solved this same issue? Maximum points will be given to helpful suggestions.
    Thank you.
    (This message also posted on the ABAP forum)

    hi
    In print program of smart form use this function module.
    WWW_LIST_TO_HTML     
    Thanks,
    Usha

  • Sending an email in HTML format

    in order to change the mail format from PDF to HTML format, first I create  the smartform with the relevant content , secont I create a new class and implement the method with the code mentioned in the blog "sending HTML Email from SAP CRM/ERP"  and I defined at the action profile in IMG (I didn't
    add nothing but the method mentionedin the blog).
    the appointment is saved and the mail is sent in HTML format . but an error message is send to the user at the crm_ic tranzaction. the error message is BS(001) " no status object is available for &".
    the message is raised from program LCRMBSVAF14 / form status_read.
    if I put break-point at the message line(86)  , the message is shown and the crm_ic tranzaction is stoped
    but if I put break-point a few lines before(line no 33)  and track each step the tranzaction function correct and the crm_ic show  an o.k. message  , I can not find a reason why the tranzaction process with break-point and don't pass with out it.
    thank you .

    rj_oregon wrote:
    If you like email me out-of-band and I can send you a full sample .txt file of "hello world" that takes 3K in plain text, 256KByte in rich-text, most of it injected.
    If it looks anything like the sample here, that's unnecessary:
                             Test_Email_Adblock_enabled.txt          
    If what you see is substantially different, though, I'd be interested in seeing it. (I can't e-mail you, though, as I don't know your e-mail address. You can find mine, though, by looking at the contact link at the bottom of any page on my site, listed in my profile here.)
    This is not a feature in adblock, I view it as a bug.
    I agree, it should not be doing that.
    My suspicion is that AdBlock works by adding this code to every page you view, thus rendering the advertising elements invisible. However, in the case of OWA, it must be inserting that code in a bad place, where it shows up in the message. Mail servers will be prone to rejecting such a message, probably because some of the strings that code uses to identify these ads might look malicious. There's nothing that I can see in that code that's actually malicious, though... just a bunch of CSS conditions that make matching elements invisible.

  • Unable to receive email in HTML format on BB Torch 9860 with BIS

    I recently purchased BB Torch 9860 with OS 7 and configured by personal and work email on BIS. I am receiving emails only in text format. In some emails with images that have hyperlink, I just see a link and images not displayed. All the images comes as an attachment in the email. My friend having another BB Torch is able to view emails as HTML. But he is with BES. 
    Is there any solution for my issue? I am not receiving any options in the email preference to enable HTML format for emails.
    Appreciate if anyone could help me with this.
    Regards,
    Midhun

    Hi Midhun,
    Welcome to the Community
    To help you with the issues you're having, on your Blackberry go to your mailbox, press menu, choose options, then Email Preferences and check the box for Enable HTML Email, Download Images Automatically and Confirm External Image Download. The screen may look like the screenshot below:
    For more information please check these links:
    Blackberry Tips and Tricks
    Blackberry 101
    Enjoy!
    Ron
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter

  • How can I send email from an JSP page  with HTML format either using jsp

    hi,
    I have an jsp page with online application form,after compleating the form if i select submit it will send all the compleated data to the mail id we mentioned in the form tag,for this i am using javascript,but instead of receiving the data in the format of strings,my client want to receive the data in the same format as he's filling in the jsp page(html format) through e-mail.any help would be appreciated.the fallowing is the code right now i am using for email application.
    <code>
    function send()
    if(validatePersonalInfo(document.theform))
         document.theform.submit()
         location.href=location.reload()
    function validatePersonalInfo(form)
         var tmpStr ="";
         if (form.Name.value == "") {
              tmpStr = "Name";
              document.all.dName.style.visibility="visible";
              document.theform.Name.focus();
         else{
              document.all.dName.style.visibility="hidden";
         if (form.SSN.value == "") {
              tmpStr = tmpStr + ", Social Security Number";
         document.all.dSSN.style.visibility="visible";
         if(form.Name.value != "")
              {document.theform.SSN.focus();}
         else{
              document.all.dSSN.style.visibility="hidden";
    if (tmpStr == "") {
              return true;
         } else {
              alert("Please Fill the Following Fields: " + tmpStr);
              return false;
    <FORM NAME="theform" METHOD="post"
    ACTION="mailto:[email protected]?subject=Online Application Form for MinorityDealer." ENCTYPE="text/plain">
    <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="10" NOF="LY">
    <TH>
    <P>
         <FONT SIZE="3" FACE="Arial,Helvetica,Univers,Zurich BT">Online�Application</font></TH><BR>
    </TABLE>
    <table width="718" border="1" cellspacing="0" cellpadding="3" bgcolor="#CCCCFF" align="center">
         <tr>
    <td colspan="2"><font class="captionText">Name*�</font><br><input type="text" size="25" name="Name" class="bodyText">
    <div id="dName" name="dName" style="position:absolute;visibility:hidden"><font color="red">Name is Mandatory*</font></div>
    </td>
              <td colspan="2"><font class="captionText">Social Security Number*�</font><br><input type="text" size="9" name="SSN" class="bodyText">
              <div id="dSSN" name="dSSN" style="position:absolute;visibility:hidden"><font color="red">SSN is Mandatory*</font></div></td>
    </tr>
    <tr>
    <td colspan="2"><font class="captionText">Total Personal Assets</font><br><input type="text" size="10" name="TotPersAss3" class="bodyText"></td>
              <td colspan="2"><font class="captionText">Total Personal Liabilities & NetWorth</font><br><input type="text" size="10" name="TotPerLiab3" class="bodyText"></td>
    </tr>
         </tr>
    </TABLE>
    <IMG Valign="middle" name="imgSubmit" src="images/buttons/Submit.gif" width="66" height="29" border="0" alt="Submit">
    </code>

    Can any one do some help to solve this problem.
    Regards.

Maybe you are looking for

  • Connection from sap crm to sap r/3

    Hi All, how the data flows from crm to r/3.i know that it is through middleware.what is the RFC that is used to transfer the data? Every BP created in crm will flow to r/3 or will there be any conditions or exceptions.please help in understanding thi

  • Add AddressBook to a view

    I have what I thought would be a simple task. I have a sample project that will let a user click a button to pull up the AddressBook user interface within a view. From what I see most of the work is done here: -(IBAction) checkOutBook: (id)sender ABP

  • Wrong payment transaction

    To whom it may concern, Recently I received a money transaction document from my bank(ALPHA) in Greece, which indicate that Skype has charged me two times of 19.80 US$ in 04/12/2014 and in 01/03/2015 without my approvals. Noting these wrong transacti

  • Numbering of Headings

    Numbering. Pages can do numbering of headings like 1, 1.1, 1.2, 1.3, 2, 2.1 etc. just like Word. However, you can't change it to Chapter 1, 1.1, 1.2, Chapter 2, 2.1, 2.2. Which is a real pain! Anyone else feeling my pain? I've resorted to manually wr

  • How does Reference Field work?

    Hi All, I have short of problem knowing how reference field works. I have one field in ABAP query: MBEW-STPRS. The field type is CURR and it have reference field T001-WAERS. In query I made, the currency isn't occurs although I have set it to be disp