cancel
Showing results for 
Search instead for 
Did you mean: 

ITSM mail body is empty

helmut_schrder
Participant
0 Kudos
200

Hello,

we activate ITSM in SAP Solution Manager 7.1 SPS10. We send an email to reporter at status change via an attached smart form. Everything is ok. But the body of the mail is empty. Does anybody have an idea how we can fill the mail body?

Regards,

Helmut

Accepted Solutions (0)

Answers (4)

Answers (4)

tanmeya_mohan
Advisor
Advisor
0 Kudos

Hi Helmut,

Check below link for details -

Best Regards,

Tanmeya

Former Member
0 Kudos


Dear Helmut,

As per my knowledge, Its not possible to add body in mail when you are using mentioned smart form and class.

But you can do this by method call action.


Please refere below sample code to send mail in HTML format.

       lv_send_request        TYPE REF TO cl_bcs,
       lv_document            TYPE REF TO cl_document_bcs,
       lt_sender              TYPE REF TO cl_sapuser_bcs,

*-- Create persistent send request

              lv_send_request = cl_bcs=>create_persistent( ).

              lv_sub = lv_subj.

*-- Create Document

              lv_document = cl_document_bcs=>create_document(
              i_type       = cv_htm
              i_text       = lt_contents1
              i_length     = lv_doc_len
              i_subject    = lv_sub
              i_language   = sy-langu
              i_importance = '5' ).

              CALL METHOD lv_document->add_attachment

                EXPORTING
                  i_attachment_type    = 'jpg'
                  i_attachment_subject = 'logo'
*                i_attachment_size    = lv_img1_size
                  i_att_content_hex    = lt_hex1.

              TRY.

*-- Set the Message Subject

                  CALL METHOD lv_send_request->set_message_subject

                    EXPORTING
                      ip_subject = lv_subj.
                CATCH cx_sy_dyn_call_illegal_method.    "#EC NO_HANDLER
              ENDTRY.



*-- Add document to send request

              CALL METHOD lv_send_request->set_document( lv_document ).



*-- Do send delivery info for successful mails

              CALL METHOD lv_send_request->set_status_attributes
                EXPORTING
                  i_requested_status = 'E'
                  i_status_mail      = 'A'.



*-- Set sender

              lt_sender = cl_sapuser_bcs=>create( sy-uname ).
              CALL METHOD lv_send_request->set_sender
                EXPORTING
                  i_sender = lt_sender.



**-- Add the recipients to the Send mail

              CLEAR : lv_rcv_email,lv_partner.

              REFRESH : lt_bapiadsmtp,lt_return.


              IF lv_recipient1 IS NOT INITIAL.
                lv_partner = lv_recipient1.



                CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
                  EXPORTING
                    businesspartner = lv_partner
                  TABLES
                    bapiadsmtp      = lt_bapiadsmtp
                    return          = lt_return.

                READ TABLE lt_bapiadsmtp INTO ls_bapiadsmtp INDEX 1.

                IF sy-subrc EQ 0.
                  lv_rcv_email = ls_bapiadsmtp-e_mail.
                ENDIF.
              ENDIF.


              CHECK NOT lv_rcv_email IS INITIAL.
              lt_recipient = cl_cam_address_bcs=>create_internet_address(
              lv_rcv_email ).

              CALL METHOD lv_send_request->add_recipient
                EXPORTING
                  i_recipient = lt_recipient
                  i_express   = abap_true.


              lv_send_request->set_send_immediately( 'X' ).

*-- Send Email
              CALL METHOD lv_send_request->send(
                EXPORTING
                  i_with_error_screen = abap_true
                RECEIVING                  result              = lv_result ).

Thanks,

Vikas

Former Member
0 Kudos

Dear Hekmut,

Please check layout of your smart form and pass the proper values in page:

I used below smart form :

AI_CRM_IM_SHORT_TEXT_LINK_FORM.

Thanks,

Vikas.

helmut_schrder
Participant
0 Kudos

Hello Vikas,

thanks for your help.

The email is created with a subject, an attached smart form (PDF) and a empty body. The content of attached smart form (AI_CRM_IM_SHORT_TEXT_LINK_FORM) and the mail subject are correct. The mail body is empty. Now we want to save additional informations in the body (parralel to attached smart form).

Regards,

Helmut

VJain
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Helmut,

 

Please check below Blog and KBA:

Incident Management and Change Request Management: E-Mail functionality in SAP Solution Manager 7.1

http://scn.sap.com/docs/DOC-35291

1831361 - Solution Manager - Changing status in CRM_UI gives BSP error

Exception Class - CX_SY_DYN_CALL_PARAM_MISSING

Thanks

Vikram

helmut_schrder
Participant
0 Kudos

Hello Vikram,

thanks for your help.

We know the documents, but we can not find any solutions.

Regards,

Helmut