Business Information Warehouse for SAP (Prima Techs SAP Book Series)

Team-Fly

Debugging a data extractor is tricky. Because extractors run as background tasks, users cannot set breakpoints to debug the code. You need to add an endless loop in the data extractor code. When SAP BW schedules this job to extract data from SAP R/3 OLTP, the data extractor code goes in an infinite loop. You log on to the SAP R/3 instance under the same user name being used to extract data, usually ALEREMOTE. Here are the steps to debug data extractors:

  1. Create an endless loop inside the user-exit as shown here:

    DATA: DEBUG_FLAG. DO. IF DEBUG_FLAG = 'X'. EXIT. ENDIF. ENDDO.

  2. Schedule an InfoPackage to start data extraction from the SAP BW scheduler.

  3. Log on to the SAP R/3 OLTP instance where the extraction job will be running in an infinite loop. Using transaction SM50, identify a job running under the user ALEREMOTE.

  4. While in the SM50 process monitor window, select the job and click the Debugging button. This puts you in debugger mode.

  5. Set DEBUG_FLAG to X and continue the typical ABAP debugging process.

Note that the user who is debugging extractors requires special development and debugging authorizations in the source system and not in SAP BW.


Team-Fly

Категории