cancel
Showing results for 
Search instead for 
Did you mean: 

Set mandatory fields in General Data for the CR.

riaan_oosthuizen2
Participant
0 Kudos

Hi Experts,

We have noted that Description is set as required field when we create a new change request in MDG.

We could not find these fields in the data model.

Can you please indicate how we could set other fields as mandatory, example Due Date and Priority in the General Data section.

Thanks and best regards

Riaan

Accepted Solutions (0)

Answers (2)

Answers (2)

d024348
Employee
Employee
0 Kudos

Hi Riaan

Depending on the release state and object you want to maintain, BAdI USMD_CREQUEST_UI "Customize User Interface for Change Requests" might be what you are looking for.

So e.g. for custom objects up to MDG6.1, this approach would work.

Good luck, Ingo

Former Member
0 Kudos

You are absolutely right, the CR header fields are not in the data model as it does not make sense to be there. The data model contains your business application fields and the CR header is intended to control the approval process only.

In order to change those fields, there are a couple of ways:

  • Using the GenIL model only:
    • In transaction GENIL_MODEL_BROWSER, create an enhancement to model CR. In this model you can see the fields under the root object CR_Root. Expand the attribute structure BSS_CRIL_ROOT_ATTRIBUTES. Then, click on the field you want to make mandatory and change the "attribute property" to Required Entry.
    • Note, this method will make the field required for ALL change requests.
  • Programmatically:
    • First, find the handler class of the CR GenIL model. Again, go to transaction GENIL_MODEL_BROWSER and double click the root object. In the details section, scroll all the way down and you will find the handler class CL_USMD_CR_GIL_ROOT.
    • Create a sub-class to CL_USMD_CR_GIL_ROOT and redefine method GET_ATTRIBUTE_PROPERTIES.
    • In this method you can dynamically change the property of the different header fields as you like (meaning that you can find out the data model and then change the properties accordingly).
    • Create an enhancement to GenIL model CR and change the root object handler class to the new sub-class.

See this document on how to enhance the CR header with new fields. I find it useful in learning how to deal with the CR header enhancement in general: https://scn.sap.com/docs/DOC-47630


riaan_oosthuizen2
Participant
0 Kudos

Hi Abdullah,

Thanks for very helpful information. I have created the enhancement but noticed that I can't change the Attribute properties. Thus even if I am in the change mode it still disables the fields for editing. Any suggestions?

Thanks and best regards

Riaan

Former Member
0 Kudos

I think the first method I described will not work (my bad as I should have checked first). It looks like you are left with the second method (enhancing the handler class). If you double-click the root object in the enhancement, the handler class name can be changed.

Former Member
0 Kudos

Hi Abdullah

I added business area as new CR Header fields in GenIl, Also I make's its attribute as Required Type but eventhough it is optional only when we execute MDG CR. Any hint?

Former Member
0 Kudos

You need to check the SET_PROPERTY or SET_ATTRIBUTE method (not sure which). They might be over-riding the property you set in the GenIL model.

Former Member
0 Kudos

Hi Abdullah

After setting GenIL arrtribute parameter as Required we can see  field with mandatory astrick in FPM customization only. But at run time it updated with optional only.