SAP CRM: Use CRM mailingforms / mailform to send confirmation mail

SAP CRM: Use CRM mailingforms / mailform to send confirmation mail

  1. Define CRM mailingform(s)
  2. Define attribute context for adding dynamic fields
  3. Define action profile on header or item level (depends on business requirement / process design *
  4. Define Badi implementation for composing and sending of mail form **-

    * Usage of parameters in action definition which are used in execution of method:

    • PARTNER_FUNCTION / ABAP dictionary: CRMT_PARTNER_FCT,
    • PARTNER_REF_KIND / ABAP dictionary: COMT_OBJECT_KIND
    • MAIL_ID / ABAP dictionary: CRMT_PML_ID
    • REPLY_TO / ABAP dictionary: CRMT_IM_E_ID
    • FROM / ABAP dictionary: CRMT_IM_E_ID
    • SENSITIVITY / ABAP dictionary: SO_OBJ_SNS
    • SEND_IMMEDIATELY / ABAP dictionary: XFELD (selection box)

**  IF_EX_EXEC_METHODCALL_PPF~EXECUTE

METHOD if_ex_exec_methodcall_ppf~execute.

“Set return status to error as a default.
rp_status = sppf_status_error.

IF me->initialize(
io_appl_object = io_appl_object
io_partner = io_partner
ip_application_log = ip_application_log
ip_preview = ip_preview
ii_container = ii_container ) EQ abap_false.
RETURN.
ENDIF.

IF me->chk_parameters( ) EQ abap_false. RETURN. ENDIF.
IF me->chk_variables( ) EQ abap_false. RETURN. ENDIF.
IF me->mail_form_read( ) EQ abap_false. RETURN. ENDIF.
IF me->mail_form_comp( ) EQ abap_false. RETURN. ENDIF.
IF me->mail_form_send( ) EQ abap_false. RETURN. ENDIF.

“Set return status – Successfully processed.
rp_status = sppf_status_processed.

ENDMETHOD.

——————————————

Remco Jansen is working as a SAP CRM professional for various clients in the Netherlands.