on 04-20-2009 3:32 PM
Hello experts,
we have a problem with one of our WD applications.
In one view, there is an input field which is focused via method WDDOINIT:
lr_inp_field type ref to cl_wd_input_field.
lr_inp_field ?= view->get_element( 'MATNR' ).
lr_inp_field->focus( ).
It works so far, but if we show a message, because there is an error in backgroud processing, the message is shown, but the meant input field loose the focus. I tried to ste it in WDDOINIT and ind WDDOMODIFYVIEW, but the focus is always on the shown error message (we raise this message via if_wd_message_manager).
Is there any possibility to show the message and get focus on the input field?
Thanks
Hi,
Which method of messenger class have you used?
If you have used report_attribute_errror_message then you could have got the focus on Input field automatically by passing the MATNR as attirbute name.
I think you might have used report_error_message .
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
no it does not. In our system the interface hast the following methods:
REPORT_EXCEPTION
REPORT_SUCCESS
REPORT_WARNING
REPORT_ERROR_MESSAGE
REPORT_T100_MESSAGE
REPORT_FATAL_EXCEPTION
REPORT_FATAL_ERROR_MESSAGE
REPORT_ATTRIBUTE_ERROR_MESSAGE
REPORT_ATTRIBUTE_EXCEPTION
REPORT_ATTRIBUTE_T100_MESSAGE
REPORT_ELEMENT_ERROR_MESSAGE
REPORT_ELEMENT_EXCEPTION
REPORT_ELEMENT_T100_MESSAGE
IS_EMPTY
CLEAR_MESSAGES
HAS_VAL_ERRORS_FOR_WINDOW
REMOVE_MESSAGE
GET_MESSAGES
HAS_VALIDATION_ERRORS
RAISE_EXCEPTION
RAISE_ATTRIBUTE_EXCEPTION
RAISE_ERROR_MESSAGE
RAISE_T100_ERROR
RAISE_FATAL_EXCEPTION
RAISE_FATAL_ERROR_MESSAGE
I solved the problem by adding an extra textview in the dynpro. In onmodify i read the messages via GET_MESSAGES, make a decission if the message is an error or not, and if it is one i set the visibility of my textview "true" and write the text into it. After that i clear the messages via CLEAR_MESSAGES.
It looks not like the original, but it works, and the focus is set correctly into my input field.
Thanks for your help
Hi Benjamin,
As per what I know I think that its SAP's standard functionality to have the focus set on any error messages that get thrown. Trying to explicitly set the focus to something else wouldn't work out. Lets see as to what the experts have to say about this.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.