Saturday, September 7, 2013

How to query 'My Team' activity

My team's activity means all the activity associated to my primary position and all the activities associated to the position with which my position has direct/indirect relationship.

Siebel maintains this relationship in s_party_rpt_rel table.
PARTY_ID : is the primary position I'd
SUB_PARTY_ID : is the I'd of the position with which primary position has direct/indirect relation

Step to query my teams activity
1. Create link:
    Parent bc: Party Reporting Relationship
    Child bc: Action
    Source Field: Party Id (sub_party_id)
    Destination Field:  Primary Position Id (pr_held_position_id)

2. Create IO with primary bc as Party Reporting Relationship and child bc as Action and using the link created above in the BO.

3. Once IO is created 
Query on Party Reporting Relationship.Parent Party Id 
and it will fetch all my team activity in parent child hierarchy.

No comments:

Post a Comment