C_Customer360InternalContact

DDL: C_CUSTOMER360INTERNALCONTACT SQL: C360INTCONT Type: view_entity CONSUMPTION Package: ODATA_SD_ADVNCD_CUSTOMER360

Customer 360 Internal Contact

C_Customer360InternalContact is a Consumption CDS View that provides data about "Customer 360 Internal Contact" in SAP S/4HANA. It reads from 2 data sources (C_PartnerFunctionUnconverted, I_CustSalesPartnerFunc_2) and exposes 12 fields with key fields Customer, Personnel, PartnerFunction. It has 1 association to related views. It is exposed through 1 OData service (SD_ADVNCD_CUSTOMER360). Part of development package ODATA_SD_ADVNCD_CUSTOMER360.

Data Sources (2)

SourceAliasJoin Type
C_PartnerFunctionUnconverted _PartnerFunction inner
I_CustSalesPartnerFunc_2 InternalContact from

Associations (1)

CardinalityTargetAliasCondition
[1] I_PersonWorkAgreement_1 _WorkAgreement $projection.Personnel = _WorkAgreement.PersonWorkAgreement

Annotations (8)

NameValueLevelField
AccessControl.personalData.blocking #REQUIRED view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Customer 360 Internal Contact view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view

OData Services (1)

ServiceBindingVersionContractRelease
SD_ADVNCD_CUSTOMER360 SD_ADVNCD_CUSTOMER360 V4 C1 NOT_RELEASED

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY Customer I_CustSalesPartnerFunc_2 Customer
KEY Personnel I_CustSalesPartnerFunc_2 PersonnelNumber
KEY PartnerFunction C_PartnerFunctionUnconverted PartnerFunction
InternationalMobilePhoneNumber
InternationalPhoneNumber
EmailAddress
PartnerFunctionName
SalesOrganization I_CustSalesPartnerFunc_2 SalesOrganization
Division I_CustSalesPartnerFunc_2 Division
DistributionChannel I_CustSalesPartnerFunc_2 DistributionChannel
_CustomerSalesArea I_CustSalesPartnerFunc_2 _CustomerSalesArea
AuthorizationGroup
//@AbapCatalog.compiler.compareFilter: true

//@AbapCatalog.preserveKey: true

@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.personalData.blockingIndicator: [ 'IsBusinessPurposeCompleted' ]
@AbapCatalog.viewEnhancementCategory: [#NONE]
//@AbapCatalog.sqlViewName: 'C360INTCONT'

@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Customer 360 Internal Contact'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
    serviceQuality: #X,
    sizeCategory: #S,
    dataClass: #MIXED
}
@VDM.viewType: #CONSUMPTION


define view entity C_Customer360InternalContact as 
        select from I_CustSalesPartnerFunc_2 as InternalContact
    inner join C_PartnerFunctionUnconverted as _PartnerFunction on InternalContact.PartnerFunction = _PartnerFunction.PartnerFunction 
                                                               and _PartnerFunction.SDDocumentPartnerType = 'PE'
       association [1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.Personnel = _WorkAgreement.PersonWorkAgreement
                                                         
//    association [1] to C_PartnerFunctionUnconverted as _PartnerFunction on $projection.PartnerFunction = _PartnerFunction.PartnerFunction

//    association[1] to I_AddrCurDfltLandlinePhoneNmbr as _AddrCurDfltLandlinePhoneNmbr on $projection.AddressID = InternalContact.AddressID

//                                                                                        and InternalContact.AddressID != ''

    //association[0..1] to I_AddrCurDfltMobilePhoneNumber as _AddrCurDfltMobilePhoneNumber on $projection.AddressID = InternalContact.AddressID

    //association[0..1] to I_AddrCurDefaultEmailAddress   as _AddrCurDefaultEmailAddress   on $projection.AddressID = InternalContact.AddressID

//    association [1]   to I_PersonWorkplaceAddress       as _PersonWorkplaceAddress       on $projection.AddressID = InternalContact.AddressID

//                                                                                           and InternalContact.AddressID != '' 

    {
         key InternalContact.Customer,
         key InternalContact.PersonnelNumber as Personnel,
         key _PartnerFunction.PartnerFunction,
         case when _WorkAgreement.PersonFullName is initial
             then  cast( _WorkAgreement._WorkforcePerson.LastName as ad_namtext )
           else
             _WorkAgreement.PersonFullName 
          end as BusinessPartnerFullName,
          _WorkAgreement._WorkforcePerson._WorkplaceAddress.MblNormalizedPhoneNumber as InternationalMobilePhoneNumber,
          _WorkAgreement._WorkforcePerson._WorkplaceAddress.NormalizedPhoneNumber as InternationalPhoneNumber,
           _WorkAgreement._WorkforcePerson._WorkplaceAddress.DefaultEmailAddress as EmailAddress,   
         _PartnerFunction._Text[1:Language =  $session.system_language ].PartnerFunctionName,
         
         //DCL needs

         InternalContact.SalesOrganization,
         InternalContact.Division,
         InternalContact.DistributionChannel,
         InternalContact._CustomerSalesArea,
         InternalContact._CustomerSalesArea._Customer.AuthorizationGroup
} 
//where 

//_PartnerFunction.SDDocumentPartnerType = 'PE'

//and 

//InternalContact.Customer = 'TEST001'