on 05-29-2009 11:31 AM
Hi
I've scoured this forum but not found a way to display an error and stop the processing.
I'm using report_error_message in the method WDDOBEFOREACTION for file validation but the processing doesn't stop there and the control goes on to the next view where it shows the error.
Is there a way to display an error like it is done when you give some garbage value in the UI element FileUpload ? (it just stops processing)
One more problem I have here is that for the same UI element though I've bound the fileName property with a string TYPE attribute and given a certain default value to that attribute, on executing the application the input file field is blank. However if I use get_attribute I can see the value I put in as default during debugging. Any idea?
Thanks
Pushpraj
Hi,
Have you used the SET_ATTRIBUTE method to set the value.
In think in the WDDOBEFOREACTION/or next event that gets processed you might have used
FIRE_PLUG event to fire to next view.
Or else you have used any code CLEAR_MEESAGES in any event.
In the debuggin check the MESSAGE MANAGER reference and check the meesage after the error occured. or in the subsequent event check the same. I think the messages are getting cleared.
Or do this way,
When the meesage occurs write an EXIT stament.
This should stop processing further.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I also, had a similar requirement in my project. I used the method "RAISE_ERROR_MESSAGE" and after the mesaage was displayed the processing stopped there itself. This is an obsolete method (not a good suggestion to use), but it worked for me. So, you can try as well.
Hope this helps.
Best Regards,
Ashish
Hi,
Processing will be automatically stopped by WD framework if error is raise by if_wd_message_manager method.
Try with following method
CALL METHOD wd_this->mo_message_manager->report_element_t100_message
EXPORTING
msg = lv_symsg
element = <element>
attributes = <attribute>
message_type = if_wd_message_manager=>co_type_error
cancel_navigation = abap_true
enable_message_navigation = abap_false
view = lo_api_controller->name.
ENDIF.
Thanks,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.