cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP MDG: For Change CR Type - while changing any field data Error Message to be perform

sandeep_suggu
Contributor
0 Kudos
1,176

Hi

For Change CR Type - soon after clicking on edit on Change Request & if any of the field getting change, error message should get display.

How to perform this for above, Like how to get the changed fields data before submit of CR ? 
From my side tried several methods to get, but nothing worked.

Thanks & Regards, 
Sandeep Suggu.
(SAP MDG Consultant)

SAP Master Data Governance SAP S/4HANA 

Accepted Solutions (0)

Answers (2)

Answers (2)

adityaIngale66
Active Participant
0 Kudos

Hi @sandeep_suggu ,

You can try using the cross-entity derivation BADI. You can read the changed data using the IO_CHANGED_DATA parameter and write the required message in the ET_MESSAGE_INFO parameter, based on your requirements. However, this message will appear as an informational message on the UI.
To change the information message into an error message, you can refer to the blog below.

https://community.sap.com/t5/technology-blogs-by-sap/allow-error-messages-for-mdg-rule-derivation-ba... 

Best Regards,
Aditya

0012anirban
Contributor
0 Kudos

Hi Sandeep,

Could you please elaborate, on what do you mean by any field is changed?

Please share a specific use case of what is the scenario. 

You can also use CL_USMD_MDF_CHANGE_DOCUMENT class to read change documents of an MDG CR.

Regards

Anirban

sandeep_suggu
Contributor
0 Kudos

Thanks for the replay Anirban, @0012anirban 

sandeep_suggu
Contributor
0 Kudos

Thanks for the replay Anirban, CL_USMD_MDF_CHANGE_DOCUMENT it will be happening after submission of CR. But Actual scenario required is once USER entered into change CR Type, if changing any field error message should get display.

@0012anirban 

0012anirban
Contributor
0 Kudos
@sandeep_suggu, So you mean you don't want the user to change any fields ?
sandeep_suggu
Contributor
0 Kudos

@0012anirban 

First Step: USER Opened existing CR & click on edit 

SugguSandeep_2-1735859091284.png

Now user tried to change, Name1 field (testing business partner to testing business partner - supplier) 
At the time of giving new data in Name1 field error message should get prompt 

SugguSandeep_3-1735859585186.png


 














I hope it's clear now 🙂

Note: Once It's get done, I will performing another logic to clear the error message 

Thank You, 
Sandeep Suggu.


0012anirban
Contributor
0 Kudos
@sandeep_suggu: I get the scenario, however the follow up question would be, what is the purpose of the first error message? And what would be the subsequent logic which you would perform clearing of the message. I am trying to understand what business case you are trying to build here. On the other hand, you can look at highlight changes standard logic to see how standard identifies changed fields during CR processing. But that would have severe performance implications on your application.
sandeep_suggu
Contributor
0 Kudos

@0012anirban 

Soon after changing NAME1 Field - Error Message will be getting, so USER has to upload one document type. Once uploading done error message going to get vanish