on 01-05-2015 8:21 AM
Dear Friends,
Happy New Year .
Can someone help me in identifying the root cause of the below issue.
Issue: While searching for employees, we were not able to see the email id displaying in the results and for some its coming.
after analysing, we found that this is because of address type not being identified upon assigning employees to Service teams. whereas for some employees address type is identifying and hence email id is coming on search.
PFB screen shots for reference.
Please let me know in case if you come across or aware of this issue.
Thanks,
Venkat.
any pointers or clue? pls guide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ven,
Please provide the BSP Component Name?
Take address no of employee and check it in adrc, adrc6 table. You will get email id.
1. while click search, on search event will trigger.
2. inside event write the code,
i. after getting search list of employee details on base of filter condition.
ii. take the count employee details and put it do and end do loop. inside do loop
use set property method to employee email id on specific column.
iii. then bind final employee list internal table data with result view context node.
your issue will close now.. write coding inside that event.
Thanks,
Anbusundaram A
Hi ven,
I am checking with your issue. i found what is your problem.
see result view structure is different, in that structure email id is not there.
so you have to write coding to set email id in email id column.
Check it email technical field name and revert back.
Please share custom code in EH_ONSERARCH event.
i will send custom code for you. it will helpful for you!!! please revert back as soon as possible
Thanks,
Anbusundaram
Hi Ven,
Check with below code on search event!!!!
data: qs type ref to cl_crm_bol_dquery_service.
data: result type ref to if_bol_entity_col.
data: ls_sel_param type genilt_selection_parameter.
data: lr_cuco type ref to cl_bp_empl__cucoemp_impl,
lv_size type string,
lv_object type string,
lv_object_plr type string.
*For passing the value of text elements into another variables to avoid type incompatibility as part of SEARCH PAGE ENHANCEMENTS
lv_object = text-001.
lv_object_plr = text-002.
qs ?= me->typed_context->search->collection_wrapper->get_current( ).
if gt_hidden_parameters is initial.
*********************************************************************
* no additional search criteria, everything running as normal
*********************************************************************
result = qs->get_query_result( ).
else.
*********************************************************************
* additional non-UI search criteria given
*********************************************************************
* store the search criteria which came from the UI
call method me->save_ui_search_criteria
exporting
ir_qs = qs.
loop at gt_hidden_parameters into ls_sel_param.
call method qs->add_selection_param
exporting
iv_attr_name = ls_sel_param-attr_name
iv_sign = ls_sel_param-sign
iv_option = ls_sel_param-option
iv_low = ls_sel_param-low
iv_high = ls_sel_param-high.
endloop.
result = qs->get_query_result( ).
* display in the UI only the search criteria, which came from the UI
call method me->restore_ui_search_criteria
exporting
ir_qs = qs.
endif.
**** code added by anbu ****
data: result type ref to if_bol_entity_col,
ls_res_vw type REF TO IF_BOL_BO_PROPERTY_ACCESS.
data: ls_res type CRMST_EMP_OBJECT_BUIL,
ls_but20 type but020,
ls_adr6 type adr6,
lv_email type string.
ls_res_vw ?= RESULT->GET_FIRST( ).
while ls_res_vw is bound.
LS_RES_VW->GET_PROPERTIES( IMPORTING ES_ATTRIBUTES = ls_res ).
select single * from but020 into ls_but20 where PARTNER = ls_res-EMPLOYER.
if sy-subrc eq 0.
select single * from adr6 into ls_adr6 where ADDRNUMBER = ls_but20-ADDRNUMBER.
lv_email = ls_adr6-SMTP_ADDR.
CALL METHOD LS_RES_VW->SET_PROPERTY
EXPORTING
IV_ATTR_NAME = NICKNAME " here pass ur email id column technical field name
IV_VALUE = lv_email.
clear: lv_email, ls_adr6, ls_but20,ls_res.
endif.
ls_res_vw ?= RESULT->GET_NEXT( ).
ENDWHILE.
*** end of code by anbu**** check with this code
lr_cuco ?= me->get_custom_controller( controller_id = 'BP_EMPL_SEARCH/CuCoEMP' ).
*********************************************************************
* show the result
*********************************************************************
me->typed_context->searchresult->collection_wrapper->set_collection( result ).
*Get the no of records found as part of SEARCH PAGE ENHANCEMENTS
lv_size = lr_cuco->typed_context->cucoemp->collection_wrapper->size( ).
*calling the generic method for getting the result list title as part of SEARCH PAGE ENHANCEMENTS
call method cl_crm_uiu_gen_tools=>get_result_title
exporting
iv_size = lv_size
iv_object = lv_object
iv_msg_id = 'CRM_BUPA_BOL'
iv_msg_no = '103'
iv_object_plr = lv_object_plr
receiving
rv_result_title = gv_result_title.
Thanks,
Anbusundaram
Hi Anbu,
first of all thank you very much for putting effort and helping me towards solution.
As you said result view is a different structure and showing results from different i.e. thru relationships . here, address details are coming thru relationship BuilEmpStdWorkAddressRel and setting in UI.
whatever you have given in the code absolutely perfect and kudos.
after analyzing that relationship is not set for the employees that is why no data coming thru relationships. surprising factor is even after assign the employee to position i.,e. 'Is Employee' relationship created which should identify this relation and address data, but unfortunately its not.
can this be achieved thru coding? i.e. setting data in the relationships.
Thanks,
Venkat.
Hi ven,
Coding i have to check it of. already i mention once class to retrieve the position and employee details. To create i have to check it.
Manual configuration:-
1. PPOMA_CRM(TC)
2. In Sales area, you have to create sales organization first.
3. then create position under sales organization by right click create.
4. right click position and create user (employee BP) under position.
5. Goto---> detail object--->enhanced object description.
6. assign business role and relationship.
if you double click organization unit you will get details bottom of gui screen. under attribute assign partner as employee bp no. then choose service module and assign OU too etc.
This one is functional activity!!!
if you satisfied with my answer pls give score!!!
if i got solution this i will revert back tomorrow!!! you can ask any question directly
if i am free i will help it out.
Thanks,
Anbusundaram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anbu,
Thanks for your response.
I am just creating SR/IR and trying to search for employee responsible and in employee search pop up I am not able to see email id coming. after analyzing I find that difference b/w employees for those email id is displaying and for those not displaying and identified as in the 'Is employee" relationship address type not identified. that's what the screenshots I have attached using BP transaction.
All I need here is how can we set this to auto identify address type upon assigning employee to a position in Org.
Thanks,
Sudheer
User | Count |
---|---|
5 | |
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.