I_Customer
Customer
I_Customer is a Basic CDS View (Dimension) that provides data about "Customer" in SAP S/4HANA. It reads from 1 data source (kna1). It has 18 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| kna1 | kna1 | from |
Associations (18)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CustomerToBusinessPartner | _CustomerToBusinessPartner | $projection.Customer = _CustomerToBusinessPartner.Customer |
| [0..1] | I_Supplier | _CorrespondingSupplier | _CorrespondingSupplier.Supplier = $projection.Supplier |
| [0..*] | I_CustomerAccountGroupText | _CustomerAccountGroupText | $projection.CustomerAccountGroup = _CustomerAccountGroupText.CustomerAccountGroup |
| [0..1] | I_CustomerClassification | _CustomerClassification | $projection.CustomerClassification = _CustomerClassification.CustomerClassification |
| [0..*] | I_CustomerClassificationText | _CustomerClassificationText | $projection.CustomerClassification = _CustomerClassificationText.CustomerClassification |
| [1..*] | I_CustomerCompany | _CustomerCompany | $projection.Customer = _CustomerCompany.Customer |
| [1..*] | I_CustomerSalesArea | _CustomerSalesArea | $projection.Customer = _CustomerSalesArea.Customer |
| [1..1] | I_User | _CreatedByUser | $projection.CreatedByUser = _CreatedByUser.UserID |
| [1..1] | I_Address | _StandardAddress | $projection.AddressID = _StandardAddress.AddressID |
| [1..*] | I_CustSalesAreaTax | _CustomerSalesAreaTax | $projection.Customer = _CustomerSalesAreaTax.Customer |
| [0..1] | E_Customer | _CustomerExt | $projection.Customer = _CustomerExt.Customer |
| [1..*] | I_CustAddrDepdntInformation | _CustomerAddr | $projection.Customer = _CustomerAddr.Customer |
| [1..*] | I_CustSlsAreaAddrDepdntTaxInfo | _CustomerAddrSalesAreaTax | $projection.Customer = _CustomerAddrSalesAreaTax.Customer |
| [0..*] | I_ContactPerson | _ContactPerson | $projection.Customer = _ContactPerson.Customer |
| [0..*] | I_CustUnivHierarchyNode | _CustomerHierarchyNode | $projection.Customer = _CustomerHierarchyNode.Customer |
| [0..1] | I_Globalcompany | _GlobalCompany | $projection.TradingPartner = _GlobalCompany.Company |
| [0..1] | I_OrganizationAddress | _AddressDefaultRepresentation | $projection.AddressID = _AddressDefaultRepresentation.AddressID and _AddressDefaultRepresentation.AddressRepresentationCode is initial |
| [0..1] | I_Address_2 | _AddressRepresentation | $projection.AddressID = _AddressRepresentation.AddressID and _AddressRepresentation.AddressRepresentationCode is initial and _AddressRepresentation.AddressPersonID is initial |
Annotations (18)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | I_CUSTOMER_CDS | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| AccessControl.personalData.blockingIndicator | IsBusinessPurposeCompleted | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.dataExtraction.enabled | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Customer | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| ObjectModel.representativeKey | Customer | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.sapObjectNodeType.name | Customer | view |
@AbapCatalog.sqlViewName: 'I_CUSTOMER_CDS'
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.personalData.blockingIndicator: 'IsBusinessPurposeCompleted'
@AccessControl.privilegedAssociations: [ '_StandardAddress', '_AddressDefaultRepresentation','_AddressRepresentation']
@Analytics: {
dataCategory: #DIMENSION,
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[
{
table: 'KNA1', role: #MAIN,
viewElement: ['Customer'],
tableElement: ['kunnr']
},
{
table: 'ADRC', role: #LEFT_OUTER_TO_ONE_JOIN,
viewElement: ['AddressID'],
tableElement: ['Addrnumber']
}
]
}
}
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Customer'
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.supportedCapabilities: [#SQL_DATA_SOURCE,
#CDS_MODELING_DATA_SOURCE,
#CDS_MODELING_ASSOCIATION_TARGET,
#ANALYTICAL_DIMENSION,
#EXTRACTION_DATA_SOURCE]
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.representativeKey: 'Customer'
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MASTER
@VDM.viewType: #BASIC
@ObjectModel.sapObjectNodeType.name: 'Customer'
define view I_Customer
as select from kna1
association [1..1] to I_CustomerToBusinessPartner as _CustomerToBusinessPartner on $projection.Customer = _CustomerToBusinessPartner.Customer
association [0..1] to I_Supplier as _CorrespondingSupplier on _CorrespondingSupplier.Supplier = $projection.Supplier
association [0..*] to I_CustomerAccountGroupText as _CustomerAccountGroupText on $projection.CustomerAccountGroup = _CustomerAccountGroupText.CustomerAccountGroup
association [0..1] to I_CustomerClassification as _CustomerClassification on $projection.CustomerClassification = _CustomerClassification.CustomerClassification
association [0..*] to I_CustomerClassificationText as _CustomerClassificationText on $projection.CustomerClassification = _CustomerClassificationText.CustomerClassification
association [1..*] to I_CustomerCompany as _CustomerCompany on $projection.Customer = _CustomerCompany.Customer
association [1..*] to I_CustomerSalesArea as _CustomerSalesArea on $projection.Customer = _CustomerSalesArea.Customer
association [1..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [1..1] to I_Address as _StandardAddress on $projection.AddressID = _StandardAddress.AddressID
association [1..*] to I_CustSalesAreaTax as _CustomerSalesAreaTax on $projection.Customer = _CustomerSalesAreaTax.Customer
association [0..1] to E_Customer as _CustomerExt on $projection.Customer = _CustomerExt.Customer
association [1..*] to I_CustAddrDepdntInformation as _CustomerAddr on $projection.Customer = _CustomerAddr.Customer
association [1..*] to I_CustSlsAreaAddrDepdntTaxInfo as _CustomerAddrSalesAreaTax on $projection.Customer = _CustomerAddrSalesAreaTax.Customer
association [0..*] to I_ContactPerson as _ContactPerson on $projection.Customer = _ContactPerson.Customer
association [0..*] to I_CustUnivHierarchyNode as _CustomerHierarchyNode on $projection.Customer = _CustomerHierarchyNode.Customer
association [0..1] to I_Globalcompany as _GlobalCompany on $projection.TradingPartner = _GlobalCompany.Company
// association [1..1] to I_BusinessPartnerAddress as _BusinessPartnerAddress on $projection.BusinessPartner = _BusinessPartnerAddress.BusinessPartner
// and $projection.AddressID = _BusinessPartnerAddress.AddressNumber
association [0..1] to I_OrganizationAddress as _AddressDefaultRepresentation on $projection.AddressID = _AddressDefaultRepresentation.AddressID
and _AddressDefaultRepresentation.AddressRepresentationCode is initial
association [0..1] to I_Address_2 as _AddressRepresentation on $projection.AddressID = _AddressRepresentation.AddressID
and _AddressRepresentation.AddressRepresentationCode is initial
and _AddressRepresentation.AddressPersonID is initial
{
//Key
@ObjectModel.text.element: ['CustomerName']
@ObjectModel: {
hierarchy.association: '_CustomerHierarchyNode'
}
key cast(kna1.kunnr as kunnr preserving type) as Customer,
//@VDM.deprecated:true
//Please use from association as _CustomerToBusinessPartner._BusinessPartner.BusinessPartner instead
//_cvi._BusinessPartner.BusinessPartner,
//@VDM.deprecated:true
//Please use from association as _CustomerToBusinessPartner.BusinessPartnerUUID instead
//_cvi.BusinessPartnerUUID,
// _CustomerToBusinessPartner._BusinessPartner.BusinessPartner as BusinessPartner,
@Semantics.text:true
cast(substring(rtrim(replace(concat(name1, concat(' &@', name2)), '&@', ''),' '),1,80) as md_customer_name) as CustomerName,
cast(concat( concat( concat( concat( concat( concat_with_space( anred, name1, 1 ), name2 ), name3 ), name4 ), '/' ),
concat_with_space(pstlz, ort01, 1 ) ) as md_customer_full_name) as CustomerFullName, //KF: different with S4
cast(substring(rtrim(replace(concat(_AddressDefaultRepresentation.AddresseeName1, concat(' &@', _AddressDefaultRepresentation.AddresseeName2)), '&@', ''),' '),1,81) as customername_2) as BPCustomerName,
cast(concat( concat_with_space( concat_with_space( concat_with_space(_AddressDefaultRepresentation.AddresseeName1, _AddressDefaultRepresentation.AddresseeName2,1 ), _AddressDefaultRepresentation.AddresseeName3,1 ), _AddressDefaultRepresentation.AddresseeName4,1 ), ' ' ) as md_customer_full_name) as BPCustomerFullName,
kna1.ernam as CreatedByUser,
kna1.erdat as CreationDate,
kna1.adrnr as AddressID,
@ObjectModel.foreignKey.association:'_CustomerClassification'
@ObjectModel.text.association: '_CustomerClassificationText'
kna1.kukla as CustomerClassification,
kna1.stceg as VATRegistration,
kna1.ktokd as CustomerAccountGroup,
kna1.begru as AuthorizationGroup,
kna1.lifsd as DeliveryIsBlocked,
kna1.sperr as PostingIsBlocked,
kna1.faksd as BillingIsBlockedForCustomer, // Used in CDS based Customer Object Page
kna1.aufsd as OrderIsBlockedForCustomer, //Used in CDS based Customer Object Page
@EndUserText.quickInfo: 'International Location Number (Part 1)'
kna1.bbbnr as InternationalLocationNumber1, //Used in CDS based Customer Object Page
kna1.xcpdk as IsOneTimeAccount,
kna1.txjcd as TaxJurisdiction,
kna1.brsch as Industry,
kna1.stcdt as TaxNumberType,
kna1.stcd1 as TaxNumber1, // same as kna1.stcd1 ?
kna1.stcd2 as TaxNumber2, // same as kna1.stcd2 ?
kna1.stcd3 as TaxNumber3,
kna1.stcd4 as TaxNumber4,
kna1.stcd5 as TaxNumber5,
kna1.stcd6 as TaxNumber6,
kna1.konzs as CustomerCorporateGroup,
kna1.lifnr as Supplier,
kna1.niels as NielsenRegion,
kna1.bran1 as IndustryCode1,
kna1.bran2 as IndustryCode2,
kna1.bran3 as IndustryCode3,
kna1.bran4 as IndustryCode4,
kna1.bran5 as IndustryCode5,
kna1.land1 as Country,
kna1.name1 as OrganizationBPName1,
kna1.name2 as OrganizationBPName2,
kna1.ort01 as CityName,
kna1.pstlz as PostalCode,
kna1.stras as StreetName,
kna1.sortl as SortField,
kna1.telfx as FaxNumber,
kna1.suframa as BR_SUFRAMACode,
kna1.regio as Region,
kna1.telf1 as TelephoneNumber1,
kna1.telf2 as TelephoneNumber2,
kna1.knrza as AlternativePayerAccount,
kna1.dtams as DataMediumExchangeIndicator,
kna1.stkzu as VATLiability,
kna1.cvp_xblck as IsBusinessPurposeCompleted,
kna1.fityp as ResponsibleType,
kna1.fiskn as FiscalAddress,
kna1.stkzn as NFPartnerIsNaturalPerson,
kna1.loevm as DeletionIndicator,
kna1.spras as Language,
@ObjectModel.foreignKey.association:'_GlobalCompany'
kna1.vbund as TradingPartner,
kna1.delivery_date_rule as DeliveryDateTypeRule,
kna1.bahne as ExpressTrainStationName,
kna1.bahns as TrainStationName,
@EndUserText.quickInfo: 'International Location Number (Part 2)'
kna1.bbsnr as InternationalLocationNumber2,
kna1.bubkz as InternationalLocationNumber3,
kna1.cityc as CityCode,
kna1.counc as County,
kna1.exabl as CustomerHasUnloadingPoint,
kna1.knazk as CustomerWorkingTimeCalendar,
kna1.dear1 as IsCompetitor,
j_1kfrepre as TaxInvoiceRepresentativeName,
j_1kftbus as BusinessType,
j_1kftind as IndustryType,
consolidate_invoice as TW_CollvBillingIsSupported,
xzemp as AlternativePayeeIsAllowed,
katr1 as FreeDefinedAttribute01,
katr2 as FreeDefinedAttribute02,
katr3 as FreeDefinedAttribute03,
katr4 as FreeDefinedAttribute04,
katr5 as FreeDefinedAttribute05,
katr6 as FreeDefinedAttribute06,
katr7 as FreeDefinedAttribute07,
katr8 as FreeDefinedAttribute08,
katr9 as FreeDefinedAttribute09,
katr10 as FreeDefinedAttribute10,
kna1.paytrsn as PaymentReason,
// Added Additional Fields
kna1.kdkg1 as CustomerConditionGroup1,
kna1.kdkg2 as CustomerConditionGroup2,
kna1.kdkg3 as CustomerConditionGroup3,
kna1.kdkg4 as CustomerConditionGroup4,
kna1.kdkg5 as CustomerConditionGroup5,
// kna1.anred as TitleCustomer,
// kna1.datlt as BPDataCommunicationPhoneNumber,
// kna1.locco as CityCoordinates,
// kna1.name3 as CustomerName3,
// kna1.name4 as CustomerName4,
// kna1.ort02 as CustomerDistrict,
// kna1.pfach as CustomerPostOfficeBox,
// kna1.pstl2 as PostalCodeForCustomer,
// kna1.rpmkr as CustomerRegionalMarket,
// kna1.telbx as CustomerTelephoneBoxNumber,
// kna1.teltx as CustomerTeletexNumber,
// kna1.telx1 as CustomerTelexNumber,
// kna1.lzone as CustomerTransportationZone,
// kna1.dear2 as IsSalesPartner,
@Semantics.booleanIndicator
kna1.dear3 as IsSalesProspect,
// kna1.dear5 as IsDefaultSoldToParty,
// kna1.gform as CustomerLegalStatus,
// kna1.ekont as CustomerInitialContact,
// kna1.umsat as CustomerAnnualSales,
// kna1.umjah as YearForWhichSalesGiven,
// kna1.uwaer as CurrencyOfSalesFigure,
// kna1.jmzah as CustYearlyNumberOfEmployees,
// kna1.jmjah as EmployeesNumberGivenForYear,
// kna1.umsa1 as AnnualSalesForCustomer,
// kna1.periv as CustomerFiscalYearVariant,
// kna1.abrvw as CustomerUsageIndication,
// kna1.inspbydebi as InspectionCarriedOutByCustomer,
// kna1.inspatdebi as DeliveryNoteInspectionOutBound,
// kna1.ktocd as CustomerReferenceAccountGroup,
// kna1.pfort as CustomerPostOfficeBoxCity,
// kna1.werks as CustomerPlant,
// kna1.dtaws as DataMediumExchangeKey,
// kna1.duefl as StatusOfDataTransfer,
// kna1.hzuor as HierarchyAssignment,
kna1.sperz as PaymentIsBlockedForCustomer,
// kna1.etikg as CustomerOrPlantGroupLabelling,
// kna1.civve as CustomerIsForCivilUse,
// kna1.milve as CustomerIdentityForMilitaryUse,
// kna1.xicms as CustomerExempt1,
// kna1.xxipi as CustomerExempt,
// kna1.xsubt as CustomerGroupForCalculation,
// kna1.cfopc as CustomerCategory,
// kna1.txlw1 as CustomerTaxLaw1,
// kna1.txlw2 as CustomerTaxLaw,
// kna1.cassd as CustomerCentralSalesBlock,
// kna1.knurl as UniformResourceLocatorForCust,
// kna1.confs as StatusOfChangeAuthorization,
// kna1.updat as ChangesConfirmedDate,
// kna1.uptim as LastChangeConfirmationTime,
// kna1.nodel as CustomerCentralDeletionIsBlock,
// kna1.stkza as BPSubjectToEqualizationTax,
// kna1.dear4 as CustomerType4,
// kna1.xknza as AlternativePayerUsingAccount,
// kna1.ccc01 as BioChemicalWarfareLegal,
// kna1.ccc02 as NuclearNonProliferationLegal,
// kna1.ccc03 as NationalSecurityLegalControl,
// kna1.ccc04 as MissileTechnologyLegalControl,
kna1.dear6 as IsConsumer,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.xdcset as DataControllerSet,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr1 as DataController1,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr2 as DataController2,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr3 as DataController3,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr4 as DataController4,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr5 as DataController5,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr6 as DataController6,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr7 as DataController7,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr8 as DataController8,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr9 as DataController9,
//added only for DCL check
@UI.hidden: true
@Consumption.filter.hidden: true
kna1.data_ctrlr10 as DataController10,
_AddressDefaultRepresentation.AddresseeName1 as BusinessPartnerName1,
_AddressDefaultRepresentation.AddresseeName2 as BusinessPartnerName2,
_AddressDefaultRepresentation.AddresseeName3 as BusinessPartnerName3,
_AddressDefaultRepresentation.AddresseeName4 as BusinessPartnerName4,
_AddressDefaultRepresentation.CityName as BPAddrCityName,
_AddressDefaultRepresentation.StreetName as BPAddrStreetName,
_AddressDefaultRepresentation.AddressSearchTerm1 as AddressSearchTerm1,
_AddressDefaultRepresentation.AddressSearchTerm2 as AddressSearchTerm2,
_AddressDefaultRepresentation.DistrictName as DistrictName,
_AddressDefaultRepresentation.POBoxDeviatingCityName as POBoxDeviatingCityName ,
_AddressDefaultRepresentation.FormOfAddress as BusinessPartnerFormOfAddress,
//Associations
_CustomerToBusinessPartner,
_StandardAddress,
_AddressDefaultRepresentation,
_AddressRepresentation,
_CreatedByUser,
_CorrespondingSupplier,
_CustomerClassification,
_CustomerClassificationText,
_CustomerAccountGroupText,
_CustomerCompany,
_CustomerSalesArea,
_CustomerSalesAreaTax,
_CustomerAddr,
_CustomerAddrSalesAreaTax,
_ContactPerson,
_CustomerHierarchyNode,
_GlobalCompany
// _BusinessPartnerAddress
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA