APPROVAL_MAIL

This user exit can be used to modify the content and/or the subject of the workflow notification mails.

Location for activation

TM Server

Template function Module

/RTC/TM_TMPL_APPROVE_MAIL

Interface

Import Parameters

Internal table TT_IMPORT_PARAMS

This table contains name/value pairs with the required information… 

NAME

VALUE

NAME

VALUE

ACTION

APPROVE: Request was approved

REVOKE: Request’s approval was revoked

SYSTEM

System that has initiated the mail

TRKORR

Transport Request

OWNER

Author of the Transport Request

PJ_NAME

Project that is assigned to the Transport Request

DESTI_NAME

Destination that is assigned to the Transport Request

LEVEL_NAME

Current transport level of the Request

SHORTTEXT

Short text of the Transport Request

SIGN_POS

Position of the approval that is granted/revoked

‘1’: Technical approval

‘2’: Content approval

‘3’: 2nd content approval

SUBJECT

Subject of the mail

CONTENT

Content of the mail (there can be multiple records with NAME=CONTENT)

 

 

Export Parameters

Internal table TT_EXPORT_PARAMS

You can set name/value pairs for that table to control the further notification flow…

NAME

VALUE

NAME

VALUE

MODIFY_CONTENT

‘REPLACE’: The original content of the mail will be replaced by the text provided by TT_EXPORT_PARAMS records with NAME=CONTENT

‘SUPPLEMENT’: The original content of the mail will be extended by the text provided by records with NAME=CONTENT

CONTENT

<Any text>: Depending on the value for MODIFY_CONTENT this text will replace the original content or it will be added to the original content

(There can be multiple records with NAME=CONTENT)

MODIFY_SUBJECT

‘X’: Subject will be replaced with the text provided by TT_EXPORT_PARAMS record with NAME=SUBJECT

SUBJECT

<Any text>: If MODIFY_SUBJECT is set to ‘X’, the subject will be replaced by this value.

 

Example

The customer wants to add a disclaimer to each workflow notification mail

Step 1

Copy the function module /RTC/TM_TMPL_ APPROVE_MAIL to a new function module

 Add the following code

Tt_export_params-name = ‘MODIFY_CONTENT’. Tt_export_params-value = ‘SUPPLEMENT’. append tt_export. Tt_export_params-name = ‘CONTENT’. Tt_export_params-value = <disclaimer_text1>. append tt_export. Tt_export_params-value = <disclaimer_text2>. append tt_export.