BEFORE_EACH_IMPORT
This user exit can be used to check some pre-conditions before starting the import of a request. Based on the result, the import queue can be stopped and locked.
Location for activation
Target System
Template function Module
/RTC/TM_TMPL_BEFORE_EACH_IMP
Interface
Import Parameters
Work area LW_TRKORR
Field | Description |
---|---|
TRKORR | Transport Request |
R3_SID | SID of the target system |
R3_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 |
---|---|---|
LV_TTYPE | CHAR 1 | Used import process P: Personal Queue |
Export Parameters
Parameter | Type | Shorttext |
---|---|---|
LV_STOP_IMPORTS | CHAR1 | X: The current import queue will be stopped |
LV_LOCK_QUEUE | CHAR1 | X: The current system queue will be locked ‘’: The current system queue will not be locked |
Example
The company has scheduled a very important job each night at 3 AM.
For certain reasons transports can only start at 2 AM. If the imports take longer then 2:55 AM, the imports must be stopped in order not to disturb the job start.
Step 1 | Copy the function module /RTC/TM_TMPL_ BEFORE_EACH_IMP to a new function module |
Add the following code:
IF sy-utime > ‘025500’ and sy-utime lt ‘020000’.
Lv_stop_imports = ‘X’.
Lv_lock_queue = ‘X’.
ENDIF.