Show TOC

 Mass Reversal with IDoc Interface

Purpose

It may happen that after transferring the accounting documents you discover that some of the invoices that had been created in EBS are faulty. In such cases you can use the interface for mass reversal of documents to reverse these invoices and the corresponding documents created in Contract Accounts Receivable and Payable . EBS identifies the invoices to be reversed and sends the key to Contract Accounts Receivable and Payable. You can then reverse the billing documents in a mass run.If an entire billing run is faulty, you can directly reverse the documents in Contract Accounts Receivable and Payable with the mass reversal transaction (menu: Start of the navigation path Document Next navigation step Mass Reversal End of the navigation path ). Here you can identify the faulty documents with the reconciliation key under which they were posted.

Process Flow

The structure of the interface for mass reversal corresponds to the IDoc basic type FKK_EBS_REVERSE. The interface contains only the key fields for identifying a document in the segment E1FKK_EBS_REVERSE. Depending on which key fields are used for identification, the key values must be transferred in the segment fields OBJ_KEY and REF_DOC_NUMBER. Field OBJ_KEY should only contain the key AWKEY, but field REF_DOC_NUMBER contains either the key XBLNR or OPORD. At event 2480, you define whether field XBLNR or OPORD is to be used (see Keys for Access to Invoice Documents ).

The partial keys AWKEY and XBLNR or OPORD, together with the field AWSYS from the IDoc control record and the constant AWTYP, form a unique key that is needed to access the corresponding invoice document numbers. No other data is needed. An IDoc line corresponds to an invoice document to be reversed. During transfer of the invoice documents, the EBS generates a unique key (AWKEY, OPORD, or XBLNR) for each invoice. This key can be the invoice number, for example. After a faulty billing run, the EBS identifies the invoices to be reversed and sends Contract Accounts Receivable and Payable a list of the corresponding key values by means of IDoc communication. To prevent lock situations, all documents of a business partner to be reversed must be contained in an IDoc. The IDoc data and the mass reversal are processed by the function module FKK_EBS_MRD. This function module is linked to the message type FKK_EBS_REVERSE_DOC through the transaction code FKK_EBS_REVERSE. Execution of IDoc processing is controlled by the mass activity. The key is completed with the additional information from the IDoc control record (AWSYS) and the constant AWTYP. This enables unique access to the billing document and determination of the billing document number (OPBEL). The billing document numbers are then transferred to the function module FKK_REVERSE_DOC_MASS. An authorization check is made at this point to make sure that the user (such as WF-BATCH) has authorization ACTVT = 85 of authorization object F_KKRD_MASS. If this authorization does not exist, processing is terminated. If the authorization check is successful, the documents are reversed in the indicated mass activity. Only complete documents can be reversed. If the documents to be reversed were divided into multiple IDocs, you can use parallel processing. When a billing document is reversed, a reversal document is posted and the following changes or entries are made:

Original Invoice Document

Field

Description

DFKKKO-STORB

Document number of reversal document

DFKKOP-AUSGST

Clearing status 9 (constant = cleared item)

DFKKOP-AUGRD

Clearing reasonSuch as 05 (reversal) or value selected in Customizing

Reversal Document

Field

Description

DFKKKO-STBEL

Document number of reversed billing document

DFKKKO-HERKF

Origin key of document 71 (constant)

The function module FKK_EBS_MRD processes the mass reversal. You can make customer-specific modifications at the following events:

Event 2400

The function module (FKK_EBS_MRD) that processes the IDoc data calls the function module FKK_REVERSE_DOC_MASS, which executes the actual postings. If an error occurs while a billing document is being reversed, the return value is not zero. The cause of the error could be, for example:

  • The invoice has already been paid or a down payment was made.

  • The invoice has already been reversed by an accounting clerk.

By specifying a module at event 2400 that is custom-programmed for the specific installation, you can determine the cause of the error and react to it appropriately. For example, you can post a credit memo if the invoice has already been paid.

Event 2403

At this event you can send a status confirmation of the mass reversal to the EBS.

Recommendation Recommendation

If the interface is active for mass reversals, you should create a secondary index for the fields AWSYS, AWKEY, and AWTYP (or XBLNR and OPORD) in table DFKKKO to improve processing.

End of the recommendation.