"----------------------------------------------------- Data Declaration
DATA:
lr_transports TYPE RANGE OF e070-trkorr,
lv_answer TYPE char1,
lf_perform_check TYPE xfeld.
CONSTANTS:
co_none TYPE rfcdes-rfcdest VALUE 'NONE',
co_production TYPE rfcdes-rfcdest VALUE 'RFC_FOR_PROD'.
"--------------------------------------------------------- Logical Code
CLEAR: lf_perform_check.
"---- Get parameter to check if TR check should be executed.
"---- This is done to control which users should be able to use this
"---- feature. Also helpful to switch off for certain transports where
"---- note or too many objects are being sent. Timeout can occur.
GET PARAMETER ID 'CHECK_TR' FIELD lf_perform_check.
IF lf_perform_check IS NOT INITIAL.
"----- Get main request
SELECT SINGLE strkorr
FROM e070
INTO @DATA(lv_main_transport)
WHERE trkorr EQ @request.
IF sy-subrc IS NOT INITIAL.
"--- No Main TR ???
"--- Impossible..
RAISE cancel.
ENDIF.
CLEAR: lr_transports[].
"---- Collect TR in range
APPEND VALUE #( sign = 'I' option = 'EQ' low = lv_main_transport )
TO lr_transports.
"--- Note: We have excluded/included certain options.
"--- This is done for our requirement, you can select
"--- any of the below based on your requirement.
"--- Call report to check transport request
SUBMIT /sdf/cmo_tr_check
WITH p_source = co_none "-- Source System
WITH p_target = co_production "-- Target System
WITH r_prj_co = abap_true "-- Check TR
WITH p_ori_tr IN lr_transports "-- Give TR number
WITH p_crsref = abap_true "-- Cross reference
"-- WITH p_dgp = abap_true "-- Sequence Check
WITH p_swcomp = abap_true "-- Cross release
"-- WITH p_imptim = abap_true "-- Import Time in source
"-- WITH p_oichck = abap_true "-- Online import check
AND RETURN.
CLEAR: lv_answer.
"---- Confirm from User if he wishes to release TR
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = TEXT-a01 "-- Release Transport Request
text_question = TEXT-a02 "-- Continue to release TR ?
display_cancel_button = abap_true
IMPORTING
answer = lv_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR: lv_answer.
ENDIF.
IF lv_answer EQ '1'.
"--- Release transport request
ELSE.
"--- Cancel release of TR
RAISE cancel.
ENDIF.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |