Skip to Content
Technical Articles
Author's profile photo Fidel Yalle

Credit Exposure Update


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.


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.



Activate BAdI.


Activate BAdI


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.


  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


    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'.


  export UKM_ITEM = IS_NOTIFICATION to memory id 'UKM_ITEM'.


Result in transactions

UKM_COMMITMENTS transaction.

BP transaction.

UKM_MALUS_DSP transaction.

New sales order.


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.



Fidel Yalle

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Rochelle Zabalerio
      Rochelle Zabalerio

      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

      Author's profile photo Fidel Yalle
      Fidel Yalle
      Blog Post Author

      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.



      Author's profile photo Sridhar Ramaswamy
      Sridhar Ramaswamy

      Great post.

      How does credit management work if the BAdi is not implemented. I saw something about a fallback class but unable to locate






      Author's profile photo Fidel Yalle
      Fidel Yalle
      Blog Post Author

      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).


      Author's profile photo Purna Chandra Gunda
      Purna Chandra Gunda

      Hi Yalle


      Thank you for sharing the post which gives the opportunity to visualize the possibility to add a new Credit Exposure category.

      I have the following question, and I hope you may have the suggestion.

      Issue: Our requirement is to take the entire Sales Order Value in credit exposure, irrespective of the available quantity in Sales Order items.

      I understand we can alter to take the entire Sales order value from BADI BADI_SD_CM and through  Implementation Method FSCM_COMMITMENT_UPDATE_ORDER and FSCM_CREDIT_CHECK_ORDER, and able to check the entire Sales order value as part of credit check and in checked value (FOr a credit case), but not able to update the entire sales order value in Credit exposure (UKM_COMMITMENT), it still updates only the value of Sales order for which we have the stock available.

      When we tried to implement UKM_FILL - It creates multiple case ID's for the same Sales Order and was not able to find it being updating the entire sales order value in Credit exposure.

      Do you have some suggestions to resolve our issue?





      Author's profile photo Fidel Yalle
      Fidel Yalle
      Blog Post Author

      Hi Purna,

      Being that the standard is still taking the value of the sales order based on the stock available. I think one option to fulfill the requirement is using FM UKM_COMMITMENTS_UPDATE.

      You can use that function to update values for sales order already transferred to Credit Management, SAP tables you have to check first are UKM_ITEM and UKM_EXT_GUID.



      Author's profile photo Ajay Maheshwari
      Ajay Maheshwari

      Hi Purna

      The credit exposure / credit check is a function of two things - Confirmed Qty from Schedule lines in sales orders and Credit Price (the line in your SD pricing procedure where you put A in the Sub-totals column)

      With what you said, I think your schedule lines are updated based on available stock qty. Can you check that and confirm? If yes, that's our root cause. To address that, we need to overwrite the "confirmed qty" from schedule lines to "order qty". In my opinion, BADI_SD_CM carries this info from sales order to FSCM-CR. So, explore this BADI





      Author's profile photo Ajay Maheshwari
      Ajay Maheshwari

      Hi Fidel

      1. is it not possible to achieve the same from Badi_SD_CM, method Update_Commitment_From Order or Delivery?

      Is using UKM_FILL mandatory in this case?

      2. I always wonder what is the purpose of UKM_FILL. Once you activate the UKM_R3_ACTIVATE, the FI-AR values are read in real time. What business cases you think will qualify for UKM_FILL - methods FILL_VECTOR?




      Author's profile photo Fidel Yalle
      Fidel Yalle
      Blog Post Author

      Hi Ajay,

      1.I haven't tried that BAdI. Taking note for future requirements.

      2.With UKM_FILL you can set values no filled directly from standard or from an external source (values from FI-AR are standard and transferred in real time as you said).



      Author's profile photo Ajay Maheshwari
      Ajay Maheshwari

      Thanks Fidel.

      1. Do you know what the method FILL_VECTOR is used in Badi UKM_FILL? I am clear about method FILL_FIELDS after your blog

      2. I was also wondering what’s the difference between tables UKM_ITEM and UKM_TOTALS. Both contain same data. Are you aware which table is used when or if anyone of them is obsolete ?




      Author's profile photo Punjabi records
      Punjabi records

      Nice post...very informative....helped me lot

      Author's profile photo Ankur Jain
      Ankur Jain

      Thank you for this good Post.



      Ankur Jain

      Author's profile photo Carlos Ignacio Baez
      Carlos Ignacio Baez

      Hi fidel, if the Credit Exposure is not being updated automatically, how can I force it.

      What can I verify, any log?
      Author's profile photo Fidel Yalle
      Fidel Yalle
      Blog Post Author

      Hi Carlos, sorry for the late response.

      About your question, you can "force" items in Credit Exposure adding entries to table UKM_ITEM or for that matter using FM UKM_COMMITMENTS_UPDATE.


      Author's profile photo Nilesh Sonawane
      Nilesh Sonawane

      Hello All ,

      We have horizon concept for direct sales.If requested delivery date after horizon then system not consider particular sales order for credit exposure.

      Our client have similar requirment for third party sales.If we have sales order for future requested delivery date than system should not consider for credit exposure till the horizon period

      Example -

      Consider horizon = 30 days.

      If we are creating sales order on 01.06.2022 and requested delivery date is 01.08.2022 then system should not update credit exposure while saving sales order and allow to perform susequesnt task like creation of PR /PO.

      System should consider particular sales order for credit exposre before 30 day of delivery.Means credit exposure should be updated on 01.07.2022.

      kindly suggest if we can use above S/4 HANA funcationality for this requirment.




      Author's profile photo Yusuf Avci
      Yusuf Avci

      Hi Fidel,

      Firstly, thank you for your useful blog post.

      I have implemented the Badi UKM_FILL - FILL_FIELDS for consignment per your description. And not filled other methods in UKM_FILL. And it works for consignment document type properly.

      When I create sales order which is not related to inside of UKM_FILL -> FILL_FIELDS codes and consignment process , credit exposure is not reflected. But it was works before Badi implementetion.

      When I run program UKM_RVKRED77, I can see the sales order but it would not create a line in UKM_COMMITMENTS.

      In note 2742707 mentioned it about. Is there any solution please?