cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighting Mandatory fields on UI

0 Kudos

Hi All,

I have made a field mandatory through feeder class and implemented CHECK_ENTITY in usmd_rule_service to show error message for blank value.


Field is marked in asterisk(*),but the field is not highlighted in red on throwing error message.

I have tried using method of request_focus_on_field of io_extended_ctrl but even then field is not highlighted.

Please provide a solution on this.

Thank You!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member218472
Participant
0 Kudos

Hi Shruti,

Did you clear the et table, i think for every event it is entering in to feeder and appending prev. message. That is why you see multiple times ?.

Thanks,

Mahesh

0 Kudos

Every time after coming out of post exit the et_messages shows no messages.

Where can i check the messages appended in et table including my custom messages?

former_member218472
Participant
0 Kudos

in the et_message table you have a field : FIELDNAME , try to fill it and check it.

Thanks,

Mahesh

0 Kudos

I did try filling the 'FIELDNAME' parameter,but it doesn't seem to work.

So tried through feeder class,here the field is highlighting but the same error message is shown mulitple times on UI.

One error message with link to field and same error message repeating without link.

Please suggest.

former_member218472
Participant
0 Kudos

Hi Shruti,

In ET_MESSAGE there is field "ref_name" , provide your attribute name for the same.

Eg :

<ls_message>-plaintext = 'Application Configuration Value Missing'.

<ls_message>-ref_name = 'APPL_CONFIG'.

<ls_message>-severity = 'E'.

In the above case APPL_CONFIG is my Attribute.

You can understand why ref_name is important now :-).

Hope this helps.

Thanks,

0 Kudos

Hi Mahesh,

I'm writing validation in check_entity of usmd_rule_service.

there we don't have ref_name.So i have wrote below code using ROW of ls_message,but

even then the field is not highlighting in red.

I'm trying to highlight custom field added in MATERIAL entity.

ls_message-row is returning value but even then it's not working.

clear ls_message.
message e000(zmdg_mat_msg) into lv_msg.
ls_message-msgid = sy-msgid.
ls_message-msgno = sy-msgno.
ls_message-msgty = sy-msgty.

call method io_model->create_data_reference
exporting
i_fieldname = lc_fieldname_matnr
if_table = space
importing
er_data = lo_data.


if lo_data is bound.
****fill keys
assign lo_data->* to <lfs_mod>.
if <lfs_mod> is assigned and sy-subrc = 0.
assign component 'MATERIAL' of structure <lfs_mod> to <lfs_fld2>.
if sy-subrc = 0.
assign component 'MATERIAL' of structure <ls_data> to <lfs_fld>.
if sy-subrc = 0.
<lfs_fld2> = <lfs_fld>.
endif.
endif.
endif.
endif.

if lo_data is bound.

ls_message-row = cl_mdg_bs_key_row_map_service=>set_key( is_key = lo_data
iv_entity = lc_material
iv_fieldname = lc_user_group ).
endif.
append ls_message to et_message.
endif.
endif.

Please suggest.