Fonction SAP BAPI_USER_ACTGROUPS_ASSIGN - Change User-Role Assignments

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
USERNAME BAPIBNAME-BAPIBNAME C 12 User name

Paramètre Reférence Long. Facultatif Description
ACTIVITYGROUPS BAPIAGR 127 All user activity group assignments
RETURN BAPIRET2 548 Return structure

Functionality
The user role assignments are transferred in a table, ACTIVITYGROUPS.All existing assignments are overwritten by the assignments in thistable. This also means that existing assignments can be deleted if theyare no longer contained in the table.
Only the fields
ACTIVITYGROUPS-AGR_NAME
ACTIVITYGROUPS-FROM_DAT
ACTIVITYGROUPS-TO_DAT
must be filled.
If the date of the link is not specified,
ACTIVITYGROUPS-FROM_DAT is set to the current date and
ACTIVITYGROUPS-FROM_DAT is set to 31.12.9999.

Example
User SAMPLE has been assigned the following roles:
AGR1 01.01.98 01.01.99
AGR2 01.01.98 01.01.99
AGR3 01.01.98 01.01.99
You want to delete
AGR1 01.01.98 01.01.99 and insert
AGR4 02.01.98 01.03.99.
Transfer table ACTIVITYGROUPS with the following contents:
AGR2 01.01.98 01.01.99
AGR3 01.01.98 01.01.99
AGR4 02.01.98 01.03.99
INCLUDE SU_USERNAME OBJECT DOKU ID TX
INCLUDE SU_ACTIVITYGROUPS OBJECT DOKU ID TX
INCLUDE SU_RETURN OBJECT DOKU ID TX

1702097PI CTC: Step "Assign roles to user 'PICACHEUSER'" fails
1629618Wrong State of SetABAPRole&ProfileForUser Pass