Maintain Reversal Billing System with Errors
Application component: Contract Accounts Receivable and Payable
App type: SAP GUI
Description:   A standard procedure is available for recognizing and eliminating errors that occur while processing inbound IDocs. 
Key features:  Through the integration of the IDoc interface with the workflow, the accounting clerks are automatically informed of any errors that occur.Faulty IDocs can be sent through the workflow to a pool of clerks for processing.A given IDoc can only be processed by one clerk at a time (that is, it is not possible for more than one user to change it simultaneously).Different IDocs can, however, be processed in parallel.For detailed instructions on implementing ALE error handling, refer to the SAP Library under Basis Components  Middleware  Application Link Enabling  ALE Programming Guide  Error Handling. .You can change IDocs and see their status in the transaction Display IDoc in the SAP menu under Tools  Business Communication  IDoc Basis .To do this, enter the search parameters on the selection screen (creation date/last changed date and the basic type) of the IDocs you want to display.The resulting hit list is displayed with status and additional information.IDocs whose processing was terminated or could not be completed successfully are indicated with a red traffic light symbol.You can display a faulty IDoc by double-clicking on it.There you can see the entries in the control data record and in the data records, as well as the status records and the associated error messages.The highest status record indicates the current status of the IDoc.The red status records provide information on the errors.If an error can be attributed to a particular segment, that segment is highlighted in the data records in red.You can display the data record by double-clicking on the symbol next to the segment name.In the display, you can manually change or correct the field contents with the menu option Data Record – Display  Change . An edited IDoc automatically receives the status 69 ( IDoc was edited ) when you save, while the original data is saved under a new IDoc number with the status 70 ( Original of an IDoc which was edited ).Once the IDoc contents have been edited by an accounting clerk, the corrected IDocs are automatically posted in the next correction run.Since in the interfaces described here the processing or posting to handle the large data volume does not take place at the overall IDoc level but at the level of the individual documents in the IDoc, in a correction run it is necessary to determine the documents that could not be posted in each IDoc.This takes place in the individual processing function modules of the interfaces based on the IDoc status records.There are two different cases here.On the one hand, errors could occur that result in none of the documents in an IDoc being posted. This could be caused by missing system settings, for example. On the other hand, it is possible that only individual documents in an IDoc could not be posted (for example, due to missing entries in a data field).In the first case, each processing attempt results in only a status record with status 51 and no segment is marked as having errors.In the second case, the overall status 51 is set like in the first case, but in addition each error is indicated with the individual status 51 assigned to each faulty segment. This means that the documents which need to be corrected can be determined from the IDoc data records.The status records of an IDoc are updated with each processing attempt, so that they always reflect the entire history of the IDoc.