Skip to Content
0
Former Member
Nov 13, 2007 at 07:23 AM

BADI UDM_COLL_AMT_C

175 Views

Hi SAP friends,

Can any one help me in writing the code for this BADI 'UDM_COLL_AMT_C'. Please check this and help me here is the requirement for this BADI.

<b>Requirement:</b> UDM_COLL_AMT_C: BAdI Amount to be collected:

The amount to be collected for a business partner in a collection segment is the total of all overdue and due items minus the items for which there are open promises to pay, dispute cases that are not to be collected, or current dunning notices. The indicator Consideration of Due Date for Cash Discount in the collection strategy controls whether cash discount is considered in the calculation of the amounts. Items where payment has been arranged are not included in the amount to be collected.

The calculation of the amount to be collected described above (SAP standard) can be changed by a customer enhancement in that the Amount to be collected should include the disputed items for any status. The BAdI: UDM_COLL_AMT_C has to be modified to include the disputed Items.

<b>Scenario:</b> For example, if there are 5 invoices ($200 each) of which the amount for 3 invoices have not been collected and 2 invoices are in dispute.

Invoices Amount Status

Invoice 1 $ 200 Amount not collected

Invoice 2 $ 200 Amount not collected

Invoice 3 $ 200 Amount not collected

Invoice 4 $ 200 In Dispute

Invoice 5 $ 200 In Dispute

Currently, the system will total the amount for the 3 invoices that have not been collected ($600). But the business would like the system to total the disputed cases amount + amounts that have not been collected and are due/ overdue ($1000)

For this, the developer will need to change the code in the BAdI: UDM_COLL_AMT_C to include the disputed items.

Listed below are the functionality and the parameters that should help the developer to change the code.

<b>Calculate Amount to Be Collected</b>

<b>Functionality</b>

This method is used to overwrite the amount to be collected in the standard. The amount to be collected is calculated for each invoice of a business partner, and therefore, the method is called for each invoice.

Parameters

• I_PARTNER: The current invoice belongs to the business partner transferred as importing parameter. The business partner is of the category IF_UDM_BUPA_TRANSACTION_DATA .

• I_INVOICE: The amount to be collected is calculated for the current invoice. The current invoice is transferred as importing parameter and is of the category IF_UDM_COLLECTION_INVOICE.

• I_RUN_DATE: The date for which worklist items are created.

• R_AMOUNT: Amount to be collected

Transaction Data for Business Partner Description The interface IF_UDM_BUPA_TRANSACTION_DATA represents the business partner in the collection segment. All data required for the creation of worklist items is provided, such as open items, promises to pay, dispute cases, current strategy, and so on.

Invoice in Collections Management Description The interface IF_UDM_COLLECTION_INVOICE represents the invoice or the credit memo of a business partner and the related open items

Date of Worklist Item Definition Date from which the processing of worklist items is to begin: I_RUN_DATE