Functionality With the function module BCA_DIM_BILLDOC_CANCEL, you can reverse abilling document in the Contract Account Receivable and Payable (FI-CAx)system. This reversal process is triggered by the Account Managementsystem (external billing system). The reversal is stored in the FI-CAx system as a reversal billingdocument. The system ensures that both this document and the billingdocument to be reversed are not invoiced. The import parameter I_STR_REVERSAL_DOC defines the properties of thereversal document. The E_TAB_RETURN parameter can deliver several message numberssimultaneously. These messages are also stored in the application logunder object name FS_PROT (Financial Services - Standard Log), with thesubobject ERROR (Normal Error) and the External ID BILLDOC_CANCEL. Billing Reversal> Depending on whether the billing document to be canceled is alreadyinvoiced or not, billing reversal takes place in the following twoscenarios:
- Reversal of billing document not yet invoiced>
The system creates a reversal document, which consists of only adocument header, but does not create any new invoicing orders. The sytem deletes the invoicing order of the billing document to bereversed. After deletion, the system cannot invoice reversed billingdocuments or reversal billing documents once again.
- Reversal of billing document already invoiced>
The system reverses the invoice document and creates a new reversalbilling document, which consists of a document header with documentitems. The system copies the document item values (amount and quantity)present in the reversed billing document and changes them to negativevalues in the new reversal billing document. Next, the system deletesthe invoicing order of the billing document. After deletion, the systemcannot invoice reversed billing documents or reversal billing documentsonce again. Note:>
- This function module carries out the following actions:
Perform direct updates in a successful case and does not use the updatetask Perform a COMMIT WORK for each call Not perform any separate authorization checks
- With this function module, you cannot:
Reverse simulated billing documents Reverse billing documents that have already been reversed again Reverse reversal documents Reversal billing documents require a unique reference to a document inthe legacy systemDescription The component BILLDOCNO of this export parameter E_NEW_REVERSALDOCcontains the document number of the reversal document. Description This field controls access to the archived billing documents. Thiscauses that the billing document to be cancelled shall be looked inarchives also. The billing document which to be cancelled is lookedfor first on the data base. If the document is not found on the database and if this field is marked, then the billing document which has tobe cancelled is looked in archives also. Note:> Accessing archived billing documents lead to long runningtime.Description The import parameter REVERSAL_DOC defines the properties of the reversaldocument: ,,The component REFDOCNO must contain the document number of thereversal document in the external system. ,,The component DOCTYPE_EXT is used to determine the document type ofthe reversal document using posting area 2645. If you leave thiscomponent empty, the document type of the document to be reversed iscopied. Description The import parameter I_STR_REVERSED_DOC identifies the billing documentthat is to be reversed. ,,The components LOG_SYSTEM and REFDOCNO must be filled. They identifythe billing document to be reversed from the view of the legacy system. ,,The component CLEAR_ACCT must contain the clearing account number ofthe document to be reversed. Description If this import parameter I_TESTRUN is selected, the BAPI does notperform any database changes. However, all checks are carried out. Anyerrors that occurred are written to the export table E_TAB_RETURN. Description With this export table E_TAB_EXTENSIONOUT, the BAPI can returnadditional data to the caller. The standard system delivered by SAP doesnot use the export table. If you want to fill the table, you have toimplement the methods of the BAdI INV_BILL_CANCEL. Description This export table E_TAB_RETURN contains all log messages. If the tablecontains one or more messages of message type E or A, an error hasoccurred that led to termination of processing. Description With this import table I_TAB_EXTENSIONIN customer can provide theBAPI with additional data. The SAP standard delivery ignores the table;it is merely forwarded to the methods of the BAdI INV_BILL_CANCEL.
|