Purpose
The purpose of this page is to clarify the understanding of the system logic and requirements in relation to ODP Extraction debugging.
Overview
Prerequisites / Useful information
- Debugging the ODP-extraction works by forcing the program into an endless loop, catching the process then via SM50. Therefore debugging an ODQ-extraction requires authorizations for Debug and also the authorizations to catch a process in SM50 for debugging.
- Changing variable L_DELAY during debug requires the authorization:
Authorization Obj. S_DEVELOP ABAP Workbench
Authorization Field ACTVT Activity 02
Authorization Field DEVCLASS Package <Dummy>
Authorization Field OBJNAME Object name <Dummy>
Authorization Field OBJTYPE Object Type DEBUG
Authorization Field P_GROUP Authorization group ABAP/4 program <Dummy> - The wait loop is activated for a specific user via a check-point group (transaction code SAAB).
- There are different checkpoints for the OPEN and FETCH part of the extraction.
Activation of Checkpoint group RODPS_REPL_OPEN
- First the check point group RODPS_REPL_OPEN needs to be activated in transaction SAAB:
2. Select the radio button "Break" in the "Assertions" section. In the following dialog box for background processing, enter "Log":
Debugging: Open or Close call
First of all, activate checkpoint group as described in section 1 |
---|
- Extraction test can be started in ABAP program RODPS_REPL_TEST:
- Capture the waiting process from transaction SM66 or SM50 in the debugger. You recognize the process because it is in the program CL_RODPS_REPLICATION==========CP:
- As soon as the debugger starts, you should be in the method _ENDLESS_LOOP of the class mentioned above.
- In the debugger, click on the "pen" so it is possible to change field content of the variable L_WAIT:
- ...and start debugging.
Debugging: Extraction process
- Debugging: Actual Data Extraction (method FETCH) from the Operational Delta Queue
Set a breakpoint in the debugger in the method EXECUTE_NOWAIT of the class CL_ODQ_TASK_MANAGER and continue the execution (F8). - When the debugger is stopped again in this method, use F6 to go to the line "IF ir_task->p_delay_for_debugging LT l_delay." and change the value of the variable L_DELAY to 20 for example.
- Continue the execution (F8) or end the debugger (do not end the application) by using the relevant menu option.
- The extractor call is split in a separate background job, and the background job is notified that it must wait for a certain amount of time due to the aforementioned change to the variable L_DELAY.
- In the debugger, navigate from the methods CL_ODQ_UTILITIES=>WAIT or CL_ABAP_TSTMP=>SUBTRACT to the line "ENDMETHOD." using the debugger function "Goto statement".
- Start the actual debugging by accessing the method LR_TASK->EXECUTE.
- In transaction SAAB, activate the checkpoint group RODPS_REPL_FETCH.
- Start the extraction:
- and Capture the waiting process from transaction SM66 or SM50 in the debugger. You recognize the process because it is in the program CL_RODPS_REPLICATION==========CP
- If you do not want to debug every call of the method FETCH, also change the value (with the "pen") of the variable P_END_DEBUGGING to X:
Related SAP Content
SAP Consulting Note: 1580242 - Checkpoints (assertions) for debugging ODP extraction
SAP SCN WIKI: Replication test with RODPS_REPL_TEST