Transport steps that are implemented in ABAP include activation of ABAP Dictionary objects, structure conversion, and report/screen generation. Executing these steps is complicated. tp uses the tables TRBAT and TRJOB to communicate with the ABAP transport programs.
For these steps, the R/3 System must be running with at least two background work processes. Furthermore, the batch job RDDIMPDP must be scheduled with the repeat-start option. SAP recommends that the job be scheduled event-driven and periodically. If the job is not running, then start the program RDDNEWPP once in every R/3 System. Do this as user DDIC in client 000 and in all clients that are used as the source or target for a transport.
Once tp has sent the corresponding event to the R/3 System, RDDIMPDP checks table TRBAT to see if there is anything for it to do. If so, it starts the required programs (for example, mass activation) in the background, schedules itself again, and then stops.
RDDIMPDP automatically recognizes if a previous step was terminated and restarts the action. However, this can only be done with two background work processes.
RDDIMPDP recognizes terminated import steps by checking table TRJOB.
Table TRBAT
Looking at an example is the best way to understand how
tp - ABAP communication works in detail.Consider three change requests which are to be activated. For each change request,
tp inserts an entry into table TRBAT. TRKORR | Function | RETCODE | TIMESTMP |
T11K004711 | J | 9999 | 00000001 |
T11K004720 | J | 9999 | 00000002 |
T11K003456 | J | 9999 | 00000003 |
The table columns have the following meaning:
- TRKORR: Contains the names of the change requests.
- FUNCTION: Contains a key for the requested action. Possible values are:
- A: Activate all ABAP Dictionary objects in the change request with mass activation (old activation program).
- B: Activate all ABAP Dictionary objects in table TACOB with mass activation.
- D: Import application-defined objects.
- G: Generate reports and screens.
- J: Activate all ABAP Dictionary objects other than the enqueue modules in the change request with mass activation (new activation program).
- M: Activate enqueue modules in the change request with mass activation.
- N: Convert all structure changes generated by the import and recorded in the table TBATG, other than those of matchcode objects.
- O: Convert all structure changes that were generated by actions in the online system and not by the import and that are recorded in the table TBATG.
- R: Execute programs after PUT (XPRA).
- S: Necessary actions to transfer the new Dictionary structures into the runtime environment are distributed to different steps.
- X: Export application-defined objects.
- Y: Convert structure changes to matchcode objects that were generated by the import and are recorded in table TBATG.
- RETCODE: Contains exit codes for finished steps. Possible values are:
- 9999: This step is waiting for execution.
- 8888: This step is active.
- <= 12: This step is finished.
- TIMESTMP: Contains the order in which the actions should be done. For finished steps, it contains their completion time.
In addition, a header entry is inserted to tell RDDIMPDP to start (the RETCODE column is set to B(egin)).
TRKORR | FUNCTION | RETCODE | TIMESTMP |
T11K004711 | J | 9999 | 00000000000001 |
T11K004720 | J | 9999 | 00000000000002 |
T11K003456 | J | 9999 | 00000000000003 |
HEADER | J | B | 19921207130147 |
When RDDIMPDP becomes active, it sets the header entry to R(unning) and starts the corresponding program (mass activation in this case), which sets the first transport to the active status.
TRBAT now looks like this:
TRKORR | FUNCTION | RETCODE | TIMESTMP |
T11K004711 | J | 8888 | 00000000000001 |
T11K004720 | J | 9999 | 00000000000002 |
T11K003456 | J | 9999 | 00000000000003 |
HEADER | J | R | 19921207130650 |
8888 in the RETCODE column means that this change request is active. When it is finished, the column contains the return code of the step and the TIMESTMP column contains the completion time.
When all actions are performed, the header entry is set to F(inished). In the meantime,
tp copies the logs of finished steps from the tp directory to the log directory and removes the corresponding TRBAT entries.TRBAT may then look like this (the log of the first change request was already copied to the log directory):
TRKORR | FUNCTION | RETCODE | TIMESTMP |
T11K004720 | J | 4 | 19921207130912 |
T11K003456 | J | 0 | 19921207130945 |
HEADER | J | F | 19921207139945 |
As soon as the last log has been edited,
tp deletes the header entry, and TRBAT is empty again.Note that actions B (TACOB activation), N, O, Y (structure conversion), and S (distribution) only have header entries. They work independently of change requests.
Table TRJOB
As soon as RDDIMPDP recognizes that there is work to do, the job number (which is generated by SAP background processing) is inserted into the table TRJOB before the corresponding actions are started.
RDDIMPDP checks whether the job is still running once it has become active again and has found a running job in TRBAT and an entry in TRJOB.
If not, the corresponding step (
retcode = 8888 ) is set to 12, and the next step is executed. The TRJOB entry is deleted as soon as the header entry in TRBAT is set to F(inished).
No comments:
Post a Comment