SAP Program REAARCH_ANALYSE_HEAD_ILM - Analyze Billing Documents for Archiving

Title
Analyze header data from billing documents for archiving

Purpose
The first step in the archiving process. This report analyzes headerdata from billing documents with a view to possibly archiving them.
The archiving object used for archiving the header data of billingdocuments is called ISU_BILL. It encompasses the following billingdocument data:

  • Billing document header data (ERCH)

  • Outsorting data for a billing document (ERCHO)

  • Link data for the corresponding print document (ERCHC)

  • Analysis periods of dynamic period control (ERCHP)

  • Consumption data from a billing document (DBERCHV)

  • Index table for storage/billing documents (ETAXERCH)

  • Using the AOBJ transaction, you will find the definition of the ISU_BILLarchiving object and the related Customizing.
    Using the SARA transaction, you will find archiving administration andthe related Customizing.
    Using the SARI transaction, you will find the technical view of anarchive.
    Using the standard menu for the Utilities Industry, you will find theaccounting view of an archived billing document.

    Integration

    • REAARCH_READ_HEAD

    • Second step: Archiving the billing document header data selectedin the first step.
      • REAARCH_DELETE_HEAD

      • Third step: Deleting the billing document header data from thedatabase on the basis of the previously created archive.
        • REAARCH_RELOAD_HEAD

        • Use this report to reload data that has been archived and alreadydeleted. Note that you cannot reload individual documents. You have toreload the entire archiving run. This procedure should not normally beused and should be limited to extreme problem cases (for example,incorrect retention period in Customizing).
          • REAARCH_READ_ARCHIVE_HEAD

          • This report allows you to read a header data archive for billingdocuments and to output parts of the data in a list before the deletionprogram has been executed. It displays the data in a technical view.

            Features
            The analysis report selects the following billing documents:

            • that lie within the specified document, contract account or contract
            • range
              • that have archiving status 3 (billing document line items deleted) in
              • the ERCHARC table, but are not simulation documents (these are onlydeleted)
                • whose retention period has expired.

                • The retention period (in days) is set inCustomizing.
                  Additional checks may be necessary, depending on the document class:
                  • Standard documents:

                  • Header data from a standard document can be archived if a billingdocument exists for a period that occurs after the period of thedocument to be archived.
                    • Reversal documents:

                    • Header data from a reversal document can be archived without undergoingany additional checks if the reversal document is not an adjustmentdocument.
                      If it is an adjustment document, it can only be archived if the headerdata containing the adjustment is also archived.
                      • Manual documents:

                      • A manual document can be archived without undergoing any additionalchecks.
                        • Backbilling/ period-end billing documents:

                        • A backbilling or period-end billing document can be archived withoutundergoing any additional checks.
                          If a document cannot be archived, the system displays an error message.You can then edit the reason:
                          • No follow-on billing document

                          • Adjustment reversal; can only be archived with follow-on document

                          • In a subsequent analysis process, you can define your own checks forwhether the billing documents can be archived or not. In this way youcan introduce additional restrictions. For more information, see thedocumentation on the ETOAR003 enhancement and theEXIT_REAARCH_ANALYSE_HEAD_001 function module.
                            RESET N1
                            If you don't start the report in test mode, then the archive status ofall the selected billing documents, that remain after the analysisprocess, is set to 4 (billing document header can be archived) in theERCHARC table.

                            Starting the program
                            When you start the report you can make various settings on the initialscreen:

                            • Document number: limits the data to be analyzed to certain
                            • billing document numbers
                              • Contract account: limits the data to be analyzed to certain
                              • contract accounts
                                • Contract: limits the data to be analyzed to certain contracts

                                • Log type: general statistical data, detail log with detailed data
                                • for each analyzed record (can become confusing with large amounts ofdata) or detail log with detailed data for documents that could not bearchived.
                                  • Run time restriction: If you activate the run time restriction,
                                  • the analysis report terminates when the end date and end time isreached. This means that you can let the analysis report run as a jobduring short time frames.
                                    • Test run: If you start the report as a test run, no changes are
                                    • made to the database (updating the archiving indicator in the billingdocument header).
                                      Start archiving automatically: When you set this indicator, theSAP_ISU_ARC_BIDOC_ANA_HEAD_END event is triggered after the analysis runhas been completed. If you have previously saved an archiving run withthe same selection parameters and the same variant name, and havescheduled the start condition by event, then this is startedautomatically after the end of the analysis run.

                                      Error messages specific to the report (for system administrators)
                                      If one of the following system messages appears while the program isrunning, proceed as follows:

                                      • Program stop: error inserting the archiving indicator in the ERCHARC
                                      • table
                                        A list of billing document numbers is displayed with this error message.The line could not be inserted into one of these billing documents.
                                        Find out for which billing documents the archiving indicator could notbe inserted and correct the reason for the error message. Restart theanalysis report.
                                        • Program stop: Error reading from a database table

                                        • An unexpected error occured while reading data from a table.
                                          Get rid of the reason for the error message. Restart the archivingreport.