C_PaRealignment

DDL: C_PAREALIGNMENT SQL: CPAREALGNMT Type: view CONSUMPTION

CO-PA Realignment Results

C_PaRealignment is a Consumption CDS View that provides data about "CO-PA Realignment Results" in SAP S/4HANA. It reads from 1 data source (I_PaRealignment) and exposes 94 fields with key fields SourceLedger, Ledger, FiscalYear, CompanyCode, AccountingDocument. It has 25 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PaRealignment I_PaRealignment from

Associations (25)

CardinalityTargetAliasCondition
[0..*] I_AccountingDocumentTypeText _AccountingDocumentTypeText $projection.AccountingDocumentType = _AccountingDocumentTypeText.AccountingDocumentType
[0..1] I_Customer _CustomerText $projection.Customer = _CustomerText.Customer
[0..1] I_Customer _PreviousCustomerText $projection.RealgnmtPrevCustomer = _PreviousCustomerText.Customer
[0..*] I_LedgerText _SourceLedgerText $projection.SourceLedger = _SourceLedgerText.Ledger
[0..1] I_Supplier _SupplierText $projection.Supplier = _SupplierText.Supplier
[1..1] I_JournalEntry _JournalEntry $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.FiscalYear = _JournalEntry.FiscalYear and $projection.AccountingDocument = _JournalEntry.AccountingDocument
[1..1] I_GLAccountLineItem _GLAccountLineItem $projection.Ledger = _GLAccountLineItem.Ledger and $projection.SourceLedger = _GLAccountLineItem.SourceLedger and $projection.CompanyCode = _GLAccountLineItem.CompanyCode and $projection.FiscalYear = _GLAccountLineItem.FiscalYear and $projection.AccountingDocument = _GLAccountLineItem.AccountingDocument and $projection.LedgerGLLineItem = _GLAccountLineItem.LedgerGLLineItem
[0..1] I_FiscalYearForCompanyCode _FiscalYear $projection.FiscalYear = _FiscalYear.FiscalYear and $projection.CompanyCode = _FiscalYear.CompanyCode
[0..1] I_Ledger _SourceLedger $projection.SourceLedger = _SourceLedger.Ledger
[0..*] I_LedgerText _LedgerText $projection.Ledger = _LedgerText.Ledger
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Ledger _Ledger $projection.Ledger = _Ledger.Ledger
[0..1] I_Material _SoldMaterial $projection.SoldMaterial = _SoldMaterial.Material
[0..1] I_Material _SoldMaterialPrevious $projection.RealgnmtPrevSoldMaterial = _SoldMaterialPrevious.Material
[0..1] I_ProfitCenter _ProfitCenter $projection.ControllingArea = _ProfitCenter.ControllingArea and $projection.ProfitCenter = _ProfitCenter.ProfitCenter and _ProfitCenter.ValidityStartDate <= $session.system_date and _ProfitCenter.ValidityEndDate >= $session.system_date
[0..1] I_FunctionalArea _FunctionalArea $projection.FunctionalArea = _FunctionalArea.FunctionalArea
[0..*] I_FunctionalAreaText _FunctionalAreaText $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
[0..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[0..1] I_CustomerGroup _CustomerGroup $projection.CustomerGroup = _CustomerGroup.CustomerGroup
[0..1] I_SalesDistrict _SalesDistrict $projection.SalesDistrict = _SalesDistrict.SalesDistrict
[0..1] I_GLAccountInCompanyCode _GLAccountInCompanyCode $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and $projection.GLAccount = _GLAccountInCompanyCode.GLAccount
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_Customer _CustomerPrevious $projection.RealgnmtPrevCustomer = _CustomerPrevious.Customer
[0..1] I_AccountingDocumentType _AccountingDocumentType $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType

Annotations (19)

NameValueLevelField
AbapCatalog.sqlViewName CPAREALGNMT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.representativeKey RealignmentRun view
ObjectModel.dataCategory #TEXT view
EndUserText.label CO-PA Realignment Results view
ObjectModel.compositionRoot true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
UI.headerInfo.typeName Realignment Results - Profitability Analysis view
UI.headerInfo.typeNamePlural Realigned Journal Entry Items view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.title.value AccountingDocument view
UI.headerInfo.description.type #STANDARD view
UI.headerInfo.description.value LedgerGLLineItem view

Fields (94)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger SourceLedger Source Ledger
KEY Ledger Ledger Ledger
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
KEY RealignmentRun RealignmentRun
RealignmentRunEndDate
RealignmentRunEndTime
RealignmentRunEndYear
RealignmentRunEndMonth
FiscalPeriod FiscalPeriod Tax period
PostingDate PostingDate Posting Date for GR
ProfitCenter ProfitCenter Profit Center
GLAccount GLAccount General Ledger
BusinessTransactionType BusinessTransactionType Bus.transaction
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
AmountInGlobalCurrency AmountInGlobalCurrency Amount in Global Currency
BalanceTransactionCurrency BalanceTransactionCurrency Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
Segment Segment Segment number
MaterialGroup MaterialGroup Product Group
RealgnmtPrevMaterialGroup
CustomerGroup CustomerGroup Customer Group
RealgnmtPrevCustomerGroup
FunctionalArea FunctionalArea Sendr Fctl Area
ControllingArea ControllingArea Controlling Area
SoldMaterial SoldMaterial Product Sold
RealgnmtPrevSoldMaterial
BillingDocumentType BillingDocumentType Billing Type
RealgnmtPrevBillgDocType
CustomerSupplierCountry CustomerSupplierCountry Customer or Supplier Country/Region
RealgnmtPrevCustSuplrCntry
SalesOrganization SalesOrganization Sales Organization
RealgnmtPrevSalesOrganization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
RealgnmtPrevDistrChannel
Plant Plant Valuation Area
RealgnmtPrevPlant
SalesOrder SalesOrder SD Document
RealgnmtPrevSalesOrder
SalesOrderItem SalesOrderItem Sales Order Item
RealgnmtPrevSalesOrderItem
Customer Customer Sold-to Party
RealgnmtPrevCustomer
RealgnmtPrevCustomerName
OrderID Order ID
RealgnmtPrevOrderID
SalesDistrict SalesDistrict Sales District
RealgnmtPrevSalesDistrict
ShipToParty ShipToParty Ship-To Party (obsolete)
RealgnmtPrevShipToParty
BillToParty BillToParty Inv. Recipient
RealgnmtPrevBillToParty
OrganizationDivision OrganizationDivision Org. Division
RealgnmtPrevOrgDivision
WBSElement WBSElement WBS Internal ID
RealgnmtPrevWBSElement
CostObject CostObject Cost Object
RealgnmtPrevCostObject
CostCenter CostCenter Cost Center
RealgnmtPrevCostCenter
Supplier Supplier Supplier
AccountingDocumentType AccountingDocumentType Journal Entry Type
NmbrOfRealignedJrnlEntryItems
_CompanyCode _CompanyCode
_Ledger _Ledger
_FunctionalArea _FunctionalArea
_MaterialGroup _MaterialGroup
_CustomerGroup _CustomerGroup
_SalesDistrict _SalesDistrict
_GLAccountLineItem _GLAccountLineItem
_SourceLedger _SourceLedger
_FiscalYear _FiscalYear
_JournalEntry _JournalEntry
_SoldMaterial _SoldMaterial
_SoldMaterialPrevious _SoldMaterialPrevious
_ProfitCenter _ProfitCenter
_GLAccountInCompanyCode _GLAccountInCompanyCode
_Supplier _Supplier
_Customer _Customer
_CustomerPrevious _CustomerPrevious
_AccountingDocumentType _AccountingDocumentType
GLAccountAuthorizationGroup _GLAccountInCompanyCode AuthorizationGroup AuthorizGroup
SupplierBasicAuthorizationGrp _Supplier AuthorizationGroup AuthorizGroup
CustomerBasicAuthorizationGrp _Customer AuthorizationGroup AuthorizGroup
AcctgDocTypeAuthorizationGroup _AccountingDocumentType AuthorizationGroup AuthorizGroup
_AccountingDocumentTypeText _AccountingDocumentTypeText
_CustomerText _CustomerText
_PreviousCustomerText _PreviousCustomerText
_SourceLedgerText _SourceLedgerText
_SupplierText _SupplierText

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_PaRealignment.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CPAREALGNMT

CREATE VIEW C_PaRealignment AS
SELECT
  SourceLedger,
  Ledger,
  FiscalYear,
  CompanyCode,
  AccountingDocument,
  LedgerGLLineItem,
  RealignmentRun,
  cast ( RealignmentRunEndDate as fins_realignment_date preserving type ) AS RealignmentRunEndDate,
  cast ( RealignmentRunEndTime as fins_realignment_time preserving type ) AS RealignmentRunEndTime,
  cast ( substring( RealignmentRunEndDate, 1, 4 ) as fins_realignment_year) AS RealignmentRunEndYear,
  cast ( substring( RealignmentRunEndDate, 5, 2 ) as fins_realignment_month) AS RealignmentRunEndMonth,
  FiscalPeriod,
  PostingDate,
  ProfitCenter,
  GLAccount,
  BusinessTransactionType,
  AmountInBalanceTransacCrcy,
  AmountInCompanyCodeCurrency,
  AmountInGlobalCurrency,
  BalanceTransactionCurrency,
  CompanyCodeCurrency,
  GlobalCurrency,
  Segment,
  MaterialGroup,
  cast ( RealgnmtPrevMaterialGroup as fins_prev_matkl preserving type) AS RealgnmtPrevMaterialGroup,
  CustomerGroup,
  cast ( RealgnmtPrevCustomerGroup as fins_prev_kdgrp preserving type) AS RealgnmtPrevCustomerGroup,
  FunctionalArea,
  ControllingArea,
  SoldMaterial,
  cast ( RealgnmtPrevSoldMaterial as fins_prev_matnr_pa preserving type) AS RealgnmtPrevSoldMaterial,
  BillingDocumentType,
  cast ( RealgnmtPrevBillgDocType as fins_prev_fkart preserving type) AS RealgnmtPrevBillgDocType,
  CustomerSupplierCountry,
  cast ( RealgnmtPrevCustSuplrCntry as fins_prev_land1 preserving type) AS RealgnmtPrevCustSuplrCntry,
  SalesOrganization,
  cast ( RealgnmtPrevSalesOrganization as fins_prev_vkorg preserving type) AS RealgnmtPrevSalesOrganization,
  DistributionChannel,
  cast ( RealgnmtPrevDistrChannel as fins_prev_vtweg preserving type) AS RealgnmtPrevDistrChannel,
  Plant,
  cast ( RealgnmtPrevPlant as fins_prev_werks preserving type) AS RealgnmtPrevPlant,
  SalesOrder,
  cast ( RealgnmtPrevSalesOrder as fins_prev_kdauf preserving type) AS RealgnmtPrevSalesOrder,
  SalesOrderItem,
  cast ( RealgnmtPrevSalesOrderItem as fins_prev_kdpos preserving type) AS RealgnmtPrevSalesOrderItem,
  Customer,
  cast ( RealgnmtPrevCustomer as fins_prev_kunnr preserving type ) AS RealgnmtPrevCustomer,
  cast ( _PreviousCustomerText.CustomerName as fins_prev_customername preserving type ) AS RealgnmtPrevCustomerName,
  cast ( OrderID as fins_int_aufnr preserving type ) AS OrderID,
  cast ( RealgnmtPrevOrderID as fins_prev_aufnr preserving type ) AS RealgnmtPrevOrderID,
  SalesDistrict,
  cast ( RealgnmtPrevSalesDistrict as fins_prev_bzirk preserving type) AS RealgnmtPrevSalesDistrict,
  ShipToParty,
  cast ( RealgnmtPrevShipToParty as fins_prev_kunwe preserving type) AS RealgnmtPrevShipToParty,
  BillToParty,
  cast ( RealgnmtPrevBillToParty as fins_prev_kunre preserving type) AS RealgnmtPrevBillToParty,
  OrganizationDivision,
  cast ( RealgnmtPrevOrgDivision as fins_prev_spart preserving type) AS RealgnmtPrevOrgDivision,
  WBSElement,
  cast ( RealgnmtPrevWBSElement as fins_prev_ps_posid preserving type) AS RealgnmtPrevWBSElement,
  CostObject,
  cast ( RealgnmtPrevCostObject as fins_prev_kstrg preserving type) AS RealgnmtPrevCostObject,
  CostCenter,
  cast ( RealgnmtPrevCostCenter as fins_prev_rcntr preserving type) AS RealgnmtPrevCostCenter,
  Supplier,
  AccountingDocumentType,
  cast ( NmbrOfRealignedJrnlEntryItems as fins_je_counter ) AS NmbrOfRealignedJrnlEntryItems,
  _GLAccountInCompanyCode.AuthorizationGroup AS GLAccountAuthorizationGroup,
  _Supplier.AuthorizationGroup AS SupplierBasicAuthorizationGrp,
  _Customer.AuthorizationGroup AS CustomerBasicAuthorizationGrp,
  _AccountingDocumentType.AuthorizationGroup AS AcctgDocTypeAuthorizationGroup
FROM I_PaRealignment
LEFT OUTER JOIN I_AccountingDocumentTypeText AS _AccountingDocumentTypeText ON AccountingDocumentType = _AccountingDocumentTypeText.AccountingDocumentType  -- association [0..*]
LEFT OUTER JOIN I_Customer AS _CustomerText ON Customer = _CustomerText.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _PreviousCustomerText ON RealgnmtPrevCustomer = _PreviousCustomerText.Customer  -- association [0..1]
LEFT OUTER JOIN I_LedgerText AS _SourceLedgerText ON SourceLedger = _SourceLedgerText.Ledger  -- association [0..*]
LEFT OUTER JOIN I_Supplier AS _SupplierText ON Supplier = _SupplierText.Supplier  -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _JournalEntry ON CompanyCode = _JournalEntry.CompanyCode AND FiscalYear = _JournalEntry.FiscalYear AND AccountingDocument = _JournalEntry.AccountingDocument  -- association [1..1]
LEFT OUTER JOIN I_GLAccountLineItem AS _GLAccountLineItem ON Ledger = _GLAccountLineItem.Ledger AND SourceLedger = _GLAccountLineItem.SourceLedger AND CompanyCode = _GLAccountLineItem.CompanyCode AND FiscalYear = _GLAccountLineItem.FiscalYear AND AccountingDocument = _GLAccountLineItem.AccountingDocument AND LedgerGLLineItem = _GLAccountLineItem.LedgerGLLineItem  -- association [1..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _FiscalYear ON FiscalYear = _FiscalYear.FiscalYear AND CompanyCode = _FiscalYear.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_Ledger AS _SourceLedger ON SourceLedger = _SourceLedger.Ledger  -- association [0..1]
LEFT OUTER JOIN I_LedgerText AS _LedgerText ON Ledger = _LedgerText.Ledger  -- association [0..*]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger  -- association [0..1]
LEFT OUTER JOIN I_Material AS _SoldMaterial ON SoldMaterial = _SoldMaterial.Material  -- association [0..1]
LEFT OUTER JOIN I_Material AS _SoldMaterialPrevious ON RealgnmtPrevSoldMaterial = _SoldMaterialPrevious.Material  -- association [0..1]
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON ControllingArea = _ProfitCenter.ControllingArea AND ProfitCenter = _ProfitCenter.ProfitCenter AND _ProfitCenter.ValidityStartDate <= $session.system_date AND _ProfitCenter.ValidityEndDate >= $session.system_date  -- association [0..1]
LEFT OUTER JOIN I_FunctionalArea AS _FunctionalArea ON FunctionalArea = _FunctionalArea.FunctionalArea  -- association [0..1]
LEFT OUTER JOIN I_FunctionalAreaText AS _FunctionalAreaText ON FunctionalArea = _FunctionalAreaText.FunctionalArea  -- association [0..*]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup  -- association [0..1]
LEFT OUTER JOIN I_CustomerGroup AS _CustomerGroup ON CustomerGroup = _CustomerGroup.CustomerGroup  -- association [0..1]
LEFT OUTER JOIN I_SalesDistrict AS _SalesDistrict ON SalesDistrict = _SalesDistrict.SalesDistrict  -- association [0..1]
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON CompanyCode = _GLAccountInCompanyCode.CompanyCode AND GLAccount = _GLAccountInCompanyCode.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _CustomerPrevious ON RealgnmtPrevCustomer = _CustomerPrevious.Customer  -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocumentType ON AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType  -- association [0..1]
;