Skip to Content
0

Field highlighting with error message in SAP MDG-M 8.0

Jan 03, 2017 at 03:17 PM

491

avatar image

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,

Saikat

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Pavan Bhamidipati Jan 03, 2017 at 08:22 PM
0

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.

dr_entity_services->dr_message->add_message_to_table(
 EXPORTING
* 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 =
 CHANGING
 ct_message = lt_message ).

Thanks,Pavan

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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?

Thanks,

Saikat

0
chandan mishra Apr 18, 2017 at 01:22 PM
0

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 ?

Thanks

Chandan

Share
10 |10000 characters needed characters left characters exceeded
sachin Kapoor Apr 23, 2017 at 08:21 PM
0

Dear All,

I have achieved this by giving hyperlink in custom message.

Follow below link.

https://answers.sap.com/questions/147935/how-to-give-hyper-link-to-custom-message-in-sap-md.html?childToView=152159#answer-152159

Thanks

Sachin Kapoor

Share
10 |10000 characters needed characters left characters exceeded