I_BusPartContactPersonGov

DDL: I_BUSPARTCONTACTPERSONGOV Type: view_entity TRANSACTIONAL

Base Contact Person General Data

I_BusPartContactPersonGov is a Transactional CDS View that provides data about "Base Contact Person General Data" in SAP S/4HANA. It reads from 2 data sources (I_BusPartContactPersonProcess, I_BusPartContactPersonProcess) and exposes 68 fields with key fields MasterDataChangeProcess, MDChgProcessStep, MDChgProcessSrceSystem, MDChgProcessSrceObject, BPRelshpCatIsInFwdDirection. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BusPartContactPersonProcess _Current from
I_BusPartContactPersonProcess _Current union_all

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_BusPartRelationshipGov _RelationshipGov $projection.MasterDataChangeProcess = _RelationshipGov.MasterDataChangeProcess and $projection.MDChgProcessStep = _RelationshipGov.MDChgProcessStep and $projection.MDChgProcessSrceSystem = _RelationshipGov.MDChgProcessSrceSystem and $projection.MDChgProcessSrceObject = _RelationshipGov.MDChgProcessSrceObject and $projection.BPRelshpCatIsInFwdDirection = _RelationshipGov.BPRelshpCatIsInFwdDirection
[0..1] I_MasterDataChangeProcess _MasterDataChangeProcess $projection.MasterDataChangeProcess = _MasterDataChangeProcess.MasterDataChangeProcess

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Base Contact Person General Data view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #TRANSACTIONAL view

Fields (68)

KeyFieldSource TableSource FieldDescription
KEY MasterDataChangeProcess MasterDataChangeProcess
KEY MDChgProcessStep MDChgProcessStep
KEY MDChgProcessSrceSystem MDChgProcessSrceSystem
KEY MDChgProcessSrceObject MDChgProcessSrceObject
KEY BPRelshpCatIsInFwdDirection
ContactPersonFunction ContactPersonFunction
ContactPersonFunctionName ContactPersonFunctionName
ContactPersonDepartment ContactPersonDepartment
ContactPersonDepartmentName ContactPersonDepartmentName
ContactPersonAuthorityType ContactPersonAuthorityType
ContactPersonVIPType ContactPersonVIPType
ContactPersonRemarkText ContactPersonRemarkText
PhoneNumber PhoneNumber
PhoneNumberExtension PhoneNumberExtension
AddressFaxNumber AddressFaxNumber
FaxNumberExtension FaxNumberExtension
EmailAddress EmailAddress
KEY MDChgProcessStep MDChgProcessStep
KEY MDChgProcessSrceSystem MDChgProcessSrceSystem
KEY MDChgProcessSrceObject MDChgProcessSrceObject
KEY BPRelshpCatIsInFwdDirection
ContactPersonFunction ContactPersonFunction
ContactPersonFunctionName ContactPersonFunctionName
ContactPersonDepartment ContactPersonDepartment
ContactPersonDepartmentName ContactPersonDepartmentName
ContactPersonAuthorityType ContactPersonAuthorityType
ContactPersonVIPType ContactPersonVIPType
ContactPersonRemarkText ContactPersonRemarkText
PhoneNumber PhoneNumber
PhoneNumberExtension PhoneNumberExtension
AddressFaxNumber AddressFaxNumber
FaxNumberExtension FaxNumberExtension
EmailAddress EmailAddress
KEY MDChgProcessStep
KEY MDChgProcessSrceSystem
KEY MDChgProcessSrceObject
KEY BPRelshpCatIsInFwdDirection
ContactPersonFunction BPContactPersonFunction
ContactPersonFunctionName ContactPersonFunctionName
ContactPersonDepartment ContactPersonDepartment
ContactPersonDepartmentName ContactPersonDepartmentName
ContactPersonAuthorityType ContactPersonAuthorityType
ContactPersonVIPType ContactPersonVIPType
ContactPersonRemarkText ContactPersonRemarkText
PhoneNumber PhoneNumber
PhoneNumberExtension PhoneNumberExtension
AddressFaxNumber FaxNumber
FaxNumberExtension FaxNumberExtension
EmailAddress EmailAddress
MasterDataIsCurrent
KEY MDChgProcessStep
KEY MDChgProcessSrceSystem
KEY MDChgProcessSrceObject
KEY BPRelshpCatIsInFwdDirection
ContactPersonFunction BPContactPersonFunction
ContactPersonFunctionName ContactPersonFunctionName
ContactPersonDepartment ContactPersonDepartment
ContactPersonDepartmentName ContactPersonDepartmentName
ContactPersonAuthorityType ContactPersonAuthorityType
ContactPersonVIPType ContactPersonVIPType
ContactPersonRemarkText ContactPersonRemarkText
PhoneNumber PhoneNumber
PhoneNumberExtension PhoneNumberExtension
AddressFaxNumber FaxNumber
FaxNumberExtension FaxNumberExtension
EmailAddress EmailAddress
MasterDataIsCurrent
_RelationshipGov _RelationshipGov
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Base Contact Person General Data'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #TRANSACTIONAL
@VDM.usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ]
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ]  } */
define view entity I_BusPartContactPersonGov
  as select from I_BusPartContactPersonProcess as _Current
  association [0..1] to I_BusPartRelationshipGov  as _RelationshipGov         on  $projection.MasterDataChangeProcess     = _RelationshipGov.MasterDataChangeProcess
                                                                              and $projection.MDChgProcessStep            = _RelationshipGov.MDChgProcessStep
                                                                              and $projection.MDChgProcessSrceSystem      = _RelationshipGov.MDChgProcessSrceSystem
                                                                              and $projection.MDChgProcessSrceObject      = _RelationshipGov.MDChgProcessSrceObject
                                                                              and $projection.BPRelshpCatIsInFwdDirection = _RelationshipGov.BPRelshpCatIsInFwdDirection
  association [0..1] to I_MasterDataChangeProcess as _MasterDataChangeProcess on  $projection.MasterDataChangeProcess = _MasterDataChangeProcess.MasterDataChangeProcess
{
  key MasterDataChangeProcess,
  key MDChgProcessStep,
  key MDChgProcessSrceSystem,
  key MDChgProcessSrceObject,
  key cast( 'X' as abap.char(1) ) as BPRelshpCatIsInFwdDirection,
      ContactPersonFunction,
      ContactPersonFunctionName,
      ContactPersonDepartment,
      ContactPersonDepartmentName,
      ContactPersonAuthorityType,
      ContactPersonVIPType,
      ContactPersonRemarkText,
      PhoneNumber,
      PhoneNumberExtension,
      AddressFaxNumber,
      FaxNumberExtension,
      EmailAddress,
      //      _BPRelProcess.BP1AuthorizationGroup,

      //      _BPRelProcess.BP2AuthorizationGroup,

      cast(
      case when _Current.MDChgProcessStep = _MasterDataChangeProcess.MDChgProcessCurrentStepNumber and _MasterDataChangeProcess.MDChgProcessCurrentStepNumber <> '0000' or
                _Current.MDChgProcessStep = '0001' and  _MasterDataChangeProcess.MDChgProcessCurrentStepNumber = '0000' then 'X'
           else ' '
      end as abap_boolean preserving type
      )                           as MasterDataIsCurrent,
      _RelationshipGov
}
where
  _Current.MDChgProcessSourceModified <> 'D'
union all select from I_BusPartContactPersonProcess as _Current
association [0..1] to I_BusPartRelationshipGov  as _RelationshipGov         on  $projection.MasterDataChangeProcess     = _RelationshipGov.MasterDataChangeProcess
                                                                            and $projection.MDChgProcessStep            = _RelationshipGov.MDChgProcessStep
                                                                            and $projection.MDChgProcessSrceSystem      = _RelationshipGov.MDChgProcessSrceSystem
                                                                            and $projection.MDChgProcessSrceObject      = _RelationshipGov.MDChgProcessSrceObject
                                                                            and $projection.BPRelshpCatIsInFwdDirection = _RelationshipGov.BPRelshpCatIsInFwdDirection
association [0..1] to I_MasterDataChangeProcess as _MasterDataChangeProcess on  $projection.MasterDataChangeProcess = _MasterDataChangeProcess.MasterDataChangeProcess
{
  key MasterDataChangeProcess,
  key MDChgProcessStep,
  key MDChgProcessSrceSystem,
  key MDChgProcessSrceObject,
  key cast( ' ' as abap.char(1) ) as BPRelshpCatIsInFwdDirection,
      ContactPersonFunction,
      ContactPersonFunctionName,
      ContactPersonDepartment,
      ContactPersonDepartmentName,
      ContactPersonAuthorityType,
      ContactPersonVIPType,
      ContactPersonRemarkText,
      PhoneNumber,
      PhoneNumberExtension,
      AddressFaxNumber,
      FaxNumberExtension,
      EmailAddress,
      //      _BPRelProcess.BP2AuthorizationGroup as BP1AuthorizationGroup,

      //      _BPRelProcess.BP1AuthorizationGroup as BP2AuthorizationGroup,

      cast(
      case when _Current.MDChgProcessStep = _MasterDataChangeProcess.MDChgProcessCurrentStepNumber and _MasterDataChangeProcess.MDChgProcessCurrentStepNumber <> '0000' or
                _Current.MDChgProcessStep = '0001' and  _MasterDataChangeProcess.MDChgProcessCurrentStepNumber = '0000' then 'X'
           else ' '
      end as abap_boolean preserving type
      )                           as MasterDataIsCurrent,
      _RelationshipGov
}
where
  _Current.MDChgProcessSourceModified <> 'D'
union all

select distinct from I_BPContactToFuncAndDept as _BPRelContactPerson
association [0..1] to I_BusPartRelationshipGov as _RelationshipGov on  $projection.MasterDataChangeProcess     = _RelationshipGov.MasterDataChangeProcess
                                                                   and $projection.MDChgProcessStep            = _RelationshipGov.MDChgProcessStep
                                                                   and $projection.MDChgProcessSrceSystem      = _RelationshipGov.MDChgProcessSrceSystem
                                                                   and $projection.MDChgProcessSrceObject      = _RelationshipGov.MDChgProcessSrceObject
                                                                   and $projection.BPRelshpCatIsInFwdDirection = _RelationshipGov.BPRelshpCatIsInFwdDirection
{
  key '000000000000'                                                                                                                                    as MasterDataChangeProcess,
  key '0000'                                                                                                                                            as MDChgProcessStep,
  key ''                                                                                                                                                as MDChgProcessSrceSystem,
  key cast( concat( BusinessPartnerCompany, concat( '$$', concat( BusinessPartnerPerson, concat( '$$', RelationshipCategory ) ) ) )  as mdc_source_id ) as MDChgProcessSrceObject,
  key cast( 'X' as abap.char(1) )                                                                                                                       as BPRelshpCatIsInFwdDirection,
      BPContactPersonFunction                                                                                                                           as ContactPersonFunction,
      ContactPersonFunctionName,
      ContactPersonDepartment,
      ContactPersonDepartmentName,
      ContactPersonAuthorityType,
      ContactPersonVIPType,
      ContactPersonRemarkText,
      PhoneNumber,
      PhoneNumberExtension,
      FaxNumber                                                                                                                                         as AddressFaxNumber,
      FaxNumberExtension,
      EmailAddress,
      //      _BusinessPartnerCompany.AuthorizationGroup as BP1AuthorizationGroup,

      //      _BusinessPartnerPerson.AuthorizationGroup as BP2AuthorizationGroup,

      cast( 'X' as abap_boolean preserving type )                                                                                                       as MasterDataIsCurrent,
      _RelationshipGov
}
union all

select distinct from I_BPContactToFuncAndDept as _BPRelContactPerson
association [0..1] to I_BusPartRelationshipGov as _RelationshipGov on  $projection.MasterDataChangeProcess     = _RelationshipGov.MasterDataChangeProcess
                                                                   and $projection.MDChgProcessStep            = _RelationshipGov.MDChgProcessStep
                                                                   and $projection.MDChgProcessSrceSystem      = _RelationshipGov.MDChgProcessSrceSystem
                                                                   and $projection.MDChgProcessSrceObject      = _RelationshipGov.MDChgProcessSrceObject
                                                                   and $projection.BPRelshpCatIsInFwdDirection = _RelationshipGov.BPRelshpCatIsInFwdDirection
{
  key '000000000000'                                                                                                                                    as MasterDataChangeProcess,
  key '0000'                                                                                                                                            as MDChgProcessStep,
  key ''                                                                                                                                                as MDChgProcessSrceSystem,
  key cast( concat( BusinessPartnerCompany, concat( '$$', concat( BusinessPartnerPerson, concat( '$$', RelationshipCategory ) ) ) )  as mdc_source_id ) as MDChgProcessSrceObject,
  key cast( ' ' as abap.char(1) )                                                                                                                       as BPRelshpCatIsInFwdDirection,
      BPContactPersonFunction                                                                                                                           as ContactPersonFunction,
      ContactPersonFunctionName,
      ContactPersonDepartment,
      ContactPersonDepartmentName,
      ContactPersonAuthorityType,
      ContactPersonVIPType,
      ContactPersonRemarkText,
      PhoneNumber,
      PhoneNumberExtension,
      FaxNumber                                                                                                                                         as AddressFaxNumber,
      FaxNumberExtension,
      EmailAddress,
      //      _BusinessPartnerPerson.AuthorizationGroup as BP1AuthorizationGroup,

      //      _BusinessPartnerCompany.AuthorizationGroup as BP2AuthorizationGroup,

      cast( 'X' as abap_boolean preserving type )                                                                                                       as MasterDataIsCurrent,
      _RelationshipGov
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BPCONTACTTOFUNCANDDEPT",
"I_BUSPARTCONTACTPERSONPROCESS",
"I_MASTERDATACHANGEPROCESS"
],
"ASSOCIATED":
[
"I_BUSPARTRELATIONSHIPGOV"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/