cancel
Showing results for 
Search instead for 
Did you mean: 

Checking CR for Data Changes

Former Member
0 Kudos

Hello Experts,

We have a requirement where we need to verify that requester has changed at least one Data field in the CR before submitting it. Basically the requirement is to compare CR Data with Reuse area data & stop the requester from submitting the CR if there is no Data change.

In our scenario, we are deciding the next processor based on Data that is changed in the CR. So currently, if requester submits the CR without making any changes to Data, workflow gets lost because it not able to determine the next processor.

Any clues how can we achieve this ?

Best Regards,

Dheeraj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Everybody,

We have used method io_model -> get_changed fields to see if there is any change or not.

Hope this helps for your requirements in future.

Best regards,

Dheeraj

Answers (2)

Answers (2)

markus_greutter
Participant
0 Kudos

The Convenience AP also provides a nice method for this requirement:

if_usmd_conv_som_gov_api~get_entity_field_changes

Former Member
0 Kudos

Hi Dheeraj

As per Std MDG behaviour if no change is changed is there in exiting object data then no CR will be generated.

Former Member
0 Kudos

Hi Sanjay,

We are on MDG 6.1 & a CR can be created without making any Data change. Are you talking about any specific MDG version ? Do you receive some error message when user tries to submit a CR without any Data changes in that version ?

Best regards,

Dheeraj

michael_theis
Active Contributor
0 Kudos

Hi Dheeraj,

it's valid for all releases that you can create a CR w/o changing any data. This is a feature of MDG that SAP does not intend to change.

The newer releases support a functionality called "Highlight Changes" which determines actuall field changes by comparing the active with the inactive data. But this feature is not part of MDG 6.1. Options for you are either upgrading your MDG system so that "Highlight Changes" is a part of your system, or implementing custom code to compare active and inactive data.

Best regards

Michael

Former Member
0 Kudos

Hi Michael,

Thanks for clarifying the confusion on CR creation.

Regarding comparison of Active & Inactive Data, until a CR is submitted (Requester step), I believe there is no Data available in staging area.

Before submission of a CR, we can get the CR Data using BADI USMD_RULE_SERVICE (similar way when we read CR Data for validations). Can you please suggest a way to read & compare Active Data for the CR ?

Best Regards,

Dheeraj

raghu3
Contributor
0 Kudos

Hi,

You could check method READ_CHAR_VALUE of class CL_USMD_MODEL_EXT. This method has parameter I_READMODE.  Try with value 2 to read inactive data

Regards,

Raghu