Governing SAP Credit Management with SAP MDG
SAP Credit Management is until SAP MDG release 1909 still not part of SAP MDG. It is still unclear when and how the solution will be delivered by SAP and in which release. According to SAP Roadmap for SAP MDG on SAP S4/HANA 2020 which is described here there will be some new entities added to cover some parts of SAP Credit Management.
- New entity FS_BP1012 for Credit Ratings (Table BP1012)
- New Entity FS_BP1010 for Creditworthiness (Table BP1010).
- New Entity BP_CM_BP for Credit Scoring.
The question so far is, if your customer asks or requires to implement SAP Credit Management in their current SAP MDG version, then how to fulfill this. So for this requirement, basically there are 2 options we can do.
Option 1. Set Default Values for Credit Management using Derivation and Decision Table (BRF+).
Creating decision table in BRF+ to store the required default values which will be set for each business partner which has the role UKM000 during creation process. This will be the simplest solution although the drawback is that we cannot manage the values for each business partner.
Specific values for business partner can be defined based on general properties such as country of existing address or account group.
As general, the structure of decision table can look like this below:
The expected return values are table name (CM_TABLE), field name (CM_FIELD), and expected default value (VALUE).
For this requirement, this derivation is expected only during creation of a customer and the values are applied also for the whole customer. So in decision table it is enough to use change request type and change request step.
To get those values from decision table, we can use standard class from SAP:
TRY. cl_fdt_function_process=>process( EXPORTING iv_function_id = lv_function_id iv_timestamp = lv_timestamp IMPORTING ea_result = lt_values CHANGING ct_name_value = lt_name_value ). CATCH cx_fdt INTO DATA(lx_fdt). <<exception handling>> ENDTRY.
The default values derived from decision table can now be assigned to the corresponding structures in function module UKM_DB_UKMBP_CMS_EXECUTE. To use this function, only N-parameters need to be considered as shown below:
CALL FUNCTION 'UKM_DB_UKMBP_CMS_EXECUTE' TABLES n_ukmbp_cms = lt_ukm_s_bp_cms_upd n_ukmbp_cms_sgm = lt_ukm_s_bp_cms_sgm_upd n_vector = lt_ukm_s_bp_vector_upd. Assignment of important parameters: * set partner number ls_ukm_s_bp_cms_upd-partner = lv_partner_id. ls_ukm_s_bp_cms_sgm_upd-partner = lv_partner_id. ls_ukm_s_bp_vector_upd-partner = lv_partner_id. * set all change flag with U for Update ls_ukm_s_bp_cms_upd-change_id = ‘U’. ls_ukm_s_bp_cms_sgm_upd-change_id = ‘U’. ls_ukm_s_bp_vector_upd-change_id = ‘U’. * map data from decision table (lt_values) into itab for FM UKM_DB_UKMBP_CMS_EXECUTE LOOP AT lt_values ASSIGNING FIELD-SYMBOL(<fs_value>). <<assign based on table-field into corresponding field in each n-internal tables>> ENDLOOP. APPEND ls_ukm_s_bp_cms_upd TO lt_ukm_s_bp_cms_upd. APPEND ls_ukm_s_bp_cms_sgm_upd TO lt_ukm_s_bp_cms_sgm_upd. append ls_ukm_s_bp_vector_upd to lt_ukm_s_bp_vector_upd.
Option 2. Create Custom Entity (Z-Entity)
Creating custom entity which can be visualized as UIBB in SAP MDG UI. With this option we can visualize the governance of SPA Credit Management and the governance of each business partner is possible. Although the drawback in terms of more complex implementation and more coding effort is unavoidable.
This new entity will be part of BP_HEADER entity.
That will be the end of my first blog post here and I hope, this will give us an overview how we can handle SAP Credit Management in SAP MDG, especially with SAP MDG version where SAP Credit Management is not yet supported. I really appreciate your thoughts and feedbacks for further improvements.
Details about the delivered improvements for S/4HANA 2020 for can be found in SAP Note 2221398 and in the presentation What's new in central governance (chapter What’s New information in blog for SAP Master Data Governance at a Glance)
The attributes are added as new entity types:
Ratings: Back-end table BP1012 as entity type FS_BP1012
Creditworthiness: Back-end table BP1010 as entity type FS_BP1010
Credit Scoring: entity type BP_CM_BP. The UIBB only shows the attribute “Risk Class”.