Subject of the Email (CHARM/ServiceDesk)

Hi,
from what I have seen, the subject of the mail sent from my smartform is taken from the Description field of the smartform.
Is there a way to do something like a dynamic subject ? Like prio or subject of the message.
Kind Regards
Dirk

full code:
METHOD CRM_SRVORDER_EXEC_SMART_FORM.
*This Method is used to print service order.
* generally used constants of generic order
  INCLUDE: crm_direct.
  DATA:
        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,
* for assignments - begin
        lt_service_i_assi          TYPE   crmt_output_service_i_***_comt
* for assignments - end
  DATA:  lv_devtype TYPE rspoptype.
* 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
* for assignments - begin
            et_output_service_i_assi  = lt_service_i_assi
* for assignments - end
* 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 '&1' WITH ls_orderadm_h-object_id
    INTO ls_output_options-tdtitle.
    REPLACE '&2' WITH ls_activity_h-priority
    INTO ls_output_options-tdtitle.
    REPLACE '&3' WITH ls_orderadm_h-description
    INTO ls_output_options-tdtitle.
*---------- is_mail_appl_obj -------------------------------------------
* fill this parameter if your application object is a BOR object
* the output will be connected with the BOR object via SAP Office
* this is done for mail and fax but not for print outputs
*   ------>
* is_mail_appl_obj-LOGSYS    =
* is_mail_appl_obj-OBJTYPE   =
* is_mail_appl_obj-OBJKEY    =
* is_mail_appl_obj-DESCRIBE  =
*   ------>
*-----------language of smart form--------------------------------------
* determin here the language of the smart form
  control_parameters = is_control_parameters.
  control_parameters-langu = lv_language.
  IF control_parameters-langu <> sy-langu AND control_parameters-preview = 'X'.
*If the language of the smartform stored in control_parameters
*does not match the logon language, get the device type from
*the smartform language. This will allow correct results for
*the print preview of smartforms in different languages / codepages.
    lv_devtype = ls_output_options-tdprinter.
    CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
      EXPORTING
        i_language             = control_parameters-langu
      IMPORTING
        e_devtype              = ls_output_options-tdprinter
      EXCEPTIONS
        no_language            = 1
        language_not_installed = 2
        no_devtype_found       = 3
        system_error           = 4
        OTHERS                 = 5.
    IF sy-subrc <> 0 OR ls_output_options-tdprinter IS INITIAL.
      ls_output_options-tdprinter = lv_devtype.
    ENDIF.
  ENDIF.
*-----------fill archive parameters for archive link -------------------
  IF is_output_options-tdarmod = '2' OR
     is_output_options-tdarmod = '3'.
*   archive_index_tab
    READ TABLE ct_archive_index_tab INTO ls_archive_index INDEX 1.
    ls_archive_index-object_id = ls_orderadm_h-guid.
    IF ls_archive_index-object_id IS INITIAL.
      DELETE ct_archive_index_tab INDEX 1.
    ELSE.
      MODIFY ct_archive_index_tab FROM ls_archive_index INDEX 1.
    ENDIF.
  ENDIF.
  TRY.
