Tuesday, May 19, 2009

External Consistency Checks Using /SAPAPO/CIF_DELTAREPORT3

source: Best Practice: Data Consistency Between SAP R/3 and SAP APO 3.0/3.1

Report CIF_DELTAREPORT3 can be used to check the external consistency of the majority of transaction data used in APO (such as production orders, planned orders, sales orders, stocks, and so on).
It makes the following data checks:
• It only checks transaction data.
• It only checks that the data exists. It then compares important quantities and times. The level of detail varies between the different transaction data compared.
• The quantity is also checked for stocks.
Goal and Prerequisites
Report /SAPAPO/CIF_DELTAREPORT3 ensures that the data transferred using the Core Interface (CIF) is or remains consistent between SAP R/3 and SAP APO. If inconsistencies between the systems are detected, you can also use this tool to repair them. This report corrects problems quickly and easily. In the majority of cases, CIF can be used to resend the missing data. However, you need to completely understand the CIF model and integration between SAP APO and SAP R/3. This includes knowledge about master and transaction data in the relevant SAP R/3 and SAP APO systems. If inconsistencies occur between the systems, it is always advisable to analyze the causes of the error, to be able to rule out software errors, for instance. Knowledge of ABAP is also useful to be able to perform on-site error analyses.
Depending on the system settings in SAP APO, changes to transaction data are only listed and are not transferred synchronously to SAP R/3. This results in these changes being identified as inconsistencies, although they are not. Therefore, it is necessary to set a change pointer when the data is transferred from SAP APO to SAP R/3 before running /SAPAPO/CIF_DELTAREPORT3. You use transaction /SAPAPO/C5 to do this.
Technical System Prerequisites
• SAP APO Support Package 19
• PI.2001.1 with the associated note prerequisites. See SAP Note 458164.
Use
To start the report in SAP APO 3.0, you use transaction SE38, program name /SAPAPO/CIF_DELTAREPORT3. As of APO 3.1, you can use transaction /SAPAPO/CCR.
Online processing: The only field of the entry screen in which you have to make an entry is the Partner System field. You can choose any individual object types that you want to be checked.
Important Notes
• Making fewer restrictions when selecting data and choosing a large variety of object types will cause the runtime of the transaction to be longer. If the quantity of data you have chosen is too large, there is the possibility that a short dump (‘TIME_OUT’) will occur. In this instance, you have to run the report in background processing or reduce the quantity of data.
• You should start the compare/reconcile report only if there is a small data load in the Core Interface. For instance, you could do this during the night, when no planning runs that would generate CIF-relevant documents are taking place. Otherwise, the report could display ‘false’
inconsistencies due to runtime problems. You can use SAP Note 496779 or SAP APO 3.0A to prevent this from happening.
• You should not start the compare/reconcile report during initial data transfer or a delta compare/reconcile.


Background Processing
Before you can start a background processing run, you have to create suitable variants for program /SAPAPO/CIF_DELTAREPORT3. Note the following when doing this:
• Compare/reconcile reports can be run in parallel. Create multiple variants for report /SAPAPO/CIF_DELTAREPORT3 (see above). When defining the variants, note that the selected object types cannot overlap. To ensure this, you can assign a dedicated variant to each object type (sales order, production order, purchase requisition, and so on).
• You should start the compare/reconcile report only if there is a small data load in the Core Interface. For instance, you could do this during the night, when no planning runs that would generate CIF-relevant documents are taking place. Otherwise, the report could display ‘false’ inconsistencies due to runtime problems. See SAP Note 496779 from SAP APO 3.0A Support Package 21.
• You should not start the compare/reconcile report during initial data transfer or a delta compare/reconcile.
Verification/Subsequent Processing
Online Processing
Once the compare/reconcile is complete, an output screen appears, displaying an overview of the results. This is done separately according to documents (orders) and stocks. A line is displayed for every object type selected on the screen for testing, showing the following information:
• Total: The number of SAP R/3 objects that have been selected for comparison
• Error: The total number of errors found
• All other columns: Distribution of errors to individual error areas
A tab page displaying detailed lists of the individual faulty orders or stocks is displayed for every object type that is shown to have errors in the results overview.
In the case of orders, there is an additional tab page on every tab page for an incorrect object type listing the orders that were found in SAP R/3 but that are missing from SAP APO.
If required, execute a reconcile.
• Choose a tab page showing a detailed list of incorrect objects and select the lines you wish to reconcile (to make multiple selections, hold down the CTRL button at the same time).
• Choose the Send to APO button to start the reconcile.
• In the dialog box that appears, confirm that you have initiated the Send.
The current state of the data is read from the database. Then, the data is transferred asynchronously using the standard CIF interface of the object type.
A selection icon appears beside the selected lines in the Sent/Action column indicating that the Send has been initiated for the relevant objects. An object that has a selection icon cannot be resent, even if it is reselected for this purpose.

Background Processing
The spool list is the result of the compare function in background mode. To view the spool list for a job that ended without errors, choose your job in the job overview (transaction SM37), choose Spool, choose your spool list from the spool list overview, and choose Display (F6). As of APO Support Package 7, you also have access to all detailed lists of the faulty objects. To view these, see the spool list beside the summary results overview of the comparison for documents and stocks.
Compare/Reconcile Report Performance
In general, the consistency compare/reconcile of /SAPAPO/CIF_DELTAREPORT3 has four stages.
Stage 1: It evaluates the integration models to be checked. The runtime of this stage is linearly related to the size of the integration model.
Stage 2: It selects the data. We cannot provide a blanket statement about performance for this stage. The runtime is determined by the relationship between filter objects and the data objects to be checked. We cannot provide a general recommendation. For more detailed information, see SAP Note 439438.
Stage 3: It checks that the data exists in APO. After the integration models are evaluated and the corresponding data is read from SAP R/3, SAP APO is checked to see that the corresponding data exists here. The runtime is linearly related to the size of the integration model.
Stage 4: It checks whether the APO data does NOT exist in the SAP R/3 system. If you have a large integration model, this step will have a shorter runtime.
Important notes:
 
• For more information, see SAP Notes 439438 and 451446.
• To optimize the runtime, change the block size of the filter object. We cannot provide a general recommendation for the block size of the filter object since the ideal setting is always based on the relationship between the filter objects and the data objects to be checked.

No comments: