/
BEFORE_ADD2_WF

BEFORE_ADD2_WF

This user exit can be used to integrate individual checks before a request is inserted into the TM Workflow Monitor. In addition this exit is often used to force users to provide mandatory attributes before they insert a request manually into TM. By default customers force the users to provide that data before the export of a request by using exit BADI_CHECK_BEFORE_RELEASE. As this exit does not help for manually iserted requests, it needs the BEFORE_ADD2_WF here …

Location for activation

TM Server

Template function Module

/RTC/TM_TMPL_ADD_TO_WORKFLOW

Interface

Import Parameters

Internal table LT_TRKORR

Field

Description

Field

Description

TRKORR

Transport Request

OWNER

Request Owner

PJ_NAME

Project that is assigned to the Transport Request

DESTI_NAME

Destination that is assigned to the Transport Request

LEVEL_NAME

Name of the initial transport level after insertion

STATUS

Initial status after insertion

EXP_DATE

Reference date assigned to the Transport Request (usually the export date)

EXP_TIME

Reference time assigned to the Transport Request (usually the export time)

EXP_DATE_ORG

Export date of the Transport Request

EXP_TIME_ORG

Export time of the Transport Request

DEP_EXIST

“X” = The Request has collisions with other Requests

RELATION

“X” = The Request has dependencies to other Requests

CRIT_OBJ

“W” = Request contains critical objects/aspects of severity “Warning”

“E” = Request contains critical objects/aspects of severity “Error”

S_CLIENT

Source client of the Transport Request

SHORTTEXT

Short text of the Transport Request

 

 

Export Parameters

Parameter

Type

Shorttext

Parameter

Type

Shorttext

LV_RETCODE

SY-SUBRC

0: Request will be inserted
>0: Request will not be inserted

LV_MSGTEXT

/rtc/tm_param-value

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

 

Example

Requests of a specific 3rd party provider may only be inserted, if there is no other request of that provider still waiting to be imported into at least 1 system (To keep things easy, we only check wether there are requests of that provider in the workflow monitor)…

Step 1

Copy the function module /RTC/TM_TMPL_ADD_TO_WORKFLOW
to a new function module

 Add the following code:

FIELD-SYMBOLS: <lw_trkorr>. DATA: lt_req TYPE TABLE OF /RTC/TM_REQ. * lt_trkorr can only contain 1 record here LOOP AT lt_trkorr ASSIGNING <lw_trkorr>. IF <lw_trkorr>-trkorr(3) = ‘EXT’. “SID of the third party dev system SELECT * FROM /RTC/TM_REQ INTO TABLE lt_req WHERE trkorr LIKE ‘EXT%’. IF sy-subrc = 0. Lv_retcode = 8. Lv_msgtext = ‘Sorry, at least 1 request is still waiting for import”. ENDIF. ENDIF. ENDLOOP.

Related content

Available BAdI Definitions
Available BAdI Definitions
Read with this
TM_ATTRIB_VALUES
TM_ATTRIB_VALUES
Read with this
Available User Exit Definitions
Available User Exit Definitions
Read with this
How to activate the SmartChange OData services
How to activate the SmartChange OData services
Read with this
SAP System Prerequisites
SAP System Prerequisites
Read with this