Ansicht
Dokumentation
WCB_CCS_CANCELMULT - Contract Settlement: Cancel Settlement Documents for Contracts
Fill RESBD Structure from EBP Component Structure Addresses (Business Address Services)This documentation is copyright by SAP AG.
Functionality
You can use this function module to cancel settlement documents of condition contracts. You specify the condition contracts in table IDENTIFIERIN.A condition contract can be identified by the condition contract number or by an external Guid. If both fields are filled, only the contract number is taken into account.
The table RANGESSETTLDATEINis used in determining which settlement documents are selected. If the table is empty , all settlement documents of a condition contract are selected and cancelled.
The field SETTLEMENT_DATE is not filled in settlement documents that were created to reverse open accruals. These documents are cancelled first.
Notice that the function module executes COMMIT WORK multiple times.
Settlement documents normally contain an entry in the field SETTLEMENT_DATE, and are cancelled in descending order according to the settlement date. If you want to cancel more than one settlement document of a condition contract at once, make sure to verify that the cancellation of all documents was successful. In some situations, such as the following example, the system may not complete cancellation: Three settlement documents have been selected for cancellation. The first of the three is cancelled (with database update and COMMIT WORK), but the second cannot be cancelled due to errors. In this case, the system would stop at the second, and no attempt would be made to cancel the third.
The parameters INVOICEDATE, BILLREASON and BILLTYPE are transferred directly to the cancellation document(s) that are created. Usually, it is not necessary to assign a value to the parameter BILLTYPE, because the billing document type for the cancellation document is determmined automatically.
The table MAPFOREXTGUIDOUT contains only entries for contracts that were identified by the external Guid (specified by the entries in table IDENTIFIERIN). The table CANCELLEDDOCOUT contains the cancelled settlement documents for the condition contracts. The table ERRORCONTRACTSOUT contains the condition contracts for which errors occurred.
Example
Notes
Further information
Parameters
BILLREASONBILLTYPE
CANCELLEDDOCOUT
ERRORCONTRACTSOUT
EXCLUDEDELETED
IDENTIFIERIN
INVOICEDATE
MAPFOREXTGUIDOUT
RANGESSETTLDATEIN
RANGESUSECASEIN
RETURN
TESTRUN
Exceptions
Function Group
WCB_BAPI_METHODSSUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 4343 Date: 20240523 Time: 150046 sap01-206 ( 79 ms )