Find first user in BBP hierarchy with a special attribute
we are using SRM 7.0 and I have a BRF request where I have currently no idea how to solve it technically.
For our signature rule in SC we have to determine the cost center owner. Therfore I have already created an own expression and use it in BRF process configuration.
But when a value limit is more than x, than we need additional the approve of a user with a special attribute. Therefore I will will use a new expression, but the method to determine the WI-receiver is not clear for me.
There are more then 30 users which are possible receivers and I don't want to bother all at the same time. So the WI should only send to the firstt user which is in the BBP hierarchy above the cost center owner, having a special attribute (e.g. the user must have the attribute "ROLE = Z_MYROLE").
I know that I can read the attributes with FM BBP_READ_ATTRIBUTES, but I didn't know how to combine it with the lookup in the BBP hierarchy starting on the level of the cost center owner. Is there a FM which read the "usage" of a user/central person?
BTW: The value x can be changed depending on the material group and other rules, so usage of general attributes like spending limit, etc. is not possible.
Thanks in advance,
S K replied
The attribute Role is not intended for this pupose. It is not the role that they have but it is the Role that they can assign to a user while creating a user. Like for example a Buyer creating bidder he can assign this role to the new user.
So your logic becomes:
Assign a Z Role to the approver. You can get the higher level Org with FM: BBP_OM_STRUC_GET_ORG_FROM_ORG and then get the user with the role using BBP_OM_STRUC_GET_USER_FROM_ORG and BAPI_USER_GET_DETAIL.
Otherwise you ca use the following logic:
Create a custom attribute call Z_Approver which holds the Approver user ID. YOu can assign this attribute to the each organization where you need further approval. You will get the organization of the user(BBP_OM_STRUC_GET_ORG_FROM_USER) and then can read this attribute to get the approver.