cancel
Showing results for 
Search instead for 
Did you mean: 

Identifying Selected employee in team calendar

Former Member
0 Kudos

Hi all,

In the team calendar, I have added a new event to handle a click on the Business Graphics.

However, when I click on an employee and go into the debug mode, the selected employee is not the one that I clicked on.

Appreciate if any expert is able to advice how I can pick the correct person?

Thanks and Regards

Wai

Accepted Solutions (1)

Accepted Solutions (1)

former_member197475
Active Contributor
0 Kudos

Hi Wai,

Are you always trying to debug in the same session. If yes, you will face this problem some times.

You can do one thing. Try to clear your ls_team_members at the end of the ONACTIONTEST method and try it once.

BR,

RAM.

Former Member
0 Kudos

Hi Ram,

Thanks for the reply.

I have tried, but it does not help in my case. It seems that the following code will always return an employee that is neither the first nor the last.

*   get all declared attributes

  lo_el_team_members->get_static_attributes(

    IMPORTING

      static_attributes = ls_team_members ).

Thanks and Regards

Wai

mani_sekar
Explorer
0 Kudos

Hi Wai,

Try the below code, this ll provide the element based on the event

lo_el_team_members = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

*   get all declared attributes

  lo_el_team_members->get_static_attributes(

    IMPORTING

      static_attributes = ls_team_members ).

Regards,

Manikandan S

Former Member
0 Kudos

Hi Manikandan,

It did not help in my case.

It seems that GET_LEAD_SELECTION_INDEX always return 1.

Regards

Wai

former_member197475
Active Contributor
0 Kudos

Hi Wai,

It's amazing, though the clear statement is not working

See if it is that case, are you setting any values by default in any of your method. Please check that.

BR,

RAM.

Former Member
0 Kudos

Hi Ram,

I have checked and there is no setting of values along the way. Immediately after I click on the team calendar, it will trigger my newly created event and my code should kick in.

Thanks and Regards

Wai

mani_sekar
Explorer
0 Kudos

Hi Wai,

Hope below link will be helpful to solve your problem

Regards,

Manikandan S

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all,

For team calendar, what I have done is to follow Mani's suggestion, but I linked the eventID under category to V_TEAM_CALENDAR.CATEGORY.EVENTID instead.

Thereafter when I debug into the newly created action, the selected PERNR will be reflected in event_id.

Thanks and Regards

Wai