cancel
Showing results for 
Search instead for 
Did you mean: 

Message error index

LG1
Explorer
0 Kudos

I created a table with 31 lines. There is fields(attributes) like begda and endda on the table.

The employee enter info on the table and click on a button to submit it.

If there is errors on the table I create a error message with the following:

lo_api_controller ?= wd_This->Wd_Get_Api( ).

CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER

RECEIVING

MESSAGE_MANAGER = lo_message_manager.

  • report message

CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE

EXPORTING

MESSAGE_TEXT = zmessage

ELEMENT = lo_el_kilometer

ATTRIBUTE_NAME = 'KM_ENDDA'

msg_index = lv_index.

When the error is displayed on the screen a red border is displayed on the field(attribute) that is incorrect.

If for example there is a error on the third line with the endda, I want the red border on the field endda of the third line and not

on endda of the first line.

How do I get the border arround endda of the third line and not on the first line? I already use index in the above method but nothing work.

Regards

Liana

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That should be controlled by the element parameter:

ELEMENT = lo_el_kilometer

You need to pass the element of the context which you want marked with the error.

Answers (1)

Answers (1)

LG1
Explorer
0 Kudos

Thanks Thomas

It worked.