cancel
Showing results for 
Search instead for 
Did you mean: 

Using Message Class for attribute error messages

Former Member
0 Kudos

Hi All,

Our reqirement is to display an error message when wrong value is entered in an input field and that field should be highlighted.

Next requirement is to use message class for displaying the same message mentioned above.

We are trying to use 'report_attribute_exception ' for this purpose.

Can the above requirement be achieved using the mentioned method. If so explain the same.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To know how to use mentioned method report_attribute_error_message to higlight the UI element follow this thread:

To use the message class to show one of the messages created there you would have to write the following code( this is to create a message which can be then send the method for raising message )

data: lv_dummy type string.

MESSAGE e017(cacs_buffer) WITH 'CACS00_DOCSE' into lv_dummy.

Here 017 - message number, cacs_buffer - message class, cacs00_docse is message parameter.

Replace above variables with your values.

After you have your message text in lv_dummy then you can call method to raise message.

Regards

Manas Dua

Edited by: Manas Dua on Apr 7, 2010 4:08 PM

Former Member
0 Kudos

Hi.

We want to use the MESSAGE CLASS. So we thought the following method will help.

But we are not sure how to pass the MESSAGE CLASS NAME and MESSAGE NUMBER.

This is our problem.

  • report message

CALL METHOD lo_message_manager->report_attribute_exception

EXPORTING

message_object =

element =

attribute_name =

  • msg_user_data =

  • message_type = CO_TYPE_ERROR

  • is_permanent = ABAP_FALSE

  • scope_permanent_msg = CO_MSG_SCOPE_CTXT_ELEMENT

  • msg_index =

  • cancel_navigation =

  • is_validation_independent = ABAP_FALSE

  • enable_message_navigation =

  • view =

receiving

message_id =

.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I think you should be using the method report_attribute_t100_message of the message manager instead if you want to use a Message Class as the source.

Answers (0)