Introduction
In some business scenarios you will need to update customer credit exposure adding values from an external source or from an internal source that is not considered by standard.
For testing purposes this blog will show how to update credit exposure considering values for special stock W Customer Consignment and it will affect:
- Credit exposure
- Credit check
BAdI UKM_FILL will be used.
Customizing
1. Create Liability Category
This is important in case that credit exposure new values should be listed in a different liability category. If not, it is possible to use a standard one.
Go to SPRO > Financial Supply Chain Management > Credit Management > Credit Risk Monitoring > Credit Exposure Update > Define Liability Categories.
Create Liability Category
For this test Z01 Customer Consignment Stock liability category will be created.
New entry Liability Category
Liability category should be created also as Credit exposure category in SPRO > Financial Supply Chain Management > Credit Management > Integration with Accounts Receivable Accounting and Sales and Distribution > Integration with Sales and Distribution > Define Credit Exposure Categories.
Define Credit Exposure Category
Add Credit Exposure Category
2. Create implementation for BAdI UKM_FILL
Go to SPRO > Financial Supply Chain Management > Credit Management > Integration with Accounts Receivable Accounting and Sales and Distribution > Integration with Sales and Distribution > Customer Enhancements > BAdI: Fill Line Items for Credit Exposure Update.
Create implementation
Write an implementation name.
Implementation name
Note example implementation class in case you want to review SAP example.
Implementation
Activate BAdI.
Activate BAdI
Development
For this particular case FILL_FIELDS method has to be used. In this method you have to add items (the ones with values that you want to add to credit exposure and influence credit check) to IS_NOTIFICATION table.
In order to work properly customer consignment stock should be considered in credit exposure values (customized code) and Fill-Up consignment order and Issue consignment order should not affect credit check and credit exposure.
In order to test this BAdI here is an example code with hardcode values.
method IF_EX_UKM_FILL~FILL_FIELDS .
DATA: ls_in LIKE LINE OF is_notification.
"Without this conditional transaction UKM_CASE will dump.
IF sy-tcode NE 'UKM_CASE' AND sy-tcode NE 'UKM_MY_DCDS'.
CLEAR ls_in.
ls_in-partner = '0001019367'. "BP
ls_in-credit_sgmnt = '1000'. "Credit segment
ls_in-comm_typ = 'Z01'. "Liability category
ls_in-amount = '1300'. "Value added to Credit Exposure
ls_in-currency = 'USD'. "Currency
ls_in-objkey = 'TFBV-00003-3000000001-31001588'. "Object key will be showed in reports
ls_in-objtype = 'MATNR'. "Customized object type
ls_in-date = '20200805'. "Date since BP is carrying debt, it will influence CM behaviour
APPEND ls_in TO IS_NOTIFICATION.
CLEAR ls_in.
ls_in-partner = '0001019367'.
ls_in-credit_sgmnt = '1000'.
ls_in-comm_typ = 'Z01'.
ls_in-amount = '5200'.
ls_in-currency = 'USD'.
ls_in-objkey = 'TFBV-00003-3000000002-31001589'.
ls_in-objtype = 'MATNR'.
ls_in-date = '20200805'.
APPEND ls_in TO IS_NOTIFICATION.
ENDIF.
export UKM_ITEM = IS_NOTIFICATION to memory id 'UKM_ITEM'.
endmethod.
Result in transactions
UKM_COMMITMENTS transaction.
BP transaction.
UKM_MALUS_DSP transaction.
New sales order.
Summary
Adding the right code and just using FILL_FIELDS method in BAdI UKM_FILL is possible to influence customer credit exposure in reports and credit check.
Thanks,
Fidel Yalle
This is a very good content. Thanks for sharing.
We are wondering if we can leverage this BADI even if we don't purchase additional license for Advanced Credit Management
Hi Rochelle! I'm glad the post is useful. If you implement that BAdI be sure that standard liabilities are working properly.
Liabilities of FI/AR are are not saved in a table but are filled when are needed.
And yes, you can use that BAdI in basic SAP FSCM-Credit Management.
If you have some thoughts feel free to contact me.
Best,
Fidel
Great post.
How does credit management work if the BAdi is not implemented. I saw something about a fallback class but unable to locate
Regards
Sridhar
Hi Sridhar,
BAdI is not needed for Credit Management (SAP S/4 Hana FSCM - Credit Management) to work.
If BAdI is not implemented, liabilities are calculated from SD (Open sales Orders, deliveries or invoices) and from FI/AR (Invoices not cleared or another open accounts from customer).
Regards,