on 04-08-2015 5:06 PM
Hi
i can use Report_attribute_error_message but Didnt call this method.
DATA lo_nd_emp_group_travel TYPE REF TO if_wd_context_node.
DATA lo_el_emp_group_travel TYPE REF TO if_wd_context_element.
data lo_api_controller type ref to if_wd_controller.
data lo_message_manager type ref to if_wd_message_manager.
DATA: it_emp_gt1 TYPE TABLE OF YTMS_GT_EMP_DETA,
wa_emp_gt1 TYPE YTMS_GT_EMP_DETA.
DATA: it_emp_gt2 TYPE TABLE OF YTMS_GT_EMP_DETA,
wa_emp_gt2 TYPE YTMS_GT_EMP_DETA.
DATA lv_value TYPE string.
lo_api_controller ?= wd_This->Wd_Get_Api( ).
it_emp_gt1 = lt_emp_group_travel.
SORT it_emp_gt1 by emp_id.
it_emp_gt2 = it_emp_gt1.
LOOP AT it_emp_gt1 INTO wa_emp_gt1.
lv_value = sy-tabix.
lv_value = lv_value + 1.
READ TABLE it_emp_gt2 INTO wa_emp_gt2 INDEX lv_value.
if sy-subrc = 0.
if wa_emp_gt1-emp_id = wa_emp_gt2-emp_id.
*
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
.
* report message
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Duplicate entries are not allowed'
element = lo_el_emp_group_travel
attribute_name = 'EMP_ID'.
CLEAR : wa_emp_gt2,wa_emp_gt1.
ENDIF.
endif.
ENDLOOP.
Hi,
Whats the issue you are facing here ? could you please elaborate.
Regards,
Rama
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.