177: l_where_cl := 'From PER_PEOPLE_F people, ' ||
178: 'as_sales_groups_v sales_group, AS_SALESFORCE_V force, as_sales_groups_v manage_group ';
179:
180: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
181: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
182: 'where fnd_user.employee_id = force.employee_person_id and ' ||
183: 'fnd_user.user_id = :p_user_id ';
184: Else
185: l_where_cl := l_where_cl || 'Where 1=1 ';
178: 'as_sales_groups_v sales_group, AS_SALESFORCE_V force, as_sales_groups_v manage_group ';
179:
180: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
181: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
182: 'where fnd_user.employee_id = force.employee_person_id and ' ||
183: 'fnd_user.user_id = :p_user_id ';
184: Else
185: l_where_cl := l_where_cl || 'Where 1=1 ';
186: End if;
179:
180: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
181: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
182: 'where fnd_user.employee_id = force.employee_person_id and ' ||
183: 'fnd_user.user_id = :p_user_id ';
184: Else
185: l_where_cl := l_where_cl || 'Where 1=1 ';
186: End if;
187: -- Fix bug 788241
243: l_where_cl := 'From PER_PEOPLE_F people, ' ||
244: 'as_sales_groups_v sales_group, AS_FC_SALESFORCE_V force, as_sales_groups_v manage_group ';
245:
246: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
247: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
248: 'where fnd_user.employee_id = force.employee_person_id and ' ||
249: 'fnd_user.user_id = :p_user_id ';
250: Else
251: l_where_cl := l_where_cl || 'Where 1=1 ';
244: 'as_sales_groups_v sales_group, AS_FC_SALESFORCE_V force, as_sales_groups_v manage_group ';
245:
246: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
247: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
248: 'where fnd_user.employee_id = force.employee_person_id and ' ||
249: 'fnd_user.user_id = :p_user_id ';
250: Else
251: l_where_cl := l_where_cl || 'Where 1=1 ';
252: End if;
245:
246: If (p_sales_member_rec.user_id <> FND_API.G_MISS_NUM) Then
247: l_where_cl := l_where_cl || ', FND_USER fnd_user ' ||
248: 'where fnd_user.employee_id = force.employee_person_id and ' ||
249: 'fnd_user.user_id = :p_user_id ';
250: Else
251: l_where_cl := l_where_cl || 'Where 1=1 ';
252: End if;
253: l_where_cl := l_where_cl || 'And force.employee_person_id = people.person_id ' ||
679: null,
680: null,
681: decode(force.category,'PARTY',force.source_id,null)
682: From JTF_RS_RESOURCE_EXTNS force, JTF_RS_ROLE_RELATIONS rrel
683: ,JTF_RS_ROLES_B roleb, FND_User fnd_user
684: Where force.user_id = fnd_user.user_id
685: and fnd_user.user_id = p_user_id
686: and force.category in ('EMPLOYEE','PARTY')
687: and force.resource_id = rrel.role_resource_id
680: null,
681: decode(force.category,'PARTY',force.source_id,null)
682: From JTF_RS_RESOURCE_EXTNS force, JTF_RS_ROLE_RELATIONS rrel
683: ,JTF_RS_ROLES_B roleb, FND_User fnd_user
684: Where force.user_id = fnd_user.user_id
685: and fnd_user.user_id = p_user_id
686: and force.category in ('EMPLOYEE','PARTY')
687: and force.resource_id = rrel.role_resource_id
688: and rrel.role_resource_type = 'RS_INDIVIDUAL'
681: decode(force.category,'PARTY',force.source_id,null)
682: From JTF_RS_RESOURCE_EXTNS force, JTF_RS_ROLE_RELATIONS rrel
683: ,JTF_RS_ROLES_B roleb, FND_User fnd_user
684: Where force.user_id = fnd_user.user_id
685: and fnd_user.user_id = p_user_id
686: and force.category in ('EMPLOYEE','PARTY')
687: and force.resource_id = rrel.role_resource_id
688: and rrel.role_resource_type = 'RS_INDIVIDUAL'
689: and rrel.role_id = roleb.role_id