Technical Articles
Transport alignment after system refresh
Some times you would need to refresh your Test or Development system from Production one.
In this Article I will review transport related activities, which you have to perform after the system refresh. I will review Solution Manager and ChaRM specific steps, but also would cover scenarios without this tools.
Please, be extremely careful when you refresh your Development system. Because in this scenario you also would need to close all open cycles (if you use ChaRM) with this DEV system before system refresh.
Pre activities
PRD to DEV copy
In This case please review note 2259615 – “ChaRM: Correct Procedure of System refresh or copy regarding DEV system in Charm Project” first, and follow the steps described there.
Before system copy:
- Set all request for changes and change documents (belonging to the Cycles in which you have DEV system as Development one) in to Final status.
- Close all related cycles.
- Check table E070L in DEV system -> Record field PROJECT and TRKORR.
If you have not followed this steps, and at the end broke your cycles, then check out my next post, on how to restore Charm Cycles after DEV system refresh.
PRD to QAS copy
Usually after QAS system refresh you would like to import transport requests (which was imported to QAS before and not yet imported to the reference system – PRD) once again. So before system refresh you would need to store this delta. There are several ways how to get it.
Manual delta calculation
If you want to calculate delta of transport requests manually, you need to login to QAS and PRD systems, and just save content of E070 Table (which would contain data about all imported tr`s). Difference between PRD and QAS system, of DEVK* transports, would be our delta.
Delta calculation with ST-OST add-on for Solution Manager
Before using this scenario you need to perform initial configuration of it, according to ST-OST configuration guide.
After you would finish the configuration, you would have a new task list variant for one of your your Cycles. So you would need to create a new Cycle (you don`t need to use it for anything else except System Refresh) with refreshing systems inside. And then select your new task list variant for this Cycle:
Then inside this task list you would need to run the task “Refresh test system” for your QAS system:
and specify that this would be a delta calculation run
from the desired PRD system:
After your ran, you can find delta in the following tables of Solution Manager:
- /SALM/DELTA_C
- /SALM/DELTA_H
Check calculated delta
If you have calculated Delta with Solution Manager, you can compere your manual delta with automatic one.
Since solution managers delta calculated based on the ChaRM history, stored in the /tmwflow/track_n table, and not based on e070 tables in the managed systems, you can have differences between your deltas. I.e. check if you have transports which are not in the import buffer of the PRD system any more (was manually removed form the import buffer). If you have differences, it has to be manually adjusted after the import queen alignment.
ChaRM specific
If you also use ChaRM please consider following additional steps to be performed in Solution Manager.
LMDB system Deactivation
In SAP Solution Manager t-code LMDB, select tab page “Technical Systems” and insert the QAS SID on the the tab “Extended System ID” :
Deactivate the system status:
Optional: to follow in case you want to use ChaRM Cycles during the refresh
Remove the system (that is going to be refreshed) from the transport routes in transaction STMS of your Domain controller. For example, removing LOL 130 in TMS:
In related solution manager cycle choose More->Redefine Landscape option (to remove QAS from the landscape):
Solution manager will automatically update the task list structure and the contents of the Landscape assignment block:
Post activities
PRD to DEV copy
- Clear table CTSPROJECT at database level.
- Reset NumberRange of CTS Project ID and Transport request ID: Refer to Note 1674286 to change the value of field PROJECT and TRKORR in table E070L to the recorded value in Step1 of Pre activities.
- Change the DEV system ID in Charm Project if needed -> Create new cycle and task list.
PRD to QAS copy
Save current buffer of the QAS and next system in TMS (VAL)
Saving of the the import buffers for the systems is necessary, to perform checks. In example to check that after QAS import no new transports was added to the import buffer of VAL system.
To do this just login to the managed system, run transaction STMS, refresh the import buffer of the system, and save it to Excel.
Add Delta to the import buffer Manually
Add calculated tr`s to the import buffer of the refreshed system with one of the following methods:
One by one:
Run transaction STMS in QAS system. Select import buffer of the system, and add transport requests:
Mass redirect from VAL system:
Run transaction STMS in VAL system. Select import buffer of VAL, and transport requests which need to be added (with F9 key). Then run Request > Forward > System (Ctrl + F12):
If you would use this option please double check, that after QAS import no transport requests was added to the import buffer of VAL system, once again!
Using Z Report:
You can develop your own Z Report to massively add tr`s to the import buffer of the managed system. I.e. Following report can be ran on QAS or on Domain controller:
*&---------------------------------------------------------------------*
*& Report ZTRANSPORT_ADD
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZTRANSPORT_ADD.
TYPE-POOLS slis.
TYPES: BEGIN OF ty_log,
trkorr TYPE e070c-trkorr,
message TYPE char100,
END OF ty_log.
TABLES: tmsbuffer.
TABLES: tmscsys.
PARAMETERS: p_syst LIKE tmscsys-sysnam OBLIGATORY DEFAULT sy-SYSID,
p_sc TYPE mandt OBLIGATORY DEFAULT sy-MANDT.
SELECT-OPTIONS: s_req FOR tmsbuffer-trkorr OBLIGATORY DEFAULT sy-SYSID.
DATA: g_trkorr TYPE tmsbuffer-trkorr,
ls_log TYPE ty_log,
lt_log TYPE STANDARD TABLE OF ty_log,
lt_fcat TYPE slis_t_fieldcat_alv,
ls_fcat TYPE slis_fieldcat_alv.
at SELECTION-SCREEN on s_req.
START-OF-SELECTION.
*--------------------------------------------------------------------*
LOOP AT s_req WHERE sign = 'I' AND option = 'EQ'.
g_trkorr = s_req-low.
CALL FUNCTION 'TMS_MGR_FORWARD_TR_REQUEST'
EXPORTING
iv_request = g_trkorr
iv_target = p_syst
IV_TARCLI = p_sc
iv_import_again = 'X'
EXCEPTIONS
read_config_failed = 1
table_of_requests_is_empty = 2
OTHERS = 3.
ls_log-trkorr = g_trkorr.
ls_log-message = 'Was processed'.
IF sy-subrc <> 0.
ls_log-message = 'Has error'.
ENDIF.
APPEND ls_log TO lt_log.
ENDLOOP.
* Display log
IF NOT lt_log[] IS INITIAL.
CLEAR ls_fcat.
ls_fcat-fieldname = 'TRKORR'.
ls_fcat-tabname = 'LT_LOG'.
ls_fcat-seltext_m = 'Request'.
APPEND ls_fcat TO lt_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'MESSAGE'.
ls_fcat-tabname = 'LT_LOG'.
ls_fcat-seltext_m = 'Message'.
ls_fcat-outputlen = 100.
APPEND ls_fcat TO lt_fcat.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = lt_fcat
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = lt_log
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
Add Delta to the import buffer with ST-OST add-on
Find Cycle used for system refresh, and open it`s task list, select “Refresh Test System” task:
select “Refresh run” option:
indicate the system, from which copy was performed (PRD):
select Delta, which was calculated last time, and continue:
Optional: Cleanup Import buffer of refreshed system
If there was difference with manual delta and automatically delta (i.e. files are not in production buffer any more), cleanup difference from the import buffer.
Run manual import for the delta transports
To avoid import of Preliminary transports of UC, delta import should be done manually in STMS:
After the import please double check that delta TR`s was not added to the next system of the landscape (VAL). If they are added, you can manually delete them from TMS.
ChaRM specific
If you also use ChaRM please consider following additional steps to be performed in Solution Manager.
Activate QAS system in LMDB of SM
Set System Lifecycle status as Active in t-code LMDB of Solution Manager:
Recalculate transports data in solution manager
According to the note 1546452 perform following additional steps in Solution manager:
- Execute t-code CM_ADM_COCKPIT in Solution Manager
- In Landscape overview select option “Deleted Buffer data” and delete buffer data for QAS system:
- Execute option “Reread Transport Data” again for QAS:
Optional: to follow in case you was using ChaRM Cycles during the refresh
Add the QAS system back to the transport routes in transaction STMS of your Domain controller.
In related solution manager cycle choose More->Redefine Landscape option (to add QAS to the landscape. Solution manager will automatically update the task list structure and the contents of the Landscape assignment block.
Further Information
Useful Notes:
- 2259615 – ChaRM: Correct Procedure of System refresh or copy regarding DEV system in Charm Project
- 2077091 – DGP: Refresh DGP-data after system copy/refresh
- 1546452 – ChaRM: refresh buffered and obsolete transport
Solution manager copy:
- 1297727 – Change Request Management and System Copy
Nice article.
As a side note: in case the customer is using a QA approval queue, one needs to look at the table TMSQWL.
2522998 note is not available anymore, please fix the reference.
Thanks for the comment. I have removed this note from the reference.
Looking for input on best practices related to which transports should be re-imported to QAS after PRD to QAS refresh in a ChaRM landscape. We've heard a few opinions, some make sense, others don't. We'd like the refresh process to be as seamless as possible to our developers, configurators and testers. Before ChaRM, we had our own home-grown transport automation system, and everyone simply reselected the transports they felt should be moved back to QAS after the refresh. We've been told that isn't an option with ChaRM.
Dear Rodion,
Can I have some questions? Because I confusing with System migration methods. Could you please advise me of my requirements?
Our consulting team consults on our System. We want to copy that system into customer DEV System ( OS and DB are same, APP product release same 1909 but some SP Stack different ). How can I continue which migration method? We also want to retain import queries in the target system.
Thanks and Best Regards,
KLZ