Gratis demo

To be or not to be part of multiple teams

Mark Peeters, 13 oktober 2021

In SAP cloud for Customer an employee is assigned to a team to represent his or her responsibilities. Quite often we see large customers struggling with the concept of Multi Team assignment. An employee, for example, can be part of the German sales force and therefore be assigned to a German sales unit. But he can also be authorised to work on sales quotes for the sales organisation in Austria. The employee can in this case be assigned to an Austrian sales unit as secondary assignment. But now comes the tricky part, that differs across our customers: What do we want the employee to see when he selects “My teams Sales Quotes”? Are those default all German or both German and Austrian sales quotes. The options even grow when we take into account that the answer can be different for the sales quotes compared to the tickets.

The standard provides no configuration possibilities here. You will see all data of all teams that you are assigned to. In this blog I would like explain a Business Add In available in the Cloud for Customer system with which we can alter this standard behaviour.

Implementing a Badi in SAP Cloud for Customer is done in the PDI or SDK. This software tool can be downloaded from the SAP website and needs to be updated every release. Once you have it running you can log on to your tenant and create a custom solution. Now you can add a new object to your solution. Here you select “Enhancement Implementation”.

select enhencement implementation

exit for getting my teamt
exit for getting my teamt

Now you need to know the name space of the badi and name. This adds the object to your custom solution. The badi will be called every time an employee select a “My Team” filter in the C4C UI.

For this business case we will work on the following scenario: For sales objects the customer wants to see objects linked the all teams of an employee. So both primary assignments as well as secondary assignments. For service objects the customer would like to see only the tickets of the teams to which the employee is directly assigned.


With code below we:

  1. loop over the Teams that SAP has standard assigned to the My Team object
  2. for each team we check if the current employee is assigned
  3. if assigned, we check, in case of a service scenario, if it is a direct assignment
  4. we add the team to the result object
import AP.FO.MOM.Global;

var result : BadiOrgModifyMyTeamChange;
var addTeam = true ; //Default we add all teams

var userUUID = InputData.EmployeeRootObjectNodeReference.UUID ;
foreach ( var team in InputData.MyTeamOrganisationalUnitTable)
  var orgUnit = OrganisationalUnit.Retrieve( team.OrgUnitRootObjectNodeReference.ObjectID.content ) ;
  if ( orgUnit.IsSet() )
     var employeeAssignment = orgUnit.CurrentEmployeeAssignment.Where(n=> n.EmployeeUUID.content == userUUID.content).GetFirst();

     if ( employeeAssignment.IsSet() &&
          employeeAssignment.RoleCode != "219" &&
          InputData.ServiceContextIndicator == false ) //Direct Assignment
          addTeam = false ;
     if ( addTeam == true )
          var newTeam : BadiOrgModifyMyTeamOrgUnit ;
          newTeam.OrgUnitRootObjectNodeReference = team.OrgUnitRootObjectNodeReference ;
          result.MyTeamOrganisationalUnitTable.Add(newTeam) ;
return result;

I hope this shows that with a little coding we can easily extend the Cloud for Customer system and tweak the system to customer specific needs. If you like to know more contact me at

PS: In a SAP implementation you sometimes just simply need a Badi, just like the song says Everybody needs a Badi sometimes

Mark Peeters

Read all my blogs

Receive our weekly blog by email?
Subscribe here: