on 01-28-2010 2:16 PM
Hi Gurus,
In my application ..if some condition fails , i m raising an error message as follows:
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = 'Please fill Sold To Customer field'
VIEW = 'ISSUEORD_VIEW'.
But the program processing is being continued for eg.. a table is getting updated and both the message
i.e earlier error message and the table updation message are both appearing on the screen together..
How can i interrpt program processing after the error message and display that on the screen.
Best Regards,
Navin Fernandes.
Hi,
You can stop the action from happening, if you raise an attribute error message in WDDOBEFOREACTION using the REPORT_ATTRIBUTE_ERROR_MESSAGE method of message manager.
For e.g.
IF lo_action IS BOUND.
CASE lo_action->name.
WHEN <Your action name>.
lo_node = wd_context->get_child_node( name = <Your node name> ).
lo_element = lo_node->get_element( ).
lo_element->get_attribute( EXPORTING name = <Your attribute name> IMPORTING value = lv_value ).
IF lv_value IS INITIAL.
lo_msg_manager->report_attribute_error_message(
message_text = 'Field is empty'
element = lo_elment
attribute_name = <Your attribute name> ).
ENDIF.
ENDCASE.
ENDIF.
Best Regards,
Loveline Thomas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can use 'exit' after erroneous condition. This will stop the further processing.
Regards,
Saket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
raising an error in web dynpro abap doesn't stop the further processing. use a return statement to get out of the method. or put the stmt in if and rest of the code in else part.
Abhi
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 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.