I_BusPartRelationshipTP

DDL: I_BUSPARTRELATIONSHIPTP Type: view_entity TRANSACTIONAL

RAP BO View for BUPA Relationship

I_BusPartRelationshipTP is a Transactional CDS View that provides data about "RAP BO View for BUPA Relationship" in SAP S/4HANA. It reads from 1 data source (I_BPRelationshipUnion) and exposes 31 fields with key fields BusinessPartner1, BusinessPartner2, ValidityEndDate, RelationshipCategory, BPRelshpCatIsInFwdDirection. It has 5 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_BPRelationshipUnion I_BPRelationshipUnion from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_BPRelshpCntctPersnAddressTP _BusPartRelStdAddress $projection.BusinessPartner1 = _BusPartRelStdAddress.BusinessPartner1 and $projection.BusinessPartner2 = _BusPartRelStdAddress.BusinessPartner2 and $projection.ValidityEndDate = _BusPartRelStdAddress.ValidityEndDate and $projection.RelationshipCategory = _BusPartRelStdAddress.RelationshipCategory and $projection.BPRelshpCatIsInFwdDirection = _BusPartRelStdAddress.BPRelshpCatIsInFwdDirection and _BusPartRelStdAddress.IsDefaultAddress = 'X'
[0..1] I_BusPartRelshpCategoryDesc _RelationshipCategoryText $projection.RelationshipCategory = _RelationshipCategoryText.RelationshipCategory and $projection.BusPartRelshpIsRoleDefinition = _RelationshipCategoryText.BusPartRelshpIsRoleDefinition and $projection.BPRelshpCatIsInFwdDirection = _RelationshipCategoryText.BPRelshpCatIsInFwdDirection
[0..1] I_BPRelshpCompanyInterestTP _BPRelshpCompanyInterest
[0..1] I_BPRelshpContactPersonTP _BPRelshpContactPerson
[0..*] I_BPRelshpCntctPersnAddressTP _BPRelshpCntctPersnAddress

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view
Search.searchable true view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
EndUserText.label RAP BO View for BUPA Relationship view
Metadata.ignorePropagatedAnnotations true view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner1 BusinessPartner1
KEY BusinessPartner2 BusinessPartner2
KEY ValidityEndDate
KEY RelationshipCategory RelationshipCategory
KEY BPRelshpCatIsInFwdDirection BPRelshpCatIsInFwdDirection
BusinessPartner1ForEdit BusinessPartner1
BusinessPartner2ForEdit BusinessPartner2
RelationshipCategoryForEdit RelationshipCategory
RelationshipNumber RelationshipNumber
ValidityStartDate ValidityStartDate
ValidityEndDateForEdit ValidityEndDate
BPRelshpCatIsInFwdDirForEdit BPRelshpCatIsInFwdDirection
IsStandardRelationship IsStandardRelationship
BPRelationshipType BPRelationshipType
BusPartRelshpIsRoleDefinition BusPartRelshpIsRoleDefinition
CreatedByUser CreatedByUser
CreationDate CreationDate
CreationTime CreationTime
LastChangedByUser LastChangedByUser
LastChangeDate LastChangeDate
LastChangeTime LastChangeTime
BusinessPartnerUUID
BusinessPartnerUUID1 _BusinessPartner1 BusinessPartnerUUID
BusinessPartnerUUID2 _BusinessPartner2 BusinessPartnerUUID
_BusinessPartner1 _BusinessPartner1
_BusinessPartner2 _BusinessPartner2
_RelationshipCategoryText _RelationshipCategoryText
_BusPartRelStdAddress _BusPartRelStdAddress
_BPRelshpCompanyInterest _BPRelshpCompanyInterest
_BPRelshpContactPerson _BPRelshpContactPerson
_BPRelshpCntctPersnAddress _BPRelshpCntctPersnAddress
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
//@AccessControl.privilegedAssociations:  [ '_BPDataControllerUsage1','_BPDataControllerUsage2' ]

@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER
@Search.searchable: true
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@EndUserText.label: 'RAP BO View for BUPA Relationship'
@Metadata.ignorePropagatedAnnotations: true
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ]  } */
define root view entity I_BusPartRelationshipTP
  as select from I_BPRelationshipUnion

  composition [0..1] of I_BPRelshpCompanyInterestTP   as _BPRelshpCompanyInterest

  composition [0..1] of I_BPRelshpContactPersonTP     as _BPRelshpContactPerson

  composition [0..*] of I_BPRelshpCntctPersnAddressTP as _BPRelshpCntctPersnAddress

  association [0..1] to I_BPRelshpCntctPersnAddressTP as _BusPartRelStdAddress     on  //   $projection.bpdrftuuid                 = _BusPartRelStdAddress.BPDrftUUID

                                                                                       //  and $projection.bprelshpuuid               = _BusPartRelStdAddress.BPRelshpUUID

                                                                                       $projection.BusinessPartner1            = _BusPartRelStdAddress.BusinessPartner1
                                                                                   and $projection.BusinessPartner2            = _BusPartRelStdAddress.BusinessPartner2
                                                                                   and $projection.ValidityEndDate             = _BusPartRelStdAddress.ValidityEndDate
                                                                                   and $projection.RelationshipCategory        = _BusPartRelStdAddress.RelationshipCategory
                                                                                   and $projection.BPRelshpCatIsInFwdDirection = _BusPartRelStdAddress.BPRelshpCatIsInFwdDirection
                                                                                   and _BusPartRelStdAddress.IsDefaultAddress  = 'X'



  association [0..1] to I_BusPartRelshpCategoryDesc   as _RelationshipCategoryText on  $projection.RelationshipCategory          = _RelationshipCategoryText.RelationshipCategory
                                                                                   and $projection.BusPartRelshpIsRoleDefinition = _RelationshipCategoryText.BusPartRelshpIsRoleDefinition
                                                                                   and $projection.BPRelshpCatIsInFwdDirection   = _RelationshipCategoryText.BPRelshpCatIsInFwdDirection
//  association [0..*] to I_BPDataControllerUsage       as _BPDataControllerUsage1   on  $projection.BusinessPartner1 = _BPDataControllerUsage1.BusinessPartner

//  association [0..*] to I_BPDataControllerUsage       as _BPDataControllerUsage2   on  $projection.BusinessPartner2 = _BPDataControllerUsage2.BusinessPartner


{
       //  key cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as BPDrftUUID,

       //  key cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as BPRelshpUUID,


       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
  key  BusinessPartner1,
       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
  key  BusinessPartner2,
  key  cast( ValidityEndDate as abap.char( 17 ))                          as ValidityEndDate,
       // key ValidityEndDate,

       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
  key  RelationshipCategory,
  key  BPRelshpCatIsInFwdDirection,
       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
       BusinessPartner1                                                   as BusinessPartner1ForEdit,
       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
       BusinessPartner2                                                   as BusinessPartner2ForEdit,
       @Search.defaultSearchElement: true
       @Search.ranking: #HIGH
       RelationshipCategory                                               as RelationshipCategoryForEdit,
       RelationshipNumber,
       ValidityStartDate,
       ValidityEndDate                                                    as ValidityEndDateForEdit,
       BPRelshpCatIsInFwdDirection                                        as BPRelshpCatIsInFwdDirForEdit,
       IsStandardRelationship,
       BPRelationshipType,
       BusPartRelshpIsRoleDefinition,
       //  ' '                                                                as BPRelshpCatIsInFwdDirection,

       // BPRelshpCatIsInFwdDirection,

       //Administrative Data

       CreatedByUser,
       CreationDate,
       CreationTime,
       LastChangedByUser,
       LastChangeDate,
       LastChangeTime,

       //Control fields

       cast(
         case
           when RelationshipCategory = 'BURC01'
             then ''
           else 'X'
         end as abap_boolean preserving type)                             as BPRelshpCoIntrstDataIsHidden,

       cast(
         case
           when RelationshipCategory = 'BUR001'
             then ''
           else 'X'
         end as abap_boolean preserving type)                             as BPRelshpCntctPersnDataIsHidden,

       // Fields for ETag calculation

       case when LastChangedByUser <> '' then concat(LastChangedByUser, concat( LastChangeDate, LastChangeTime ) )
             else concat(CreatedByUser, concat( CreationDate, CreationTime ) )
          end                                                             as ETag,
       cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as BusinessPartnerUUID,
       _BusinessPartner1.BusinessPartnerUUID as BusinessPartnerUUID1,
       _BusinessPartner2.BusinessPartnerUUID as BusinessPartnerUUID2,
       /* Associations */
       _BusinessPartner1,
       _BusinessPartner2,
       _RelationshipCategoryText,
       _BusPartRelStdAddress,

       //Compositions

       _BPRelshpCompanyInterest,
       _BPRelshpContactPerson,
       _BPRelshpCntctPersnAddress
//       _BPDataControllerUsage1,

//       _BPDataControllerUsage2


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BPRELATIONSHIPUNION",
"I_BUSINESSPARTNER"
],
"ASSOCIATED":
[
"I_BPRELSHPCNTCTPERSNADDRESSTP",
"I_BPRELSHPCOMPANYINTERESTTP",
"I_BPRELSHPCONTACTPERSONTP",
"I_BUSINESSPARTNER",
"I_BUSPARTRELSHPCATEGORYDESC"
],
"BASE":
[
"I_BPRELATIONSHIPUNION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/