I_PaRealignment

DDL: I_PAREALIGNMENT SQL: IPAREALGNMT Type: view COMPOSITE

CO-PA Realignment

I_PaRealignment is a Composite CDS View that provides data about "CO-PA Realignment" in SAP S/4HANA. It reads from 3 data sources (I_GLAccountLineItem, I_PaRealignmentHistory, I_PaRealignmentLog) and exposes 67 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
I_GLAccountLineItem I_GLAccountLineItem inner
I_PaRealignmentHistory I_PaRealignmentHistory inner
I_PaRealignmentLog I_PaRealignmentLog from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_WBSElement _WBSElement $projection.WBSElement = _WBSElement.WBSElement

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPAREALGNMT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label CO-PA Realignment view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view

Fields (67)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_GLAccountLineItem SourceLedger
KEY Ledger I_GLAccountLineItem Ledger
KEY CompanyCode I_GLAccountLineItem CompanyCode
KEY FiscalYear I_GLAccountLineItem FiscalYear
KEY AccountingDocument I_GLAccountLineItem AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItem LedgerGLLineItem
KEY RealignmentRun I_PaRealignmentLog RealignmentRun
ProfitCenter I_GLAccountLineItem ProfitCenter
RealignmentRunEndDate I_PaRealignmentLog RealignmentRunEndDate
RealignmentRunEndTime I_PaRealignmentLog RealignmentRunEndTime
FiscalPeriod I_GLAccountLineItem FiscalPeriod
PostingDate I_GLAccountLineItem PostingDate
BusinessTransactionType I_GLAccountLineItem BusinessTransactionType
AmountInBalanceTransacCrcy I_GLAccountLineItem AmountInBalanceTransacCrcy
BalanceTransactionCurrency I_GLAccountLineItem BalanceTransactionCurrency
AmountInCompanyCodeCurrency I_GLAccountLineItem AmountInCompanyCodeCurrency
CompanyCodeCurrency I_GLAccountLineItem CompanyCodeCurrency
AmountInGlobalCurrency I_GLAccountLineItem AmountInGlobalCurrency
GlobalCurrency I_GLAccountLineItem GlobalCurrency
GLAccount I_GLAccountLineItem GLAccount
FunctionalArea I_GLAccountLineItem FunctionalArea
Segment I_GLAccountLineItem Segment
AccountingDocumentType I_GLAccountLineItem AccountingDocumentType
Supplier I_GLAccountLineItem Supplier
ControllingArea I_GLAccountLineItem ControllingArea
RealgnmtPrevSoldMaterial I_PaRealignmentHistory RealgnmtPrevSoldMaterial
SoldMaterial I_GLAccountLineItem SoldProduct
RealgnmtPrevBillgDocType I_PaRealignmentHistory RealgnmtPrevBillgDocType
BillingDocumentType I_GLAccountLineItem BillingDocumentType
RealgnmtPrevCustomerGroup I_PaRealignmentHistory RealgnmtPrevCustomerGroup
CustomerGroup I_GLAccountLineItem CustomerGroup
RealgnmtPrevCustSuplrCntry I_PaRealignmentHistory RealgnmtPrevCustSuplrCntry
CustomerSupplierCountry I_GLAccountLineItem CustomerSupplierCountry
RealgnmtPrevMaterialGroup I_PaRealignmentHistory RealgnmtPrevMaterialGroup
MaterialGroup I_GLAccountLineItem SoldProductGroup
RealgnmtPrevSalesOrganization I_PaRealignmentHistory RealgnmtPrevSalesOrganization
SalesOrganization I_GLAccountLineItem SalesOrganization
RealgnmtPrevDistrChannel I_PaRealignmentHistory RealgnmtPrevDistrChannel
DistributionChannel I_GLAccountLineItem DistributionChannel
RealgnmtPrevPlant I_PaRealignmentHistory RealgnmtPrevPlant
Plant I_GLAccountLineItem Plant
RealgnmtPrevSalesOrder I_PaRealignmentHistory RealgnmtPrevSalesOrder
SalesOrder I_GLAccountLineItem SalesOrder
RealgnmtPrevSalesOrderItem I_PaRealignmentHistory RealgnmtPrevSalesOrderItem
SalesOrderItem I_GLAccountLineItem SalesOrderItem
RealgnmtPrevCustomer I_PaRealignmentHistory RealgnmtPrevCustomer
Customer I_GLAccountLineItem Customer
RealgnmtPrevOrderID I_PaRealignmentHistory RealgnmtPrevOrderID
OrderID I_GLAccountLineItem OrderID
RealgnmtPrevSalesDistrict I_PaRealignmentHistory RealgnmtPrevSalesDistrict
SalesDistrict I_GLAccountLineItem SalesDistrict
RealgnmtPrevShipToParty I_PaRealignmentHistory RealgnmtPrevShipToParty
ShipToParty I_GLAccountLineItem ShipToParty
RealgnmtPrevBillToParty I_PaRealignmentHistory RealgnmtPrevBillToParty
BillToParty I_GLAccountLineItem BillToParty
RealgnmtPrevOrgDivision I_PaRealignmentHistory RealgnmtPrevOrgDivision
OrganizationDivision I_GLAccountLineItem OrganizationDivision
WBSElementInternalID I_GLAccountLineItem WBSElementInternalID
RealgnmtPrevWBSElement I_PaRealignmentHistory RealgnmtPrevWBSElement
WBSElement _WBSElementInternalID WBSElement
RealgnmtPrevCostObject I_PaRealignmentHistory RealgnmtPrevCostObject
CostObject I_GLAccountLineItem CostObject
RealgnmtPrevCostCenter I_PaRealignmentHistory RealgnmtPrevCostCenter
CostCenter I_GLAccountLineItem CostCenter
_WBSElementInternalID _WBSElementInternalID
_WBSElement _WBSElement
NmbrOfRealignedJrnlEntryItems 1
@AbapCatalog.sqlViewName: 'IPAREALGNMT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED 
@EndUserText.label: 'CO-PA Realignment'
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
define view I_PaRealignment as select from I_PaRealignmentLog 
inner join I_PaRealignmentHistory on I_PaRealignmentLog.RealignmentRun = I_PaRealignmentHistory.RealignmentRun
inner join I_GLAccountLineItem on 
  I_GLAccountLineItem.Ledger             = I_PaRealignmentHistory.Ledger
                            and I_GLAccountLineItem.CompanyCode        = I_PaRealignmentHistory.CompanyCode
                            and I_GLAccountLineItem.FiscalYear         = I_PaRealignmentHistory.FiscalYear
                            and I_GLAccountLineItem.AccountingDocument = I_PaRealignmentHistory.AccountingDocument
                            and I_GLAccountLineItem.LedgerGLLineItem   = I_PaRealignmentHistory.LedgerGLLineItem  
                                                    
