P_CN_CADEAssetRetirement
Asset Retirement Transaction for CADE
P_CN_CADEAssetRetirement is a Consumption CDS View that provides data about "Asset Retirement Transaction for CADE" in SAP S/4HANA. It reads from 2 data sources (I_CN_CADEGeneralInformation, I_FixedAssetTransaction) and exposes 33 fields with key fields CompanyCode, CN_CADENatlStdRelVersion, MasterFixedAsset, FixedAsset, FiscalYear. It has 2 associations to related views. Part of development package GLO_FIN_CADE_CN.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CN_CADEGeneralInformation | DepreciationArea | inner |
| I_FixedAssetTransaction | I_FixedAssetTransaction | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_FiscalYear | fis_gjahr | |
| P_FromFiscalPeriod | fins_fiscalperiod | |
| P_ToFiscalPeriod | fins_fiscalperiod |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_GLAccountLineItem | _Quantity | _Quantity.CompanyCode = JournalEntry.CompanyCode and _Quantity.Ledger = JournalEntry.Ledger and _Quantity.AccountingDocument = JournalEntry.AccountingDocument and _Quantity.ReferenceDocument = JournalEntry.ReferenceDocument and ( _Quantity.SubLedgerAcctLineItemType = '07040' or _Quantity.SubLedgerAcctLineItemType = '07000') and _Quantity.MasterFixedAsset = JournalEntry.MasterFixedAsset and _Quantity.FixedAsset = JournalEntry.FixedAsset and _Quantity.AssetDepreciationArea = JournalEntry.AssetDepreciationArea |
| [0..1] | I_AssetValuationForLedger | _ScrapAmount | _ScrapAmount.CompanyCode = JournalEntry.CompanyCode and _ScrapAmount.MasterFixedAsset = JournalEntry.MasterFixedAsset and _ScrapAmount.FixedAsset = JournalEntry.FixedAsset and _ScrapAmount.AssetRealDepreciationArea = JournalEntry.AssetDepreciationArea and _ScrapAmount.ValidityStartDate <= JournalEntry.PostingDate and _ScrapAmount.ValidityEndDate >= JournalEntry.PostingDate |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | PCADEASSETRETIRE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (33)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | JournalEntry | CompanyCode | Receiver Company Code |
| KEY | CN_CADENatlStdRelVersion | I_CN_CADEGeneralInformation | CN_CADENatlStdRelVersion | Release Version |
| KEY | MasterFixedAsset | MasterFixedAsset | Fixed Asset | |
| KEY | FixedAsset | FixedAsset | Sub-number | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | FiscalPeriod | FiscalPeriod | Tax period | |
| KEY | AssetDepreciationArea | JournalEntry | AssetDepreciationArea | Deprec. Area |
| KEY | LedgerGroup | LedgerGroup | Ledger Group | |
| KEY | Ledger | JournalEntry | Ledger | Ledger |
| KEY | ReferenceDocument | JournalEntry | ReferenceDocument | Reference Document |
| FixedAssetExternalID | FixedAssetExternalID | Asset Number | ||
| AssetSerialNumberendasAssetSerialNumber | ||||
| Inventory | _FixedAsset | Inventory | Ci Inventory | |
| FixedAssetDescription | _FixedAsset | FixedAssetDescription | Description | |
| AssetClass | _FixedAsset | AssetClass | Asset Class | |
| ChartOfDepreciation | ChartOfDepreciation | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| AssetTransactionVariant | AssetTransactionVariant | |||
| AcqnProdnCostScrapPercent | _ScrapAmount | AcqnProdnCostScrapPercent | ||
| BaseUnit | _Quantity | BaseUnit | Unit of Measure | |
| AssetValueDate | ||||
| Quantity | ||||
| DisplayCurrency | DisplayCurrency | Display Currency | ||
| AcqnProdnAmtInDspCrcy | ||||
| RetirementRevenueAmtInDspCrcy | ||||
| RetirementCostsAmtInDspCrcy | ||||
| RetirementDeprAmtInDspCrcy | ||||
| RetirementAmountInDspCrcy | ||||
| OrdinaryDeprAmtInDspCrcy | ||||
| SpecialDeprAmtInDspCrcy | ||||
| UnplannedDeprAmtInDspCrcy | ||||
| AssetTransactionType | ||||
| DocumentItemText |
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 P_CN_CADEAssetRetirement.
-- 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: PCADEASSETRETIRE
-- Parameters: P_FiscalYear : fis_gjahr, P_FromFiscalPeriod : fins_fiscalperiod, P_ToFiscalPeriod : fins_fiscalperiod
CREATE VIEW P_CN_CADEAssetRetirement AS
SELECT
JournalEntry.CompanyCode AS CompanyCode,
DepreciationArea.CN_CADENatlStdRelVersion AS CN_CADENatlStdRelVersion,
MasterFixedAsset,
FixedAsset,
FiscalYear,
FiscalPeriod,
JournalEntry.AssetDepreciationArea AS AssetDepreciationArea,
LedgerGroup,
JournalEntry.Ledger AS Ledger,
JournalEntry.ReferenceDocument AS ReferenceDocument,
FixedAssetExternalID,
case when _FixedAsset.AssetSerialNumber = '' then _FixedAsset.Inventory else _FixedAsset.AssetSerialNumber end as AssetSerialNumber AS AssetSerialNumberendasAssetSerialNumber,
_FixedAsset.Inventory AS Inventory,
_FixedAsset.FixedAssetDescription AS FixedAssetDescription,
_FixedAsset.AssetClass AS AssetClass,
ChartOfDepreciation,
PostingDate,
AssetTransactionVariant,
_ScrapAmount.AcqnProdnCostScrapPercent AS AcqnProdnCostScrapPercent,
_Quantity.BaseUnit AS BaseUnit,
max( AssetValueDate ) AS AssetValueDate,
max( _Quantity.Quantity ) AS Quantity,
DisplayCurrency,
sum( AcqnProdnAmtInDspCrcy ) AS AcqnProdnAmtInDspCrcy,
sum(RetirementRevenueAmtInDspCrcy) AS RetirementRevenueAmtInDspCrcy,
sum(RetirementCostsAmtInDspCrcy) AS RetirementCostsAmtInDspCrcy,
sum(RetirementDeprAmtInDspCrcy) AS RetirementDeprAmtInDspCrcy,
sum(RetirementAmountInDspCrcy) AS RetirementAmountInDspCrcy,
sum(OrdinaryDeprAmtInDspCrcy) AS OrdinaryDeprAmtInDspCrcy,
sum(SpecialDeprAmtInDspCrcy) AS SpecialDeprAmtInDspCrcy,
sum(UnplannedDeprAmtInDspCrcy) AS UnplannedDeprAmtInDspCrcy,
max(JournalEntry.AssetTransactionType) AS AssetTransactionType,
max(JournalEntry.DocumentItemText) AS DocumentItemText
FROM I_FixedAssetTransaction
INNER JOIN I_CN_CADEGeneralInformation AS DepreciationArea ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_GLAccountLineItem AS _Quantity ON _Quantity.CompanyCode = JournalEntry.CompanyCode AND _Quantity.Ledger = JournalEntry.Ledger AND _Quantity.AccountingDocument = JournalEntry.AccountingDocument AND _Quantity.ReferenceDocument = JournalEntry.ReferenceDocument AND ( _Quantity.SubLedgerAcctLineItemType = '07040' OR _Quantity.SubLedgerAcctLineItemType = '07000') AND _Quantity.MasterFixedAsset = JournalEntry.MasterFixedAsset AND _Quantity.FixedAsset = JournalEntry.FixedAsset AND _Quantity.AssetDepreciationArea = JournalEntry.AssetDepreciationArea -- association [0..1]
LEFT OUTER JOIN I_AssetValuationForLedger AS _ScrapAmount ON _ScrapAmount.CompanyCode = JournalEntry.CompanyCode AND _ScrapAmount.MasterFixedAsset = JournalEntry.MasterFixedAsset AND _ScrapAmount.FixedAsset = JournalEntry.FixedAsset AND _ScrapAmount.AssetRealDepreciationArea = JournalEntry.AssetDepreciationArea AND _ScrapAmount.ValidityStartDate <= JournalEntry.PostingDate AND _ScrapAmount.ValidityEndDate >= JournalEntry.PostingDate -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA