P_ARCustomerUnion
AR Customer Union
P_ARCustomerUnion is a Consumption CDS View that provides data about "AR Customer Union" in SAP S/4HANA. It reads from 5 data sources (I_Customer, I_Customer, I_CustomerCompany, P_ARCustomerSalesArea, P_ARCustomerSalesArea) and exposes 117 fields with key fields Customer, CompanyCode, SalesOrganization, DistributionChannel, Division. It has 2 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_Customer | _C | from |
| I_Customer | _C | union_all |
| I_CustomerCompany | _CC | left_outer |
| P_ARCustomerSalesArea | _CSA | left_outer |
| P_ARCustomerSalesArea | _CSA | left_outer |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CustomerCompany | _CustomerCompany | $projection.Customer = _CustomerCompany.Customer and $projection.CompanyCode = _CustomerCompany.CompanyCode |
| [0..1] | I_CustomerSalesArea | _CustomerSalesArea | $projection.Customer = _CustomerSalesArea.Customer and $projection.SalesOrganization = _CustomerSalesArea.SalesOrganization and $projection.DistributionChannel = _CustomerSalesArea.DistributionChannel and $projection.Division = _CustomerSalesArea.Division |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PARCUSTOMERUN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | AR Customer Union | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view |
Fields (117)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Customer | I_Customer | Customer | |
| KEY | CompanyCode | I_CustomerCompany | CompanyCode | |
| KEY | SalesOrganization | P_ARCustomerSalesArea | SalesOrganization | |
| KEY | DistributionChannel | P_ARCustomerSalesArea | DistributionChannel | |
| KEY | Division | P_ARCustomerSalesArea | Division | |
| KEY | CustomerIsWithCompanyCode | |||
| CustomerAccountGroup | I_Customer | CustomerAccountGroup | ||
| _CustomerAccountGroupText | I_Customer | _CustomerAccountGroupText | ||
| Supplier | I_Customer | Supplier | ||
| PostingIsBlocked | I_Customer | PostingIsBlocked | ||
| AuthorizationGroup | I_Customer | AuthorizationGroup | ||
| CreatedByUser | I_Customer | CreatedByUser | ||
| VATRegistration | I_Customer | VATRegistration | ||
| TaxNumber1 | I_Customer | TaxNumber1 | ||
| TaxNumber2 | I_Customer | TaxNumber2 | ||
| TaxNumber3 | I_Customer | TaxNumber3 | ||
| TaxNumber4 | I_Customer | TaxNumber4 | ||
| TaxNumber5 | I_Customer | TaxNumber5 | ||
| VATLiability | I_Customer | VATLiability | ||
| ResponsibleType | I_Customer | ResponsibleType | ||
| TaxNumberType | I_Customer | TaxNumberType | ||
| AddressID | I_Customer | AddressID | ||
| SalesOffice | _CustomerSalesArea | SalesOffice | ||
| SalesGroup | _CustomerSalesArea | SalesGroup | ||
| CustomerPaymentTerms | _CustomerSalesArea | CustomerPaymentTerms | ||
| AccountingClerk | _CustomerCompany | AccountingClerk | ||
| PaymentTerms | _CustomerCompany | PaymentTerms | ||
| PhysicalInventoryBlockInd | _CustomerCompany | PhysicalInventoryBlockInd | ||
| CreditMemoPaymentTerms | _CustomerCompany | CreditMemoPaymentTerms | ||
| PaymentMethodsList | _CustomerCompany | PaymentMethodsList | ||
| HouseBank | _CustomerCompany | HouseBank | ||
| PaymentBlockingReason | _CustomerCompany | PaymentBlockingReason | ||
| DunningNoticeGroup | _CustomerCompany | DunningNoticeGroup | ||
| AccountByCustomer | _CustomerCompany | AccountByCustomer | ||
| UserAtCustomer | _CustomerCompany | UserAtCustomer | ||
| AccountingClerkPhoneNumber | _CustomerCompany | AccountingClerkPhoneNumber | ||
| AccountingClerkInternetAddress | _CustomerCompany | AccountingClerkInternetAddress | ||
| ReconciliationAccount | _CustomerCompany | ReconciliationAccount | ||
| InterestCalculationCode | _CustomerCompany | InterestCalculationCode | ||
| IntrstCalcFrequencyInMonths | _CustomerCompany | IntrstCalcFrequencyInMonths | ||
| InterestCalculationDate | _CustomerCompany | InterestCalculationDate | ||
| LastInterestCalcRunDate | _CustomerCompany | LastInterestCalcRunDate | ||
| CustPreviousMasterRecordNumber | _CustomerCompany | CustPreviousMasterRecordNumber | ||
| CashPlanningGroup | _CustomerCompany | CashPlanningGroup | ||
| _CustomerToBusinessPartner | I_Customer | _CustomerToBusinessPartner | ||
| _StandardAddress | I_Customer | _StandardAddress | ||
| _CustomerCompany | _CustomerCompany | |||
| _CustomerSalesArea | _CustomerSalesArea | |||
| DataControllerSet | I_Customer | DataControllerSet | ||
| DataController1 | I_Customer | DataController1 | ||
| DataController2 | I_Customer | DataController2 | ||
| DataController3 | I_Customer | DataController3 | ||
| DataController4 | I_Customer | DataController4 | ||
| DataController5 | I_Customer | DataController5 | ||
| DataController6 | I_Customer | DataController6 | ||
| DataController7 | I_Customer | DataController7 | ||
| DataController8 | I_Customer | DataController8 | ||
| DataController9 | I_Customer | DataController9 | ||
| Customer | ||||
| KEY | CompanyCode | I_CustomerCompany | CompanyCode | |
| KEY | SalesOrganization | P_ARCustomerSalesArea | SalesOrganization | |
| KEY | DistributionChannel | P_ARCustomerSalesArea | DistributionChannel | |
| KEY | Division | P_ARCustomerSalesArea | Division | |
| KEY | CustomerIsWithCompanyCode | |||
| CustomerAccountGroup | I_Customer | CustomerAccountGroup | ||
| _CustomerAccountGroupText | I_Customer | _CustomerAccountGroupText | ||
| Supplier | I_Customer | Supplier | ||
| PostingIsBlocked | I_Customer | PostingIsBlocked | ||
| AuthorizationGroup | I_Customer | AuthorizationGroup | ||
| CreatedByUser | I_Customer | CreatedByUser | ||
| VATRegistration | I_Customer | VATRegistration | ||
| TaxNumber1 | I_Customer | TaxNumber1 | ||
| TaxNumber2 | I_Customer | TaxNumber2 | ||
| TaxNumber3 | I_Customer | TaxNumber3 | ||
| TaxNumber4 | I_Customer | TaxNumber4 | ||
| TaxNumber5 | I_Customer | TaxNumber5 | ||
| VATLiability | I_Customer | VATLiability | ||
| ResponsibleType | I_Customer | ResponsibleType | ||
| TaxNumberType | I_Customer | TaxNumberType | ||
| AddressID | I_Customer | AddressID | ||
| SalesOffice | _CustomerSalesArea | SalesOffice | ||
| SalesGroup | _CustomerSalesArea | SalesGroup | ||
| CustomerPaymentTerms | _CustomerSalesArea | CustomerPaymentTerms | ||
| AccountingClerk | _CustomerCompany | AccountingClerk | ||
| PaymentTerms | _CustomerCompany | PaymentTerms | ||
| PhysicalInventoryBlockInd | _CustomerCompany | PhysicalInventoryBlockInd | ||
| CreditMemoPaymentTerms | _CustomerCompany | CreditMemoPaymentTerms | ||
| PaymentMethodsList | _CustomerCompany | PaymentMethodsList | ||
| HouseBank | _CustomerCompany | HouseBank | ||
| PaymentBlockingReason | _CustomerCompany | PaymentBlockingReason | ||
| DunningNoticeGroup | _CustomerCompany | DunningNoticeGroup | ||
| AccountByCustomer | _CustomerCompany | AccountByCustomer | ||
| UserAtCustomer | _CustomerCompany | UserAtCustomer | ||
| AccountingClerkPhoneNumber | _CustomerCompany | AccountingClerkPhoneNumber | ||
| AccountingClerkInternetAddress | _CustomerCompany | AccountingClerkInternetAddress | ||
| ReconciliationAccount | _CustomerCompany | ReconciliationAccount | ||
| InterestCalculationCode | _CustomerCompany | InterestCalculationCode | ||
| IntrstCalcFrequencyInMonths | _CustomerCompany | IntrstCalcFrequencyInMonths | ||
| InterestCalculationDate | _CustomerCompany | InterestCalculationDate | ||
| LastInterestCalcRunDate | _CustomerCompany | LastInterestCalcRunDate | ||
| CustPreviousMasterRecordNumber | _CustomerCompany | CustPreviousMasterRecordNumber | ||
| CashPlanningGroup | _CustomerCompany | CashPlanningGroup | ||
| _CustomerToBusinessPartner | I_Customer | _CustomerToBusinessPartner | ||
| _StandardAddress | I_Customer | _StandardAddress | ||
| _CustomerCompany | _CustomerCompany | |||
| _CustomerSalesArea | _CustomerSalesArea | |||
| DataControllerSet | I_Customer | DataControllerSet | ||
| DataController1 | I_Customer | DataController1 | ||
| DataController2 | I_Customer | DataController2 | ||
| DataController3 | I_Customer | DataController3 | ||
| DataController4 | I_Customer | DataController4 | ||
| DataController5 | I_Customer | DataController5 | ||
| DataController6 | I_Customer | DataController6 | ||
| DataController7 | I_Customer | DataController7 | ||
| DataController8 | I_Customer | DataController8 | ||
| DataController9 | I_Customer | DataController9 | ||
| DataController10 | I_Customer | DataController10 |
@AbapCatalog.sqlViewName: 'PARCUSTOMERUN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'AR Customer Union'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view P_ARCustomerUnion as
select from I_Customer as _C
left outer join I_CustomerCompany as _CC
on _C.Customer = _CC.Customer
left outer join P_ARCustomerSalesArea as _CSA
on _C.Customer = _CSA.Customer
and _CC.CompanyCode = _CSA.CompanyCode
//select from I_CustomerCompany as _CC
//
// left outer to one join I_Customer as _C
// on _C.Customer = _CC.Customer
//
// // One CC can be assigned to more CSA, solved in second branch of union
// left outer to one join P_ARCustomerSalesArea as _CSA
// on _CC.Customer = _CSA.Customer
// and _CC.CompanyCode = _CSA.CompanyCode
association [0..1] to I_CustomerCompany as _CustomerCompany
on $projection.Customer = _CustomerCompany.Customer
and $projection.CompanyCode = _CustomerCompany.CompanyCode
association [0..1] to I_CustomerSalesArea as _CustomerSalesArea
on $projection.Customer = _CustomerSalesArea.Customer
and $projection.SalesOrganization = _CustomerSalesArea.SalesOrganization
and $projection.DistributionChannel = _CustomerSalesArea.DistributionChannel
and $projection.Division = _CustomerSalesArea.Division
{
key _C.Customer,
key _CC.CompanyCode as CompanyCode,
key _CSA.SalesOrganization as SalesOrganization,
key _CSA.DistributionChannel as DistributionChannel,
key _CSA.Division as Division,
key 'X' as CustomerIsWithCompanyCode,
_C.CustomerAccountGroup,
_C._CustomerAccountGroupText,
_C.Supplier,
_C.PostingIsBlocked,
_C.AuthorizationGroup,
_C.CreatedByUser,
_C.VATRegistration,
_C.TaxNumber1,
_C.TaxNumber2,
_C.TaxNumber3,
_C.TaxNumber4,
_C.TaxNumber5,
_C.VATLiability,
_C.ResponsibleType,
_C.TaxNumberType,
//new
_C.AddressID,
_CustomerSalesArea.SalesOffice,
_CustomerSalesArea.SalesGroup,
_CustomerSalesArea.CustomerPaymentTerms,
_CustomerCompany.AccountingClerk as AccountingClerk,
_CustomerCompany.PaymentTerms,
_CustomerCompany.PhysicalInventoryBlockInd,
_CustomerCompany.CreditMemoPaymentTerms,
_CustomerCompany.PaymentMethodsList,
_CustomerCompany.HouseBank,
_CustomerCompany.PaymentBlockingReason,
_CustomerCompany.DunningNoticeGroup,
_CustomerCompany.AccountByCustomer,
_CustomerCompany.UserAtCustomer,
_CustomerCompany.AccountingClerkPhoneNumber,
_CustomerCompany.AccountingClerkInternetAddress,
_CustomerCompany.ReconciliationAccount,
_CustomerCompany.InterestCalculationCode,
_CustomerCompany.IntrstCalcFrequencyInMonths,
_CustomerCompany.InterestCalculationDate,
_CustomerCompany.LastInterestCalcRunDate,
_CustomerCompany.CustPreviousMasterRecordNumber,
_CustomerCompany.CashPlanningGroup,
//instead of exposed fields
_C._CustomerToBusinessPartner,
_C._StandardAddress,
//used by consumption layer
_CustomerCompany,
_CustomerSalesArea,
//these fields are needed for DCL
_C.DataControllerSet,
_C.DataController1,
_C.DataController2,
_C.DataController3,
_C.DataController4,
_C.DataController5,
_C.DataController6,
_C.DataController7,
_C.DataController8,
_C.DataController9,
_C.DataController10
}
union all
select from I_Customer as _C
left outer join P_ARCustomerSalesArea as _CSA
on _C.Customer = _CSA.Customer
left outer to one join I_CustomerCompany as _CC
on _C.Customer = _CC.Customer
and _CC.CompanyCode = _CSA.CompanyCode
//select from P_ARCustomerSalesArea as _CSA
//
// left outer to one join I_Customer as _C
// on _C.Customer = _CSA.Customer
//
// left outer to one join I_CustomerCompany as _CC
// on _C.Customer = _CC.Customer
// and _CC.CompanyCode = _CSA.CompanyCode
association [0..1] to I_CustomerCompany as _CustomerCompany
on $projection.Customer = _CustomerCompany.Customer
and $projection.CompanyCode = _CustomerCompany.CompanyCode
association [0..1] to I_CustomerSalesArea as _CustomerSalesArea
on $projection.Customer = _CustomerSalesArea.Customer
and $projection.SalesOrganization = _CustomerSalesArea.SalesOrganization
and $projection.DistributionChannel = _CustomerSalesArea.DistributionChannel
and $projection.Division = _CustomerSalesArea.Division
{
key _C.Customer,
key _CC.CompanyCode as CompanyCode,
key _CSA.SalesOrganization as SalesOrganization,
key _CSA.DistributionChannel as DistributionChannel,
key _CSA.Division as Division,
key '' as CustomerIsWithCompanyCode,
_C.CustomerAccountGroup,
_C._CustomerAccountGroupText,
_C.Supplier,
_C.PostingIsBlocked,
_C.AuthorizationGroup,
_C.CreatedByUser,
_C.VATRegistration,
_C.TaxNumber1,
_C.TaxNumber2,
_C.TaxNumber3,
_C.TaxNumber4,
_C.TaxNumber5,
_C.VATLiability,
_C.ResponsibleType,
_C.TaxNumberType,
//new
_C.AddressID,
_CustomerSalesArea.SalesOffice,
_CustomerSalesArea.SalesGroup,
_CustomerSalesArea.CustomerPaymentTerms,
_CustomerCompany.AccountingClerk as AccountingClerk,
_CustomerCompany.PaymentTerms,
_CustomerCompany.PhysicalInventoryBlockInd,
_CustomerCompany.CreditMemoPaymentTerms,
_CustomerCompany.PaymentMethodsList,
_CustomerCompany.HouseBank,
_CustomerCompany.PaymentBlockingReason,
_CustomerCompany.DunningNoticeGroup,
_CustomerCompany.AccountByCustomer,
_CustomerCompany.UserAtCustomer,
_CustomerCompany.AccountingClerkPhoneNumber,
_CustomerCompany.AccountingClerkInternetAddress,
_CustomerCompany.ReconciliationAccount,
_CustomerCompany.InterestCalculationCode,
_CustomerCompany.IntrstCalcFrequencyInMonths,
_CustomerCompany.InterestCalculationDate,
_CustomerCompany.LastInterestCalcRunDate,
_CustomerCompany.CustPreviousMasterRecordNumber,
_CustomerCompany.CashPlanningGroup,
//instead of exposed fields
_C._CustomerToBusinessPartner,
_C._StandardAddress,
//used by consumption layer
_CustomerCompany,
_CustomerSalesArea,
//these fields are needed for DCL
_C.DataControllerSet,
_C.DataController1,
_C.DataController2,
_C.DataController3,
_C.DataController4,
_C.DataController5,
_C.DataController6,
_C.DataController7,
_C.DataController8,
_C.DataController9,
_C.DataController10
}
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