Ansicht
Dokumentation

REAARCH_ANALYSE_LINE_ILM - Analyze Billing Document for Archiving of Document Line Items

REAARCH_ANALYSE_LINE_ILM - Analyze Billing Document for Archiving of Document Line Items

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Title

Analysis of Billing Document Line Items for Archiving

Purpose

This report carries out the first step in archiving billing document line items: The billing document line items are analyzed with a view to possibly archiving them.

The archiving object used to archive the billing documents is ISU_BILLZ. It includes the following data from the billing document:

  • Billing document line items (DBERCHZ)
  • Discount line item data for the billing document (DBERCHR)
  • Texts for a billing line item (DBERCHT)
  • Data on conversion steps per bill line item (DBERCHU)
  • Tax code information (DBERDTAX)
  • Condition data (DBERCHE)

Using the Define Archiving Object transaction (AOBJ), you can find the definition of the ISU_BILLZ archiving object and the related Customizing settings.

Using the Archive Administration transaction (SARA), you can find archiving administration and the related Customizing settings.

Using the Archive Information System transaction (SARI), you can find the technical view of an archive.

Integration

  • REAARCH_READ_LINES
Second step: Archive the billing document line items selected in the first step.
  • REAARCH_DELETE_LINES
Third step: Delete the billing document line items in the database, on the basis of the previously created archive.
  • REAARCH_RELOAD_LINES
Use this report to reload data that has been archived and already deleted. Note that you cannot reload individual documents. You have to reload the entire archiving run. This procedure should not normally be used and should be limited to extreme problem cases (for example, incorrect retention period in Customizing).
  • REAARCH_READ_ARCHIVE_LINES
This report allows you to read a billing document line item archive, and to display parts of the data in a list before the deletion program has been executed. It displays the data in a technical view.

Requirements

Features

The analysis report selects the following billing documents:

  • Billing documents within the specified document, contract account, or contract range
  • Billing documents that do not have an archiving status in the ERCHARC table
  • Billing documents that are not simulation documents, and whose retention period has expired. The simulation documents are deleted.
The retention period (in days) is set in Customizing.
  • If GDPdU checks are activated in your system (see Customizing table TE026), the system checks the default implementation of BAdI ISU_TO_BILL_GDPDU to determine whether the billing document has already been extracted.

Additional checks may be necessary, depending on the document category:

  • Standard documents:
A standard document can be archived if it has been invoiced and the print document has been archived.
  • Reversal documents:
A reversal document can be archived without undergoing any additional checks if it is not an adjustment document.
If it is an adjustment document, it can only be archived if the document containing the adjustment is also archived.
  • Manual documents:
A manual document can be archived if it has been invoiced and the print document has already been archived.
  • Backbilling documents:
A backbilling document can only be archived in a complete billing period. For example if the billing period is twelve months, none of the backbilling documents can be archived until the last document for that period is ready for archiving.
The last document must have been invoiced, the print document must have been archived, and a billing document issued for the period after the document to be archived must exist.
  • Backbilling documents(for n periods):
A backbilling document for the current billing period cannot be archived. Therefore, the n most recent documents are not included for archiving. After the n periods, the documents must be invoiced, the print document must be archived, and a billing document for a period after that of the document to be archived must exist.
  • Period-end billing documents:
A period-end billing document can only be archived in a complete billing period. If the billing period is twelve months, none of the documents can be archived until the last document for that period is ready for archiving. The last document must have been invoiced, the print document must have been archived, and a billing document must exist for a period after that of the document to be archived.
  • Period-end billing documents (if you performed a separate backbilling):
The document must have been invoiced and the print document must have been archived.

If a document cannot be archived, the system displays an error message. In this case, you can process the reason for the document not being archived:

  • No follow-on billing document
  • Billing document has not yet been invoiced
  • Print document has not yet been archived
  • Period-end billing document cannot be archived
  • Backbilling document cannot be archived

You can define your own additional checks using a user exit. For more information, see the documentation on the ETOAR004 enhancement (using the SAP Enhancement Management transaction - SMOD) and the EXIT_REAARCH_ANALYSE_LINES_001 function module.

You can use the ISU_TO_BILL_GDPDU BAdI to define further checks for GDPdU.

The archive status of all the billing documents that remain after the analysis process is set to 1 (billing document line items can be archived) in the ERCHARC table. If you start the analysis report in test mode, the archiving indicator will not be set.

Notes on Starting the Program

When you start the report you can make various settings on the initial screen:

  • Document number:Limits the dataset to be analyzed to specific 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

Selection of Billing Documents

  • Billed: If you select this button, the report selects all billing documents that have been billed. You cannot enter values in the Selection of Simulation Type field, or the existing values are reset.
  • Simulated: If you select this button, the report selects all simulated billing documents. By entering values under Selection of Simulation Type, you can select the type of simulation.
  • All: If you select this button, the report selects all billing documents (simulated and not simulated). By entering values under Selection of Simulation Type, you can select the type of simulation.
  • Selection of Simulation Type: Here you can restrict the selection with regard to the type of simulation for billing. You can enter the following values under Selection of Simulation Type:
  • 1 - Billing simulation for budget billing calculation

  • 2 - Billing simulation for extrapolation of unbilled revenue reporting

  • 7 - Simulation by extrapolation of previous document

Technical Options

  • Log type: General statistical data, detail log with detailed data for each analyzed record (can become confusing with large amounts of data) or detail log with detailed data for documents that could not be archived.
  • Run time restriction:If you activate the run time restriction, the analysis report terminates when the end date and end time is reached. This means that you can execute the analysis report as a job during short time frames.
  • Activate DPC analysis: If you select this field, billing documents with the billing procedure dynamic period control are checked. If you bill a lot of customers using this billing procedure, it can improve the performance of the archiving report.
  • Test run: If you start the report as a test run, no changes are made to the database (updating the archiving indicator in the print document header).
  • Automatic archiving start: Setting this indicator triggers the SAP_ISU_ARC_BIDOC_ANA_LINE_END event after the end of the analysis run. If you have previously scheduled an archiving run with the same selection parameters and variant name, as well as the start condition After Event, then this archiving run is started automatically after the end of the analysis run.

Error Messages Specific to the Report (for System Administrators)

If one of the following system messages occurs while the program is running, proceed as described:

  • 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.
Determine which billing documents could not be inserted. Determine and correct the cause of this message. Restart the analysis report.
  • Program stop: Error reading from a database table
An unexpected error occurred when reading data from a table.
Correct the reason for the error message. Restart the archiving report.

Example






rdisp/max_wprun_time - Maximum work process run time   General Material Data  
This documentation is copyright by SAP AG.

Length: 12567 Date: 20240520 Time: 104223     sap01-206 ( 154 ms )