Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This user exit can be used to start additional checks if someone changes the owner of a transport request in SE10. Never used until now …

Location for activation

Status
colourYellow
titleDevelopment system

Template function Module

/RTC/TM_TMPL_ BADI_CHNG_OWNER

Interface

Import Parameters

Internal Table LT_TRKORR

Field

Description

TRKORR

Transport Request

TRFUNCTION

Type of the Transport Request (e.g. ‘K’=Workbench, ‘W’=Customizing, ‘T’=Transport of Copies)

OLD_OWNER

Current User

NEW_OWNER

New User

 

Export Parameters

Parameter

Type

Shorttext

LV_RETCODE

SY-SUBRC

0: User change can be executed
> 0: User change will not be executed

LV_MSGTEXT

/rtc/tm_param-value

Message, that should appear in case of sending return code > 0.

 

Example

Transport requests containing roles may only be owned by 3 specific users. If some tries to assign ownership to another user => do not accept the user change

Step 1

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

 

Add the following code to the section “Begin of customer implementation”:

Code Block
languageabap
FIELD-SYMBOLS: <lw_trkorr>.

IF NOT lt_trkorr[] IS INITIAL.
SELECT object FROM e071 INTO lv_object
     FOR ALL ENTRIES IN lt_trkorr
	WHERE 	trkorr = lt_trkorr-trkorr AND
			object = ‘ACGR’.
	EXIT.
ENDSELECT.
ENDIF.

IF NOT lv_object  IS INITIAL.
	* Check LT_TRKORR-NEW_USER against allowed owners for role transports	* Please not: lt_trkorr is an internal table. Nevertheless it always contains only 	* 1 request
	* If there is no match
		Lv_retcode = 8.
		Lv_message = ‘User is not allowed ….’.
ENDIF.	
			…..

On this page

Table of Contents
minLevel1
maxLevel3
include
outlinetrue
indent
stylenone
excludeOn this page
typelist
class
printablefalse