cancel
Showing results for 
Search instead for 
Did you mean: 

Employee email id not displaying on Search

sudheer19
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

sudheer19
Participant
0 Kudos

any pointers or clue? pls guide.

Former Member
0 Kudos

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

sudheer19
Participant
0 Kudos

Hi Anbu,

BP_EMPL_SEARCH/SearchHelp  is the view. and to code its working for some employees and for some its not. So checking anything we miss here or not.

Thanks,

Venkat

Former Member
0 Kudos

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

Former Member
0 Kudos

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

sudheer19
Participant
0 Kudos

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.

Former Member
0 Kudos

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

sudheer19
Participant
0 Kudos

Hi Anbu,

Thank you.

I found the issue is because of address attributes are not maintained for the OU which are mandatory, hence not able to pick the employee address details.

anyhow thanks a lot for your help.

Regards,

Venkat

Former Member
0 Kudos

Hi Ven,

So Sad, Already asked you whether they maintained Address details in BP or not. U told it is maintained. Ok nice experience by sharing things with you.

Thank you

Anbusundaram A

sudheer19
Participant
0 Kudos

Hi Anbu,

you are confused it seems.They had maintained in BP but not in Org unit level. there also we have to maintain .

anyways thanks for your help and support.

Regards,

Venkat

sudheer19
Participant
0 Kudos
Former Member
0 Kudos

Hi,

Can you tell me which component you using?

may be type miss match i think. i debug mode Email id value is not populating for respective record

right, just click edit in debug mode change value of email id with null data.

Thanks,

Anbu

sudheer19
Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

Try with class: CL_CRM_PPM_UM_TOOLKIT

Method: Get_position*

Thanks,

Anbu

sudheer19
Participant
0 Kudos

Hi Anbu,

I was talking functional prospective is there any way we can config to identify address type in 'Is Employee' relation as soon as we assign the employee to position in service org unit.

Thanks,

Venkat

sudheer19
Participant
0 Kudos

Hi All,

Any clues on how to solve the below issue. for some employees email is displaying upon search and for other not.

Please let me know how can we achieve this.

Thanks,

Venkat

sudheer19
Participant
0 Kudos

Dear Friends,

any help?

Thanks,

Venkat

Former Member
0 Kudos

Hi ven,

have you checked in BP of person. whether email id is maintained there or not!!!

could you please tell the BSP component name?

Thanks,

Anbu

sudheer19
Participant
0 Kudos

BP master data maintained properly with Email id. but still email id is not showing upon employee search.

please help.