Skip to Content
avatar image
Former Member

Field highlighting with error message in SAP MDG-M 8.0

Hi Experts,

We are implementing SAP MDG 8.0 for material. Now, for custom error messages we are using BADI usmd_rule_service ( single entity BADI) , method IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY.

Now, in the code we append the changing parameter ET_MESSAGE table with custom messages. The messages comes all right in the screen as hard stop, that is ok. But it does not highlight the concerned field with red as it happens for standard messages.

The code I am using is as below :

ls_message-fieldname = 'MATKL'.
ls_message-msgid = 'ZMDGM'.
ls_message-msgno = '008'.
ls_message-msgty = 'E'.
APPEND ls_message TO et_message.

Any idea how it can be done?

Many thanks,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 03, 2017 at 08:22 PM

    Hi ,

    This can be achieved probably by populating the entity services message table. I am not sure how you implemented the validation process. However, by looking at the provided validation implementation it should be clear that the entity services class have a Message reference where you need to update the attribute details. For instance, look the below code excerpt where the attribute detiails are updated with the message class.

    * iv_tabstrip =
     iv_attribute = if_usmdz_cons_attributes=>gc_attr_accgrpacc
    * iv_msgid =
     iv_msgno = '019'
    * iv_msgv3 =
    * iv_msgv3_attribute =
    * iv_msgv4 =
    * iv_msgv4_attribute =
     ct_message = lt_message ).


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Pavan,

      Thanks for the quick reply. i have implemenetd the code but there seems to a customising which is required. When I click on check I am getting the message as 'No message type defined for message "017(ZMDGM)" in Customizing.

      Can you kindly share where do I need to maintain this setting..I guess its somewhere in MDGIMG?



  • Apr 18, 2017 at 01:22 PM

    Hi Saikat,

    I am also facing the issue while trying to make the message as link to the field in material. Can you please share the answer, how you achieved this ?



    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23, 2017 at 08:21 PM

    Dear All,

    I have achieved this by giving hyperlink in custom message.

    Follow below link.


    Sachin Kapoor

    Add comment
    10|10000 characters needed characters exceeded