P_MaterialShortageProfileUser

DDL: P_MATERIALSHORTAGEPROFILEUSER Type: view_entity CONSUMPTION Package: ODATA_PP_MRP

ShortageProfile assigned to the User

P_MaterialShortageProfileUser is a Consumption CDS View that provides data about "ShortageProfile assigned to the User" in SAP S/4HANA. It reads from 1 data source (I_User) and exposes 1 field with key field UserID. It has 2 associations to related views. Part of development package ODATA_PP_MRP.

Data Sources (1)

SourceAliasJoin Type
I_User I_User from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_SDMAreaOfRespyProfile _profileuser _profileuser.UserName = $session.user
[0..1] I_SDMAreaOfRespyProfile _profileuserStar _profileuserStar.UserName = '*'

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (1)

KeyFieldSource TableSource FieldDescription
KEY UserID UserID
@AccessControl: {authorizationCheck: #NOT_REQUIRED,
                personalData.blocking: #NOT_REQUIRED
}
@ObjectModel: {
    usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #MIXED }
}
@VDM.private: true
@VDM.viewType: #CONSUMPTION
define view entity P_MaterialShortageProfileUser as select  from I_User 
association [0..1] to I_SDMAreaOfRespyProfile as _profileuser on _profileuser.UserName = $session.user
association [0..1] to I_SDMAreaOfRespyProfile as _profileuserStar on _profileuserStar.UserName = '*'
{
    key UserID,
   case  
   when _profileuser.MaterialShortageProfile is null and _profileuserStar.MaterialShortageProfile is not null
   then _profileuserStar.MaterialShortageProfile
   
   when _profileuser.MaterialShortageProfile is not null 
   then _profileuser.MaterialShortageProfile
   
   else 
   'SAP000000001' end  as MaterialShortageProfile
}
where UserID = $session.user