cancel
Showing results for 
Search instead for 
Did you mean: 

report_attribute_error_message not highlighting the field?

Former Member
0 Kudos

Hi Experts,

I have a view, where i have two table views.

1. Header

2. Line items

i have a button ' SAVE' - on save i am validating and displaying error message using message manager -> report_attribute_error_message.

Thought i am passing the correct element and attribute name, Attribute in the header table is not being highlighted as error.

Error message is issued.

What could be the problem?

{code

      CALL METHOD wd_this->m_msg_mgr->report_attribute_error_message

        EXPORTING

          message_text = lv_text

          element      = lo_el_node_hdr.

          attribute_name = 'EQUNR'.

code}

What could be the problem? any help is highly appreciated.

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Ajay,

Is the EQUNR field editable in the table? The runtime won't highlight a field if it is read-only or disabled.

Cheers,

Amy

Former Member
0 Kudos

Thanks Amy, I now understand the fact that highlighting is possible only if its editable 😞

Regards,

Ajay

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Ajay.

Did u check the syntax?.Because there is period(.) after element = LO_EL_NODE_HDR.

Try to remove that and check the functionality once.

(OR)

Check the attribute name once i.e 'EQUNR'.

Thanks

Katrice

Former Member
0 Kudos

Hi Katrice,

It tested "report_attribute_error_message' & 'report_element_error_message' and both didn't highlight either the element or the row of table when having error.

period was a typo while pasting the code. I checked syntax and its all fine.

I have used the same functionality before in my earlier projects but not sure why it is not working here and now?

Thanks,

Ajay

Former Member
0 Kudos

you can do like,

data: i type sy-tabix.

loop at lt_your_internal_table into your_structure.

i=i+1.

read lt_your_internal_table into your_structre index i.

lv_text = your_structure-EQUNR.

endloop. 

CALL METHOD wd_this->m_msg_mgr->report_attribute_error_message     

   EXPORTING  

        message_text = lv_text .

if  you sent the code maybe i will help your clearer.

Hope it will helps.

Former Member
0 Kudos

Hi,

I have done the same thing, though error message is issued, the particular line item in table is not highlighted ?

Ajay