BEFORE_IMPORT

In opposite to the user exit BEFORE_EACH_IMPORT, this one is only active once before the import queue is started. It can also be used to prevent the import queue from starting based on user defined pre-conditions.

Location for activation

Target System

Template function Module

/RTC/TM_TMPL_BEFORE_IMP

Interface

Import Parameters

Internal table LT_SCPT

Field

Description

Field

Description

TRKORR

Transport Request

R3_SID

SID of the target system

CLIENT

Target client

LEVEL_NAME

Level of the target system (might be empty for imports, started with personal queues)…

Additional Import Parameters

Parameter

Type

Shorttext

Parameter

Type

Shorttext

LV_TTYPE

CHAR 1

Used import process
S: System Queue

P: Personal Queue

Export Parameters

Parameter

Type

Shorttext

Parameter

Type

Shorttext

LV_STOP_IMPORTS

CHAR1

X: The current import queue will be stopped
‘’: The current import queue will continue

LV_LOCK_QUEUE

CHAR1

X: The current system queue will be locked

‘’: The current system queue will not be locked

 

Example

The QA system imports should be scheduled on a 10 minutes base. As there is a time window for system maintenance between 8 PM and 10 PM, there should no import be executed within that time window. As scheduling this scenario with TransportManager is a pain, customers can schedule the appropriate job in TM on a 10 minutes base without exceptions. The implementation of this user exit will then take care that all jobs scheduled within the time window will immediately stop without starting any import.

Step 1

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

 

Add the following code:

IF sy-utime > ‘200000’ and sy-utime lt ‘220000’. Lv_stop_imports = ‘X’. Lv_lock_queue = ‘X’. ENDIF.