on 09-01-2017 11:17 AM
As shown in pictures when i'm clicking on result view it was navigating to over view, where single employee details are available.
Where i'm clicking on edit button the details are not getting edited.
Please suggest me solution.
Below is my "genil" class code which was attached to custom component
method IF_GENIL_APPL_INTLAY~MODIFY_OBJECTS.
DATA : lv_empl_attr TYPE ybol_employee_details_attr,
lv_root TYPE REF TO if_genil_container_object,
lv_changed_objects TYPE crmt_genil_obj_instance,
lv_props TYPE REF TO if_genil_obj_attr_properties,
lt_changed_attr TYPE crmt_attr_name_tab,
lv_empl_key TYPE ybol_empl_master_key,
lv_success TYPE abap_bool.
DATA : lv_change TYPE crmt_genil_attr_property.
CHECK iv_root_list IS BOUND.
* Get the first object from Container.
lv_root = iv_root_list->get_first( ).
IF lv_root->get_delta_flag( ) IS NOT INITIAL.
* Get name of the object.
CASE lv_root->get_object_id( ).
WHEN 'Employee'.
* Returns an Property Object for Object Attributes.
lv_props ?= lv_root->get_attr_props_obj( ).
* Returns a Table of All Names with Specified Property.
CALL METHOD lv_props->get_name_tab_4_property
EXPORTING
iv_property = if_genil_obj_attr_properties=>changeable
IMPORTING
et_names = lt_changed_attr.
lv_root->get_key( IMPORTING es_key = lv_empl_key ).
lv_root->get_attributes( IMPORTING es_attributes = lv_empl_attr ).
MOVE-CORRESPONDING lv_empl_key TO lv_empl_attr.
CALL METHOD zhcl_empl_details_api=>modify_employee
EXPORTING
is_empl_attr = lv_empl_attr
it_names = lt_changed_attr
IMPORTING
rv_success = lv_success.
IF lv_success IS NOT INITIAL.
lv_changed_objects-object_name = 'Employee'.
lv_changed_objects-object_id = cl_crm_genil_container_tools=>build_object_id( lv_empl_key ).
* Add into Object Table with Object Type and ID.
APPEND lv_changed_objects TO et_changed_objects.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDIF.
endmethod.
EVENT HANDLER METHOD FOR EDIT BUTTON
METHOD eh_onedit.
DATA: lr_entity TYPE REF TO cl_crm_bol_entity.
lr_entity ?= me->typed_context->zemployee->collection_wrapper->get_current( ).
CHECK lr_entity IS BOUND.
CHECK lr_entity->is_change_allowed( ) = abap_true .
lr_entity->lock( ).
IF lr_entity->is_locked( ) = abap_true.
me->view_group_context->reset( ).
ELSE.
me->view_group_context->set_all_editable( ).
ENDIF.
ENDMETHOD.
METHOD FOR Request Processing
method SET_VIEW_GROUP_CONTEXT.
IF iv_first_time EQ abap_true AND
me->view_group_context IS NOT BOUND.
IF iv_parent_context IS INITIAL.
CREATE OBJECT me->view_group_context TYPE cl_bsp_wd_view_group_context.
ELSE.
me->view_group_context = iv_parent_context.
ENDIF.
ENDIF.
endmethod.
please check the get_i method for each fields which determines if they can be edited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Harish,
Please check whether "X" is set for entry HRALX HRAC in table T77S0. If so, it means your CRM system is integrated to an HR system.
From HCM-BP integration point of view, the BP data is always based in the integrated data. So the change is only possible in the HR system. And for that reason the fields in BP UI are disabled for editing when the integration with HCM is active. This is the standard behavior. If you want to edit BP data from CRM BP UI, please consider deactivating the integration to HR.
Thank you and best regards,
Julin Xin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.