Programme SAP RP_DIST_REP_EXAMPLE - Programming Example for Distributed Reporting

Title
Programming Example for Distributed Reporting

Purpose
This example illustrates the programming of reports that are suitablefor distributed reporting.

Integration
If the report that you wish to run uses neither function moduleHR_DISPLAY_BASIC_LIST nor REUSE_ALV_GRID_DISPLAY tooutput data, it must be compiled in accordance with this sample report.You can also use programmed reports to output the results obtained fromdistributed reporting.
If the report that you wish to run does use these function modules, youdo not need to compile the report in a different way. However, you mustuse the output from the HR Scheduler for parallel anddistributed reporting RPMREP00.

Features
The coding commented with HR - Scheduling displays thesupplements that a report must contain in order for distributedreporting to be used. The remaining coding in this example isreport-specific.
The form routines used have the following functions:
CHECK_DISTRIBUTED
This form routine determines whether the report is called from HRScheduler for parallel and distributed reporting , or whether it canwork on a stand-alone basis.
If the report is called from the HR Scheduler, form routineDATA_EXPORT must be called.
DATA _EXPORT
This form routine is used to export data to the HR Scheduler forparallel and distributed reporting.
The report-specific data is written to a data structure, which is usedto export data for distributed reporting:
Lines in example: DATEN1 [ ] = PERSDATA [ ].
This structure is exported at the end. The export is then performed asfollows, depending on whether the distributed reporting was carried outonline or in the background:

  • Online execution --> Export to memory

  • Background execution --> Export to cluster INDX (System table INDX)

  • REDEFINE
    This form routine is used to copy data from the called system to thereport's internal table. The interface must always be compiled in thesame way as described in this example, even if all the tables are notused.
    Finally, the Output routine must be called, which then assumesthe output.
    OUTPUT
    Data output from the internal table is then executed from within thisform routine. During the output process, consistency checks,summations, and the output all take place. Additional logic cannot beused. For example, you cannot refresh data.