Technical Articles
Customized fields at Case management of FSCM
It’s very common to add customized fields to more closely align with your own business needs. In this article, you will find the method to add customized fields for Documented Credit Decision (DCD) as well as enable it at the SCASE search screen.
Step 1. Enhance at table/structure level
Table SCMG_T_CASE_ATTR is for case general attributes like case ID, created details which used by all cases managed at FSCM like Credit Limit Request or Documented Credit Decision.
Table UKM_DCD_ATTR contains attributes like Business Partner Number and Credit Segment which specific for Documented Credit Decision. At this the table, we’re going to add our customized field ZZBILL_COCD company code by insertion at include structure CI_UKM_DCD_ATTR.
Step 2. Populate the customized field by creating BADI implementation
Here we are using BADI: UKM_SE_UKM_DCD_MNTNO and implement the method ‘INBOUND_PROCESSING’ (BADI UKM_DCD_MAINTAIN can achieve the same).
- Get sales order number from output parameters OUT by checking its attribute ‘DCD_OBJ_ID’ which against order number at DCD.
- Get company code from sales order and populate the company code to this new field which is OUT-ADD_ATTRIBUTES-ZZBILL_COCD.
Step 3. Display this new field at DCD Header Level
After populating the value of this field, we need to display this field at the DCD header level by using configurations SPRO path: FSCM->Dispute Management->Dispute Case processing->Attribute Profile->Create Attribute Profile. (Please note here is not belong to Credit management but dispute management instead.)
Find your attribute profile for DCD, go to attribute group then assign attributes:
Here controls the position where to display this customized field at Header data by setting row number and column number. After this configuration, the billing company code list in column 2 and line 12.
Final step. Display this new field at the case search screen
We need to enable this field as a search field at the search screen by configuration SPRO path: FSCM->Credit Management->Credit Risk Monitoring->Documented Credit Decision->Create Profile for Case Search.
Then we can get this field at case selection screen:
Conclusion:
By structure enhance, BADI implementation, and several configuration steps we can add a customized field for Documented Credit Decision (DCD) and enable it at the case search screen. It works at FSCM_CCD with release 617, not tested but very likely the same at S/4 Hana as well.
Hi,
looks good material .
thank you
Claudio
I want to configure Critical field in FSCM, if my payment term is change at sales order then sales order should block. How can we configure in S4 hana, please explain the steps to figure this
Hi Jigang Zhang,
I have done change like above mentioned. But the BADI's are not triggering. Could you please let me know any configuration is required.
Thanks
Jayasunder
@Jayasunder Reddy Banda
that BADI doesn't need configuration. Please check if BADI implement is activated or not?
Hi Jigang Zhang,,
After implemented and activated the BADI and another issue started is that Case ID is not creating. It is critical issue after above steps done in my system.
PLease let me know root cause?
Thanks
Jayasunder
Have you got any dump or update termination? Try some luck with the tcode SM21 filter by your name and creation range. I guess maybe some fields can't pass the validation before creation.
If no founding then has to debug... find the creation FM first (I'm no system access now, should have one) and trace whether it's been triggered or not.
Hi Jigang Zhang,
Once i was revert back changes ( you mentioned the Blog ), now system is creating Case ID and able to see in SCASE.
Requirement:
The credit limit is more, system showing popup related Credit management while sales order creation. I need add some more new fields in SCASE and populate values for credit management.
Please let me know steps to reach goal.
Thanks
Jayasunder
Please just follow the step1&2 of this blog, extend the structure, get the inputs from the signature, write your logic and populate those Z fields at that BADI implementation, active it, and set break-point check whether it's running as expected.
If the error happens, any error message/dump? Keep logic simple at first and make sure it's working then add more~ good luck
Hi Jigang,
Thanks for the Blog,
I tried the same till adding field to the structure, but when it comes to badi I can't find the sales document number in the signature can u please provide a screen shot of what you have done and the also the screen shot of the code you have written for lv_bukrs.
@Karthick D
Try to get an SO number like below:
Hello Jigang,
Thank you for detailed explanation. I have gone through all the steps of BADI and Customization.
Fields are showing correctly in Header and also in Selection Criteria but are not getting filled. The reason behind this is BADI not being called. I activated both the BADIs - UKM_SE_UKM_DCD_MNTNO and UKM_DCD_MAINTAIN and put the breakpoints. But none of these is getting called while doing the Search in DCD.
Can you please let me know if some other step has to be done.
Regards,
Harsh Bansal
Harsh Bansal
'But none of these is getting called while doing the Search in DCD.'
If I remember correctly it'll be triggered at the creation of DCD instead of searching in DCD or changing. It's a kind of standard interface between SD and FSCM as standard DCD is created automatically after sales orders are created.
If you populate Z fields at change try BADI: SCMG_CHNG_BFR_STR_C.
Hello Jigang,
Actually we created multiple new Orders/Cases after that as well. Still BADI was not being called and hence new fields are still not getting filled.
Regards,
Harsh Bansal
Harsh Bansal
if you set a breakpoint there, maybe it'll not be triggered as it's not frontend running. Check your BADI, if not sure it's been called try to create an endless loop and catch it at SM50 to see what's happens.
Hi Jigang,
Thanks for detailed blog on adding custom fields. As we too have custom fields which are added and now the requirement is to have the same custom fields in the search results of the ALV Layout. Can this custom field added to this ALV layout.
Thanks in advance.
Best Regards / Venkat
VENKATESH B
Yes, it'll display as this ALV using structure UKM_S_DCD_ATTR_ALV which contains the included structure CI_UKM_DCD_ATTR.
Thanks Jigang for the quick clarification. I'll try this.
Hello Jigang Zhang,
I hope you are doing well. We are troubling the sames issue as other consultants mentioned. We added related custom field to the structure successfully. However, when we used this BADI:UKM_SE_UKM_DCD_MNTNO and we put break points in it. However, we were not be able to break in it. Our case is, we would like to add this custom field to the search ALV. We created new sales order for DCD but even if we were not be able to reach this BADI.
If you can share your comments on that it will be appreciated.
Best regards,
Please check or add some signs to make sure BADI has been activated & Called like an endless loop or update some fields for the dummy Z table cause some BADI will not trigger while DCD creation especially if it's been processed by like web methods that run in the background.
Hello Jigang & Venkatesh,
We faced the same problem that both BADI are not triggered.
Any idea?
Thanks,
Shaobo K
Shaobo Kuang
I'm not sure whether the breakpoint has not been triggered or this BADI has not been triggered at all, please check or add some sign to make sure BADI has been activated & Called. I don't have a suitable case to check currently, I remember some BADI will not trigger breakpoints when DCD has been created (will trigger when it's been changed) cause we're using web methods way to deal with DCD-related interface methods.
If all no issues from the BADI impl, maybe this BADI is not suited for your system...
Jigang,
Thanks.
It seems that the other Badi is triggered (UKM_DCD_MAINTAIN).
Another question here. When implementing this Baid, it requires a structure CI_UKM_DCD_ADD_ATTR, which is not in our system. If I create it, this CI structure should include only znewfield, or should all the fields from UKM_DCD_ADD_ATTR.
Thanks,
Shaobo Kuang
Shaobo Kuang
not required, only Z fields are required for CI_UKM_DCD_ADD_ATTR.
Jigang,
Thanks. It works.
Shaobo Kuang
Hi Jigang,
Thanks for the very detailed blog on setting up the customizing fields for DCD cases.
Our requirement was to assign the existing fields in DCD such as Person Responsible, Approver 1, Approver 2
Thanks & regards,
Noman
Hi,
I have activated the BADI but the value is not getting updated in the New field.
I am not able to debug the BADI to check the issue . The system I am using is S4 HANA 2020.
Can u please guide me the steps to debug:-
I have Put the breakpoint on the BADI.
Created a Sales order with credit block.
Than i wait for the debugger to start but it never does. The credit case is created with blank values.
I even tried applying infinite loop but no luck.
Please help me on same