association [0..1] to I_WBSElement         as _WBSElement                              on $projection.WBSElement        = _WBSElement.WBSElement

{
key I_GLAccountLineItem.SourceLedger,
key I_GLAccountLineItem.Ledger as Ledger,
    key I_GLAccountLineItem.CompanyCode as CompanyCode,
    key I_GLAccountLineItem.FiscalYear as FiscalYear, 
    key I_GLAccountLineItem.AccountingDocument as AccountingDocument, 
    key I_GLAccountLineItem.LedgerGLLineItem as LedgerGLLineItem,
    key I_PaRealignmentLog.RealignmentRun as RealignmentRun,
    I_GLAccountLineItem.ProfitCenter as ProfitCenter,
    I_PaRealignmentLog.RealignmentRunEndDate as RealignmentRunEndDate,
    I_PaRealignmentLog.RealignmentRunEndTime as RealignmentRunEndTime,
    I_GLAccountLineItem.FiscalPeriod as FiscalPeriod,
    I_GLAccountLineItem.PostingDate as PostingDate,
//    I_GLAccountLineItem.FinancialTransactionType as FinancialTransactionType,

    I_GLAccountLineItem.BusinessTransactionType as BusinessTransactionType,
    @DefaultAggregation: #SUM
    @Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
    I_GLAccountLineItem.AmountInBalanceTransacCrcy as AmountInBalanceTransacCrcy,
    @Semantics.currencyCode:true
    I_GLAccountLineItem.BalanceTransactionCurrency as BalanceTransactionCurrency,
    @DefaultAggregation: #SUM
    @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
    I_GLAccountLineItem.AmountInCompanyCodeCurrency as AmountInCompanyCodeCurrency,
    @Semantics.currencyCode:true
    I_GLAccountLineItem.CompanyCodeCurrency as CompanyCodeCurrency,
    @DefaultAggregation: #SUM
    @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
    I_GLAccountLineItem.AmountInGlobalCurrency as AmountInGlobalCurrency,
    @Semantics.currencyCode:true
    I_GLAccountLineItem.GlobalCurrency as GlobalCurrency,
    I_GLAccountLineItem.GLAccount as GLAccount,
    I_GLAccountLineItem.FunctionalArea as FunctionalArea,
    I_GLAccountLineItem.Segment as Segment,
    I_GLAccountLineItem.AccountingDocumentType as AccountingDocumentType,
    I_GLAccountLineItem.Supplier as  Supplier,
     I_GLAccountLineItem.ControllingArea as ControllingArea,
    
   I_PaRealignmentHistory.RealgnmtPrevSoldMaterial as RealgnmtPrevSoldMaterial,
   I_GLAccountLineItem.SoldProduct as SoldMaterial,
   
   I_PaRealignmentHistory.RealgnmtPrevBillgDocType as RealgnmtPrevBillgDocType,
   I_GLAccountLineItem.BillingDocumentType as BillingDocumentType,
   
   I_PaRealignmentHistory.RealgnmtPrevCustomerGroup as RealgnmtPrevCustomerGroup,
   I_GLAccountLineItem.CustomerGroup as CustomerGroup,
   
   I_PaRealignmentHistory.RealgnmtPrevCustSuplrCntry as RealgnmtPrevCustSuplrCntry,
   I_GLAccountLineItem.CustomerSupplierCountry as CustomerSupplierCountry,
   
   I_PaRealignmentHistory.RealgnmtPrevMaterialGroup as RealgnmtPrevMaterialGroup,
   I_GLAccountLineItem.SoldProductGroup as MaterialGroup,
 
   I_PaRealignmentHistory.RealgnmtPrevSalesOrganization as RealgnmtPrevSalesOrganization,
   I_GLAccountLineItem.SalesOrganization as SalesOrganization,
   
   I_PaRealignmentHistory.RealgnmtPrevDistrChannel as RealgnmtPrevDistrChannel,
   I_GLAccountLineItem.DistributionChannel as DistributionChannel,
   
   I_PaRealignmentHistory.RealgnmtPrevPlant as RealgnmtPrevPlant,
   I_GLAccountLineItem.Plant as Plant,
   
   I_PaRealignmentHistory.RealgnmtPrevSalesOrder as RealgnmtPrevSalesOrder,
   I_GLAccountLineItem.SalesOrder as SalesOrder,
   
   I_PaRealignmentHistory.RealgnmtPrevSalesOrderItem as RealgnmtPrevSalesOrderItem,
   I_GLAccountLineItem.SalesOrderItem as SalesOrderItem,
   
   I_PaRealignmentHistory.RealgnmtPrevCustomer as RealgnmtPrevCustomer,
   I_GLAccountLineItem.Customer as Customer,
   
   I_PaRealignmentHistory.RealgnmtPrevOrderID as RealgnmtPrevOrderID,
   I_GLAccountLineItem.OrderID as OrderID,
   
   I_PaRealignmentHistory.RealgnmtPrevSalesDistrict as RealgnmtPrevSalesDistrict,
   I_GLAccountLineItem.SalesDistrict as SalesDistrict,
   
   I_PaRealignmentHistory.RealgnmtPrevShipToParty as RealgnmtPrevShipToParty,
   I_GLAccountLineItem.ShipToParty as ShipToParty,
   
   I_PaRealignmentHistory.RealgnmtPrevBillToParty as RealgnmtPrevBillToParty,
   I_GLAccountLineItem.BillToParty as BillToParty,
   
   I_PaRealignmentHistory.RealgnmtPrevOrgDivision as RealgnmtPrevOrgDivision,
   I_GLAccountLineItem.OrganizationDivision as OrganizationDivision,
   
   @ObjectModel.foreignKey.association: '_WBSElementInternalID'
   I_GLAccountLineItem.WBSElementInternalID as WBSElementInternalID,
   
   I_PaRealignmentHistory.RealgnmtPrevWBSElement as RealgnmtPrevWBSElement,
   @ObjectModel.foreignKey.association: '_WBSElement'
   _WBSElementInternalID.WBSElement as WBSElement,
//   I_GLAccountLineItem.WBSElement as WBSElement,

   
   I_PaRealignmentHistory.RealgnmtPrevCostObject as RealgnmtPrevCostObject,
   I_GLAccountLineItem.CostObject as CostObject,
   
   I_PaRealignmentHistory.RealgnmtPrevCostCenter as RealgnmtPrevCostCenter,
   I_GLAccountLineItem.CostCenter as CostCenter,
   
   _WBSElementInternalID,
   _WBSElement,
 
   1 as NmbrOfRealignedJrnlEntryItems
   
   
   

   
   
}