MAKE APPROVAL
This user exit can be used to apply own checks to the approval process. In opposite to the exit BEFORE_APP_REV, implementations of this exit are executed once per request. Thus you do not have access to the information, what other requests are subject of the current approval…. If the TM user is going approve multiple requests, none of them will be approved if at least one fails the checks.
Location for activation
TM Server
Template function Module
/RTC/TM_TMPL_MAKE_APPROVAL
Interface
Import Parameters
Internal table LT_TRKORR
(contains only 1 record)
Field | Description |
---|---|
TRKORR | Transport Request |
OWNER | Owner of the Transport Request |
PJ_NAME | Project the request is assigned to |
DESTI_NAME | Destination the request is assigned to |
LEVEL_NAME | Current Transport Level of the request |
SIGN_POS | Position of the approval that is requested ‘1’: Technical approval ‘2’: Content approval ‘3’: 2nd content approval |
USRGROUP | User Group whose approval is requested |
Export Parameters
Parameter | Type | Shorttext |
---|---|---|
LV_RETCODE | SY-SUBRC | 0: Approval will be granted |
LV_MSGTEXT | /rtc/tm_param-value | Message, that should appear in case of sending return code > 0. |
Example
Only the user specified in the attribute TESTER is allowed to grant content approval.
Step 1 | Copy the function module /RTC/TM_TMPL_MAKE_APPROVAL to a new function module |
Add the following code to the section “Begin of customer implementation”:
SELECT SINGLE value FROM /rtc/tm_attrib03 into lv_value
WHERE trkorr = lt_trkorr-trkorr AND
Attr_name = ‘TESTER’.
IF lv_value NE space.
IF lv_value NE sy-uname.
Lv_retcode = 8.
CONCATENATE ‘Sorry. Only’ lv_value ‘may approve here…’
INTO lv_msgtext SEPARATED BY SPACE.
ENDIF.
ELSE.
Lv_retcode = 8.
Lv_msgtext = ‘Sorry, no tester specified yet…’.
ENDIF.