on 08-10-2012 8:57 AM
Hello!
We use ABAP Web Dynpro (AGS_WORK_INCIDENT_CREATE) for the creation of messages in our Solution Manager (CRM).
In order to categorize the messages we would like to use 4 level category.
Question:
How can we make the fields of categorization mandatory and implement a simple error in case the the fields are empty?
(see the picture below)
Dear Alex,
You can refer to the following link,.hope it will be useful.
Cheers
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Alex,
I would suggest, to make an Enhancement for this WD-Component.
Search for the view ( sorry, just I have no CRM System at the moment), which holds the category items and set the attribute for every field to "required = true".
Kind regards,
Hendrik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Alex,
First you set the state property of the drop down ui element as required
then on action method where you want to check the empty field or not write following code before processing your other logic.
data:lref_view_controller type ref to if_wd_view_controller,
lt_msg type cl_wd_dynamic_tool=>t_check_result_message_tab,
lref_view_controller ?= wd_this->wd_get_api( ).
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
exporting
view_controller = lref_view_controller
display_messages = abap_true
importing
messages = lt_msg ). "end of code to check mandatory fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Many thanks!
I found the view and set the field required true.
No I need the check logic.
I found a method CHECK_CUST_REQUIRED and there some checks regarding to the CATEGORY.
if ls_cc_req_context-REQ_CATEGORY = 'X' and ls_nd_add_context-CATEGORY is INITIAL.
lv_msg = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( 'E15' ).
CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT = lv_msg
ELEMENT = lo_el_nd_add_context
ATTRIBUTE_NAME = 'CATEGORY'
endif.
How can I adapt the check logic for the fields?
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.