SAP Knowledge Base Article - Public

2695753 - How the Mass Locking of Users Performed in SAP Cloud for Travel and Expense?


You are decomissioning SAP Cloud for Travel and Expense system at a date in the future. You would like to lock all users in the system so that they cannot login and wonder if mass locking of users is possible?


SAP Cloud for Travel and Expense


You have two possibilities to block the users:

- Either directly in the SAP Cloud for Travel and Expense system (Master Data Replication ->Display Employees. mark Employees and press the ‘Lock User’ button)
- or via replication from the ERP system (Enhancement Spot: OTM_EMPLOYEE_REPLICATION, BADI: OTM_EMPL_ONDEMAND_USER, Method IS_USER_L OCKED_ON_DAY)

Here the documentation for the BADI: HY SIMGOTM_EMPL_ONDEMAND_USER

You want to overwrite the employee's logon user (sometimes called "identity") for the SAP Cloud for Travel and Expense system.
You want to lock/unlock the employee's user in the SAP Cloud for Travel and Expense system.

The BAdI will be processed if you activate it. No further configuration is required.
Standard settings
Implement method GET_USERNAME
Implement method IS_USER_LOCKED_ON_DAY
Implement method GET_USER_PREFERENCES (only effective at the first synchronisation; existing users will keep their preferences even if this method is implemented).

The following parameters are available:
• IV_RECEIVER: the receiver you entered in the selection screen of the replication report (OTM_TRIGGER_EMPL_REPL_CE). You can write different coding sections for different receivers.
• IT_PERNRS: list of personnel numbers in SAP HCM; an employee with multiple work agreements will have multiple personnel numbers
• IV_PERSONID: identifies an employee in SAP HCM, irrespective of his/her work agreements.
• IV_PERSONID_LONG: identifies an employee in SAP Cloud for Travel and Expense, irrespective of his/her work agreements.
• IV_KEYDATE: the day on which a user may be locked.
• IV_EMAIL: the employee's business e-mail.
• IT_0105: infotype 105.
• IT_0002: infotype 2.
• IT_EMPLOYMENT_TIMESLICES: the list of periods during which the employee is with the company. Mind that these periods are culled (ie restricted) within the synchronisation periods chosen in view V_OTM_HREE_C01 and in BAdi OTM_EMPL_ORGANIZATION_FILTER.
• EV_USERNAME: write the desired user name here.
• CV_IS_USER_LOCKED: change this to 'X' if the user must be locked, change it to space otherwise.
• EV_IS_NOT_OK: if you set the parameter to 'X', the employee will not be processed further and an employee-related error message will be produced.

By default, the system uses the business e-mail of the employee as their user.
By default, the system locks the user if no cost center is assigned today.

You have employees whose e-mail addresses are longer than 40 characters. Since SAP Cloud for Travel and Expense user names can not be longer than 40 characters, you create an alternative user for those employees via method GET_USERNAME.


SAP Cloud for Travel and Expense, Mass Locking of Users , KBA , LOD-TEM-CNV-BC , Business Configuration Extraction Cloud for Travel & Expense , Problem


SAP Cloud for Travel and Expense all versions