Supply Chain Management Blogs by Members
Learn about SAP SCM software from firsthand experiences of community members. Share your own post and join the conversation about supply chain management.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jigang_Zhang张吉刚
Active Contributor
My previous companion article demonstrated the enhancement to add customized fields at Case Management. In this article, I'm going to show how to add customized fields in Dispute management.




Step 1. Enhance at table/structure level


Table UDMCASEATTR00 is for dispute case attributes like case GUID and Amount Paid, etc. Its basic attributes like case type& created time are stored at table SCMG_T_CASE_ATTR which is shared by other cases managed at FSCM like Credit Limit Request or Documented Credit Decision as well.

At this table UDMCASEATTR00, we’re going to add our customized field ZZCRM_COM_NO which is CRM Complain number by appending it at its include structure CI_UDMCASEATTR00.




Step 2. Populate the customized field for dispute case


2.1 Populate the customized field while dispute case been created without user interaction


We can call the function module 'FDM_CASE_CREATE' to create a dispute case(for example from an external CRM system) and insert our new customized field at EXPORTING parameter it_attributes which refer to FDM_ATTRIBUTE.


Only those 3 fields need to be filled like the below example:
* fill CRM Complaint Number
IF dispute_attr-complaint_no IS NOT INITIAL.
CLEAR attributes_wa.
attributes_wa-attr_id = 'ZZCRM_COM_NO'.
attributes_wa-attr_value = dispute_attr-complaint_no.
attributes_wa-xdelta = ' '.
APPEND attributes_wa TO attributes.
ENDIF.

Also, it's possible to update customized fields when call function module  'BAPI_DISPUTE_ATTRIBUTES_CHANGE'  to update attributes of dispute cases. Standard program RFDM3000 can be used as a reference for Dispute Case creation.

2.2 Populate the customized fields by using BADI implementation


Here we can use BADI: FDM_AR_DISP_COMPLETE (which is for FSCM-DM: Completion of Dispute Case before Saving) and implement its method ‘COMPLETE_DISPUTE’. Append field name as attribute ID along with its attribute value to the changing parameter C_ADDITIONAL_ATTRIBUTES like below.




2.3 Populate the customized fields manually by the user while dispute case been created


For example, Extra customized fields are required when users try to create a Dispute Case manually at FBL5N like below.


Here need to create a screen Enhancement implementation using BADI: FDM_USER_SCREEN for the dispute case creation screen.


This BADI: FDM_USER_SCREEN contains four methods, here just implement the first 3 methods.

2.3.1 Method GET_CREATE_SCREEN (FSCM-DM: Define User Screen during Creation)


Create customized screens include customized fields and customized programs for this new screen sector at screen editor. And declare screen number and program name like below:
  method IF_EX_FDM_USER_SCREEN~GET_CREATE_SCREEN.
E_DYNNR = '9001'.
E_PROGNAME = 'Zz_program_name'.
endmethod.


2.3.2 Method CREATE_SCREEN_PBO (FSCM-DM: PBO Event of the User Screen for Creation)


You can put PBO code here like a drop-down list for a specific field or customized F4 search help at this method.
  METHOD if_ex_fdm_user_screen~create_screen_pbo.
TYPE-POOLS : vrm.
DATA: ld_field TYPE vrm_id ,
it_listbox TYPE vrm_values,
wa_listbox LIKE LINE OF it_listbox.
DATA: it_tab TYPE STANDARD TABLE OF udmattr_rccodet,
wa_tab LIKE LINE OF it_tab.
* Search help for field FIN_ROOT_CCODE
refresh it_tab.
SELECT * FROM udmattr_rccodet
INTO TABLE it_tab
WHERE langu EQ 'E'.

refresh it_listbox.
LOOP AT it_tab INTO wa_tab.
wa_listbox-key = wa_tab-root_ccode.
wa_listbox-text = wa_tab-description.
APPEND wa_listbox TO it_listbox.
ENDLOOP.
sort it_listbox by key.
delete ADJACENT DUPLICATES FROM it_listbox.

ld_field = 'UDMCASEATTR00-FIN_ROOT_CCODE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = ld_field
values = it_listbox.

ENDMETHOD.


2.3.3 Method CREATE_SCREEN_PAI (FSCM-DM: PAI Event of the User Screen for Creation)


The key place to populate customized fields from user inputs accordingly.
 METHOD if_ex_fdm_user_screen~create_screen_pai.
DATA: wa_attr TYPE LINE OF fdm_t_attribute.
DATA: l_dynpro_program LIKE sy-repid,
l_dynpro_number LIKE sy-dynnr,
lt_dynpfield TYPE TABLE OF dynpread,
wa_dynpfield LIKE LINE OF lt_dynpfield.
*-------------------------
* 1,Get screen values
*-------------------------
l_dynpro_program = 'ZXXX_PROGRAM_NAME'.
l_dynpro_number = '9001'.
CLEAR wa_dynpfield.
REFRESH lt_dynpfield.

