on 08-22-2013 5:31 AM
Hi,
I have a row repeater with a checkbox & a text for that checkbox in WD layout. On screen I get 15 checkboxes.
I want to check if user has selected at least one check box when he saves an incident. If not, the system should throw an error message & incident should not be saved. I have added my logic in method WDDOBEFOREACTION of my view.
My logic works fine. If no checkbox is selected, I get an error message but incident gets saved. The processing does not stop after throwing an error message.
Am I writing my logic at the correct place? How can I stop the processing after throwing an error?
Hi,
Set a flag(ex : wd_comp_controller->mv_error = abap_true) and exit in WDDOBEFOREACTION incase of error.
Check if this flag is set in other methods before processing with the rest of the logic.
This would help not to proceed further with any of the processing logic if there is an error.
Regards
Manjula
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write your code to save the incident case in an else condition.
If lv_check = abap_false.
Display error.
else.
save incident.
endif.
Or you can use STOP command to stop if there is an error.
The actual way is Do validations in WDDOBEFOREACTION method and Write the code to save in on Action Save
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply.
My issue got resolved using method report_fatal_error_message of message manager. I passed abap_true in cancel_navigation parameter.
Now I get the error & processing stops.
Reference: https://scn.sap.com/thread/2066006
Br
Mrunal
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.