*     call function to process smart form (new 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   = 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
                orderadm_i_in        = lt_orderadm_i_in
                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
* for assignments - begin
                service_i_assi      =  lt_service_i_assi
* for assignments - end
           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.
    CATCH cx_sy_dyn_call_parameter_error.
*     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   = 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
* for assignments - begin
                service_i_assi      =  lt_service_i_assi
* for assignments - end
           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.
  ENDTRY.
  IF sy-subrc = 0.
    IF is_control_parameters-preview IS INITIAL.
*     determine header guid to set status printed
      lo_order ?= io_appl_object.
      lv_object_guid = lo_order->get_crm_obj_guid( ).
*     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.
    ENDIF.
  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_ERROR_RELEVANCE = FALSE
        iv_msglevel        = gc_msglevel-administrator
      EXCEPTIONS
        not_found          = 1
        appl_log_error     = 2
        OTHERS             = 3.
  ENDLOOP.
ENDMETHOD.

Similar Messages

  • Please return to the use of Subjects in the email notifications

    This is more of a Plea as opposed to a question.
    Please return to the use of subjects for the email notifications like in the old system.
    I have no way of sorting post. Even sorting by subject doesn work right.

    No response so will mark answered to get rid of it.

  • Email Submit:  Field Contents as the Subject of the Email?

    Hi All,
    I've built a .pdf form using Live Cycle Designer. I want the user to be able to press a button on the form to send the form (as a .pdf attachment) to a predetermined email address and cc.
    In addition, the subject of the email should be a concatenation of a) predetermined text that will remain static, and b) the contents of a field on the form (entitled "Project").
    Lastly, I'd love to have a predetermined message body automatically applied to each such email.
    I'm able to have the user press the button which sends the saved form as a pdf attachment to a predetermined address.
    I'm NOT able, however, to achieve the following:
    a) I don't know how to get it to cc the predetermined email address.
    b) I don't know how to get field contents into the subject of email, nor concantanate the field contents and the static text.
    c) Don't know how to set forth a predetermined message body.
    I don't know anything about javascript or xml.
    Can you help?
    Thanks!
    John

    Hi Chris!
    Thanks much! Now I only need the button to automatically cc a predetermined email address. My fully functioning code is below. What do I need to add? Thanks!
    J
    var concatenation = Picture.rawValue + ' - ' + Artist.rawValue + ' - ' + DealType.rawValue;
    event.target.submitForm({cURL:"mailto:[email protected]?subject=DEAL ORDER: " + concatenation + "&body=Click on send in order to submit your Deal Order Form.\nIf you experience any technical difficulties, please call Neil at x5175.",cSubmitAs:"PDF",cCharset:"utf-8"});

  • In ipad email, I can see the content "subject " of the email in the preview pane but not in the right side of the screen.  its blank...any ideas

    In new IPAD, in email, can see subject data in preview pane but not on right side of screen, its always blank  any ideas

    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Or
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Hi, everyone, how to add subject of the email by which my smartform is sent

    I use the three interface parameters in smartform including mail_recepient_obj, mail_sender_obj, and mail_app_obj, and I use three function modules to import the three objects, does anyone know that which I should give value to to make the subject I want? thank you!

    Hi,
    Check this link. I am explaining the procedure of sending smartform output by mail.
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e

  • I used to have this and now I don't have this anymore: whenever I used to type in subject lines in my emails, it would auto complete the subject of the email based on prior emails sent out. It no longer does this. How can I get this feature back?

    I have tried to find out how to change this in internet settings and by going to the tool menu and can find nothing.

    Make sure that you not run Firefox in permanent [[Private Browsing]] mode.
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Uncheck: [ ] "Permanent Private Browsing mode"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • SM37 Spool list recipient - editing the email's subject

    Hello.
    I am using scheduled job to send automatically a list in email every day, using the option "Spool list recipient". The name of the job appears default in the email's subject. My question is this: Is it possible to modify the subject, for example puting the variable sy-datum in the subject of the email?
    Regards,
    Stefan.

    Hi ,
    Yes we can ,
    I hope u r using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to generate the email . In that  we have the
    i_packing_list-obj_descr = ' Enter what ever u r trying to put as header'.
    Regards,
    Bharani

  • How to enlarge the text in the "email subject/header plane"

    in Thunderbird email, the subject of the email and the email message are in to different planes. No problem enlarging the "message text, words" in the "body" of the email. How to enlarge the "text, font or words" of the "subject" in the subject/header plane? Don't want to open email if I'm not sure of it, and can't be sure of opening emails if I can't SEE the subject of the email. Surely I'm not the only one with this problem.

    Thanks! Works great!

  • Add text field into the 'subject' of a email submit button

    I have a form where the client will enter their name, organisation, query and details of their query into text fields.  I would like the text in the 'query' field to be added to the 'subject' of the email submit button.  This will identify different queries submitted by other clients before opening up the completed pdf form attachment.

    Hi,
    if you use ES3 or ES4 you can use my macro to create email scripts with values from form fields.
    http://thelivecycle.blogspot.de/2012/05/mailto-maker-marco-v1.html

  • BADI to change the email subject

    Hi all,
    Which BADI can be used to change the subject of the email when a SC is created??
    I tried using the BADI "BBP_OFFLINE_APP_BADI" and the implementation "MAIL_DATA_GET" but it is not getting reflected in the mail..
    Am I using the right BADI or is there someother BADI that may be helpful??
    Please help..

    Hi Mary,
    I have a similar issue where in i need to change the subject of the outgoing mail with the refernce / or some id in crm cic.
    can u please guide me the way to move forward with the issue.
    i would be really helpful.
    Thanks,
    Regards,
    akshay ruia.

  • Coldfusion form validation: Changing the "Subject" of an email based on server date/time

    Hi,
    I've provided a basic coldfusion email template for you to
    edit if necessary.
    In my validation I'd like to check the date / time on the
    server.
    If the date entered into the form is within 24 hours of the
    server date / time then insert "Urgent" into the subject of the
    email.
    Along with that I'd like to add a "read reciept to my email"
    if thats possible.
    Any ideas?
    <!--- Form variables here --->
    <cfparam name="FORM.FirstName" default="">
    <cfparam name="FORM.LastName" default="">
    <cfparam name="FORM.Email" default="">
    <cfparam name="FORM.Phone" default="">
    <cfparam name="FORM.Comments" default="">
    <cfparam name="FORM.Action" default="">
    <cfparam name="URL.Msg" default="">
    <cfset VARIABLES.Msg="#URL.Msg#">
    <cfif VARIABLES.Msg is "" and FORM.Action is "Submit">
    <!--- Validation --->
    <cfif Trim(FORM.FirstName) is "">
    <cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
    must enter your first name</li>">
    </cfif>
    <cfif Trim(FORM.LastName) is "">
    <cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
    must enter your last name</li>">
    </cfif>
    <cfif Trim(FORM.Email) is "">
    <cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
    must enter your Email Address</li>">
    </cfif>
    <cfif Trim(FORM.Phone) is "">
    <cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
    must enter your Phone Number</li>">
    </cfif>
    <cfif Trim(FORM.Comments) is "">
    <cfset VARIABLES.Msg=VARIABLES.Msg & "<li>You
    must describe your query</li>">
    </cfif>
    <!--- Process data mailto: --->
    <cfmail to="[email protected]"
    cc="#FORM.Email#"
    from="SENDER"
    subject="SUBJECT" type="html">
    Dear #FirstName# The Following details have been processed:
    #Form.FirstName# #Form.LastName# #Form.Phone# #Form.Email#
    #Form.Comments#
    </cfmail>
    <cfif VARIABLES.Msg is "">
    <!--- Process finished either cf location or URLmessage
    --->
    <cflocation
    url="baseform.cfm?Msg=#URLEncodedFormat('Information validated
    & posted - Thank you!')#" addtoken="No">
    </cfif>
    </cfif>
    <!--- ERROR MESSAGE appears here above form --->
    <cfoutput>
    <cfif VARIABLES.Msg is not "">
    <ul>
    #VARIABLES.Msg#
    </ul>
    </cfif>
    <form action="baseform.cfm" method="POST"
    enctype="multipart/form-data">
    <table cellspacing="2" cellpadding="2" border="0"
    class="form_table">
    <tr>
    <th>* First Name:</th>
    <td><input type="text" class="inputbox"
    name="FirstName" message="" validateat="onServer"
    value="#FORM.FirstName#" size="30"></td>
    </tr>
    <tr>
    <th>* Last Name:</th>
    <td><input type="text" class="inputbox"
    name="LastName" message="" validateat="onServer"
    value="#FORM.LastName#" size="30"></td>
    </tr>
    <tr>
    <th>* Phone:</th>
    <td><input type="text" class="inputbox"
    name="Phone" message="" validateat="onServer" value="#FORM.Phone#"
    size="20"></td>
    </tr>
    <tr>
    <th>* Email:</th>
    <td><input type="text" class="inputbox"
    name="Email" message="" validateat="onServer" value="#FORM.Email#"
    size="30"></td>
    </tr>
    <tr>
    <th>Required Date:</th>
    <td><input type="text" id="SdDays" name="SdDays"
    value="" size="4" maxlength="2" class="inputbox">
    <input type="text" id="SdMonths" name="SdMonths" value=""
    size="4" maxlength="2" class="inputbox">
    <input type="text" id="SdYears" name="SdYears" value=""
    size="6" maxlength="4" class="inputbox">
    </td>
    </tr>
    <tr>
    <th>* Query:</th>
    <td><textarea name="Comments" class="inputbox"
    cols="40" rows="6" validateat="OnServer" message=""
    tooltip="tooltip in here" enabled="yes"
    value="#FORM.Comments#"></textarea></td>
    </tr>
    <tr>
    <td> </td>
    <td><input type="submit" name="Action" id="Submit"
    value="Submit">
    <input type="reset" value="Reset" id="Reset">
    </td>
    </tr>
    </table>
    </form>
    </cfoutput>

    Any progress?

  • Subject line of email question

    In a script the following is saving a file as Email Date then the date then the time.
    Instead of having the "name" Email Date I would like the subject of the email there. What is the command to put the subject line there?
    keystroke "Email Date " & short date string of (current date) & space & time string of (current date)

    I don't know if a script such as the one you wish to get will ever work in Leopard. Many people have already noted that the mail rules don't work properly with AppleScript in Mac OS X 10.5. See for example http://discussions.apple.com/thread.jspa?threadID=1226817.
    So I have written a more complete version of the script first proposed in http://discussions.apple.com/message.jspa?messageID=9451103#9451103. Each time it is launched, the new script will search for all the messages of your "inbox" mail box which have not yet been put into the "Prints" folder on the desktop; it will then open and save them as PDF files into that folder. Moreover, the name given to each PDF file will correspond to the first 20 characters of the subject of the message, followed by the date and time at which the message was received. This script surely still needs to be improved and adapted to your own needs, but it works. Better than nothing…
    property theMostRecentDate : (current date) - 5 * days -- an arbitrary starting point
    tell application "Mail"
    activate
    set theList to messages of mailbox "INBOX" of account 1 whose date received > theMostRecentDate
    repeat with theMessage in theList
    open theMessage
    set theSubject to subject of theMessage
    set theDate to date received of theMessage
    tell application "System Events"
    tell application process "Mail"
    keystroke "p" using command down
    repeat until sheet 1 of window 1 exists
    -- just wait
    end repeat
    click menu button "PDF" of sheet 1 of window 1
    click menu item "Save as PDF…" of menu 1 of menu button "PDF" of sheet 1 of window 1
    delay 1 -- 1 second should be enough
    keystroke "d" using command down
    if value of checkbox 1 of window 1 is 0 then click checkbox 1 of window 1
    click radio button 2 of radio group 1 of group 2 of window 1
    select item 1 of (rows of outline 1 of scroll area 2 of splitter group 1 of group 2 of window 1 whose value of static text 1 is "Prints")
    keystroke "o" using command down
    set L to the length of theSubject
    if L > 20 then set L to 20
    keystroke (text 1 through L of theSubject) & space & short date string of theDate & space & time string of theDate
    keystroke return
    delay 1
    keystroke "w" using command down -- to close the message
    end tell
    end tell
    if theDate > theMostRecentDate then set theMostRecentDate to theDate
    end repeat
    end tell

  • Subject in the mail sent through Batch Job

    Hi,
    We have a batch job which is running daily.
    Consumer wants the output of the batch job (spool request) in mail. We generally send the mail from batch job by filling the mail id in "Title field".. there is some third party involved in managing spool requests..
    But now consumer wants to send the mail with a subject line filled..
    I could not find any field or option in SM36 where i can fill in the subject..
    Please help. Now we are getting the subject as user id + spool request + system number.

    Check the below Code.
    DATA: NUMBYTES TYPE TST01-DSIZE,
            PDFSPOOLID TYPE TSP01-RQIDENT.
      DATA: BEGIN OF PDFDATA OCCURS 0.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF PDFDATA.
      DATA: G1_LINES_TXT  TYPE I.
      DATA  : L_DOCUMENT_DATA    TYPE SODOCCHGI1,
              T_PACKING_LIST     TYPE STANDARD TABLE OF SOPCKLSTI1,
              W_OBJHEAD TYPE SOLI_TAB,
              T_OBJBIN TYPE STANDARD TABLE OF SOLISTI1,
              T_OBJTXT  TYPE STANDARD TABLE OF SOLISTI1,
              LW_PACKING_LIST    TYPE SOPCKLSTI1,
              L_LINES            TYPE I,
              W_RECEIVER        TYPE SOMLRECI1,
              T_RECEIVER         TYPE STANDARD TABLE OF SOMLRECI1.
      DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
      DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
      DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.
      DATA: DOC_CHNG LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    *...Read the Spool request number generated.
      SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
                            FROM TSP01
                            WHERE RQCLIENT = SY-MANDT AND
                            RQOWNER = SY-UNAME.
    *....Convert Spool to PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = G_SPOOL_NUM
          NO_DIALOG                = 'X'
          DST_DEVICE               = G_PDEST
        IMPORTING
          PDF_BYTECOUNT            = NUMBYTES
        TABLES
          PDF                      = PDFDATA
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
    *...Convert 132 char to 255 char
      LOOP AT PDFDATA.
        TRANSLATE PDFDATA USING ' ~'.
        CONCATENATE GD_BUFFER PDFDATA INTO GD_BUFFER.
      ENDLOOP.
      TRANSLATE GD_BUFFER USING '~ '.
      DO.
        IT_MESS_ATT = GD_BUFFER.
        APPEND IT_MESS_ATT.
        SHIFT GD_BUFFER LEFT BY 255 PLACES.
        IF GD_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Creating the document attachment
      LOOP AT IT_MESS_ATT.
        OBJBIN = IT_MESS_ATT.
        APPEND OBJBIN.
        CLEAR: OBJBIN,
               IT_MESS_ATT.
      ENDLOOP.
    Creating the document to be sent
      DOC_CHNG-OBJ_NAME = 'IG Balance'.
    *.....Subject of the email.
      CONCATENATE 'Intragroup Confirmation from AoO: ' P_ZAOO INTO DOC_CHNG-OBJ_DESCR.
    DOC_CHNG-OBJ_DESCR = 'Intragroup Confirmation from AoO '.
    *...Body of the email
      OBJTXT = 'Please find attached a summary and details '.
      APPEND OBJTXT.
      OBJTXT = 'Any queries regarding the attached should be addressed to the contact names on the Report.'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creating the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'RAW'.
      APPEND OBJPACK.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'Balace.PDF'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'PDF'.
      OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
      OBJPACK-OBJ_DESCR = 'Balance Report'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Entering names in the distribution list
      DATA: L_CNT TYPE I.
      LOOP AT T_EMAIL INTO W_EMAIL.
        IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ENDIF.
        APPEND RECLIST.
        CLEAR: RECLIST,
               W_EMAIL.
      ENDLOOP.
      SELECT SINGLE ZAOO
                     ZCONTACT1
                     ZCONTACT2 FROM ZFI_MT_RPTRMAP INTO W_EMAIL
                     WHERE ZAOO EQ P_ZAOO.
      IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ENDIF.
    Sending the document
      IF L_CNT > 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA              = DOC_CHNG
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = 'X'
          TABLES
            PACKING_LIST               = OBJPACK
            OBJECT_HEADER              = OBJHEAD
            CONTENTS_BIN               = OBJBIN
            CONTENTS_TXT               = OBJTXT
            RECEIVERS                  = RECLIST
          EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            OPERATION_NO_AUTHORIZATION = 4
            OTHERS                     = 99.
        CASE SY-SUBRC.
          WHEN 0.
            WRITE 'Email sent successfully'.
          WHEN 1.
            WRITE: / 'no authorization to send to the specified number of recipients!'.
          WHEN 2.
            WRITE: / 'document could not be sent to any of the recipients!'.
          WHEN 4.
            WRITE: / 'no authorization to send !'.
          WHEN OTHERS.
            WRITE: / 'error occurred during sending !'.
        ENDCASE.
      ELSE.
        MESSAGE S000 WITH TEXT-018.
        STOP.
      ENDIF.
    *...Delete Spool Request.
      DATA: SPOOLID TYPE TSP01_SP0R-RQID_CHAR.
      SPOOLID = G_SPOOL_NUM.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID             = SPOOLID
      IMPORTING
        RC                  =
        STATUS              =
        ERROR_MESSAGE       =

  • Variable subject for SmartForms email

    Hi All,
    At my clients SAP system (ECC 5.0), we are using SmartForms for the output of documents.
    In this case I am talking about invoices.
    Customzing is setup to use standard SAP program RLB_INVOICE and an invoice smartform which is copy of SAP invoice, but then adjusted for my clients needs. This works perfect for quite some time now.
    Since recently email was setup so these invoices can be mailed directly to the customers, but we face the problem that when invoices are sent via email, the subject is always the same.
    This makes sence because it is set in the output type (mail title and texts), But we would like to make this a variable text, e.g. Invoice_1234567890 (where 1234567890 is the SAP invoice number)
    Has anyone experience in doing this?
    - Is there a way to insert a variable in the subject of the email?
    - Which veriables can be chosen?
    - Is there a user-exit to overrule the Standard SAP behaviour (I could not find it)
    Of couse a Z program can be created to convert the OTF to PDF and sent your own created email, but I would really like to keep using the standard SAP program.
    Thanks very much.
    Kind regards,
    Dave Verkoelen

    I think OUTPUT_OPTIONS-TDCOVTITLE generate a subject in the Email.
    I have tried to update that field using field symbols in the Smartform but, I was not successful.
    * Modifying in Smartform Main program
    field-symbols: <fs> type SSFCOMPOP.
    assign ('(SAPLSTXBC)SSFPO') to <fs>.
    <fs>-TDCOVTITLE = 'test Title from Smartform'.
    * Modifying in FM's parameter
    field-symbols: <fs1> type SSFCOMPOP.
    assign ('(/1BCDWB/SAPLSF00000166)OUTPUT_OPTIONS') to <fs1>.
    <fs1>-TDCOVTITLE = 'test Title from Smartform'.
    So, I think you need to copy the RLB_INVOICE to Z and than change the title.
    Regards,
    Naimesh Patel

  • Text field as email subject line or email body

    I have a form with a text field. I would like to have the contents of the text field in either the subject of the email or referenced in the body of the email. I am using a submit button for the email.

    You might want to look at the event.target.mailDoc method which only works with Acrobat and attached the PDF to the email.
    var myDoc = event.target;
    var rEmail = TextField1.rawValue;
    myDoc.mailDoc(
    false,
    rEmail, "", "",
    "Subject goes here",
    "Body goes here."

Maybe you are looking for

  • How Can i set up a folder to file similar apps in?

    I want to categorise my apps into folders Is there a way to do this?

  • Windows 7 64bit and iTunes

    Trying to burn an album that I bought through iTunes store to cd so I can play it in my car. On one drive, it attempts to burn the CD, but it fails. On the other drive, nothing happens at all. It says checking media, and then goes back to just a norm

  • JFileChooser : save as default file

    I have a JFileChooser which the user uses to pick an excel file that will be imported and displayed in a JTable. I'm looking for a way for the program to save the user's choice as the default, so that every time the application closes and is reopened

  • Macbook Pro TV Tuner & Battery Management

    Just wondering (and waiting for my MBP to arrive) if anyone knows a TV Tuner that is Universal for the MBP...I've been looking at the Miglia TVMini but I'm not sure if the software is Universal. Does anyone have this on their MBP? What's it like? How

  • TS3988 Can I move everything in one iCloud to another?

    My children's devices have been the only ones using an iCloud linked to my email.  I just got an iPhone 5 and I would like them to move their data to a cloud associated with their own emails.  Is it possible to move the information in an iCloud assoc