MOVE 'UDMCASEATTR00-ZZ_FIELDS' TO wa_dynpfield-fieldname.
APPEND wa_dynpfield TO lt_dynpfield.

CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = l_dynpro_program
dynumb = l_dynpro_number
TABLES
dynpfields = lt_dynpfield.

*----------------------------------------
*2, Pass Z field to Dispute attribute
*----------------------------------------
wa_attr-attr_id = 'ZZ_FIELDS'.
CLEAR wa_dynpfield.
READ TABLE lt_dynpfield INTO wa_dynpfield WITH KEY fieldname = 'UDMCASEATTR00-ZZ_FIELDS'.
wa_attr-attr_value = wa_dynpfield-fieldvalue.
APPEND wa_attr TO e_user_attributes.
CLEAR wa_attr.
...
ENDMETHOD.

Besides, we can implement BADI 'SCMG_CASE_FCODE_S' to display the customized screen when clicking the customized button (mapping to Case: Function Code in Frontend SCMG_UI_FUNC) at the toolbar of the dispute case screen.

 

Step 3. Display this new field at Dispute case Header Level


After populating the value of this field, we need to display this field at the header level of the dispute case by using configurations SPRO path: FSCM->Dispute Management->Dispute Case processing->Attribute Profile->Create Attribute Profile. 


Find your company's attribute profile which table name is 'UDMCASEATTR00' and go to its attribute group, then all fields are listed at 'Assign Attributes'. Insert the customized field and assign its group and row/column number accordingly.


Here controls the position where to display this customized field at Header data by setting row number and column number.

 

Final step. Display this new field at the dispute case search screen


Same as customized fields for the DCD search screen, We need to enable this field as a search field at the search screen for dispute cases by configuration SPRO path: FSCM->Credit Management->Credit Risk Monitoring->Documented Credit Decision->Create Profile for Case Search.


At your case search profile for dispute cases, insert the customized field and assign its row/column accordingly.


Then we can get this field at the dispute case selection screen:




Conclusion:


By structure enhancement,  BADI implementation, and several configuration steps we can add a customized field for the dispute case and enable it at the dispute case search screen. It works at FSCM_CCD with release 617, not tested but very likely the same at S/4 Hana as well.
11 Comments
suganya_rangarajan
Participant
0 Kudos
Thanks for your blog. This is very helpful.
Jigang_Zhang张吉刚
Active Contributor
0 Kudos
suganya.rangarajan Thanks for the comments : )
suganya_rangarajan
Participant
0 Kudos
Hi,

I added a listbox to the screen as mentioned in the blog. I also added the list in the PBO method with VRM_SET_VALUES. but the screen does not get updated with the values. The dropdown list is blank.

I also tried to update the list with DYNP_VALUES_UPDATE function. Neither of the function works in PBO method.

Thanks

Suganya
Jigang_Zhang张吉刚
Active Contributor
0 Kudos
suganya.rangarajan

As can't check your code, maybe the issue could be Method GET_CREATE_SCREEN. Set more break-points and check step by step : P
suganya_rangarajan
Participant
0 Kudos
Thanks for your quick turnaround.

The listbox is visible in the screen but the values are not getting updated to screen from Create_screen_PBO.

 

Thanks

Suganya
former_member641738
Discoverer
0 Kudos

Thank you, it is very useful article!
In the case search screenshot I noticed the Coordinator field. When I try to add it to case search profile settings it is not available in the dropdown list of SCMG_T_CASE_ATTR attributes. However it is available in the 'Attribute Profile'  dropdown list of the same table. Can you please advise how this can be added to the case search attributes?
Thanks in advance.

Jigang_Zhang张吉刚
Active Contributor
boy1134

The coordinator at the dispute case search screen is field FIN_COORDINATOR of table UDMCASEATTR00, that's why you can't find it in the dropdown list of SCMG_T_CASE_ATTR attributes.

Usually, we use table UDMCASEATTR00 as a profile source for dispute cases; UKM_DCD_ATTR for DCD cases, UKMCASEATTR00 for Credit Limit Request cases. Meanwhile, table SCMG_T_CASE_ATTR is the case master table shared by all the above cases. Means fields of SCMG_T_CASE_ATTR are available for all cases. So please use UDMCASEATTR00 instead for your profile.
0 Kudos

Hi,

I need to add customised fields like Vendor, issue type, claim number, assignment, reference key 1etc. Please suggest if we can add these fields in UDMCASEATTR00 table.

Jigang_Zhang张吉刚
Active Contributor
0 Kudos
Yes sure, you can add those fields.
former_member785182
Discoverer
0 Kudos
Hey Can you also help with how to transfer these custom fields from ECC to CRM. What are the enhancements you did to replicate these custom fields. Appreciate your help.
Jigang_Zhang张吉刚
Active Contributor
0 Kudos
@sidhu127

To sync those Z fields from ECC to CRM, mostly RFC been used and no more enhancements besides those screen enhancements from my end.
Labels in this area