I_SAFTHeaderCA
SAF-T FI-CA Header
I_SAFTHeaderCA is a Composite CDS View that provides data about "SAF-T FI-CA Header" in SAP S/4HANA. It reads from 5 data sources (I_CompanyCode, I_FiscalYearVariant, I_CADocumentBPItemPhysical, I_FiscalCalendarDate, P_SAFTSumLineItemCA) and exposes 19 fields with key fields CompanyCode, FiscalYear, CADocumentNumber. It has 2 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | _CompCode | inner |
| I_FiscalYearVariant | _FiscalYearVariant | inner |
| I_CADocumentBPItemPhysical | FicaItem | inner |
| I_FiscalCalendarDate | FiscalYear | inner |
| P_SAFTSumLineItemCA | SumFicaLineItem | inner |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_CAReconciliationKey | fikey_kk |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_AccountingDocumentTypeText | _AccDocTypeText | FicaItem.CADocumentType = _AccDocTypeText.AccountingDocumentType |
| [1..1] | I_CADocumentType | _DocType | FicaItem.CADocumentType = _DocType.CADocumentType and FicaHeader.CAApplicationArea = _DocType.CAApplicationArea |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IHDRCA | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.dataMaintenance | #RESTRICTED | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | SAF-T FI-CA Header | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_CADocumentBPItemPhysical | CompanyCode | |
| KEY | FiscalYear | I_FiscalCalendarDate | FiscalYear | |
| KEY | CADocumentNumber | FicaHeader | CADocumentNumber | |
| CAApplicationArea | FicaHeader | CAApplicationArea | ||
| AccountingDocumentType | I_CADocumentBPItemPhysical | CADocumentType | ||
| AccountingDocumentTypeName | ||||
| AccountingDocumentHeaderText | ||||
| FiscalPeriod | I_FiscalCalendarDate | FiscalPeriod | ||
| PostingDate | FicaHeader | CAPostingDate | ||
| CompanyCodeCurrency | I_CADocumentBPItemPhysical | CompanyCodeCurrency | ||
| TotalGrossAmountInCoCodeCrcy | I_CADocumentBPItemPhysical | CAAmountInLocalCurrency | ||
| CreationDate | FicaHeader | CreationDate | ||
| CreatedByUser | FicaHeader | CreatedByUser | ||
| DocumentDate | FicaHeader | DocumentDate | ||
| TransactionCurrency | FicaHeader | TransactionCurrency | ||
| CADocumentClass | FicaHeader | CADocumentClass | ||
| _CompCode | I_CADocumentBPItemPhysical | _CompCode | ||
| _DocType | _DocType | |||
| _AccDocTypeText | _AccDocTypeText |
@AbapCatalog.sqlViewName: 'IHDRCA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AbapCatalog.dataMaintenance: #RESTRICTED
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'SAF-T FI-CA Header'
define view I_SAFTHeaderCA
with parameters
P_CAReconciliationKey : fikey_kk
as select distinct from I_CADocumentHeader as FicaHeader
inner join I_CADocumentBPItemPhysical as FicaItem on FicaItem.CADocumentNumber = FicaHeader.CADocumentNumber
inner join I_CompanyCode as _CompCode on FicaItem.CompanyCode = _CompCode.CompanyCode
inner join I_FiscalYearVariant as _FiscalYearVariant on _CompCode.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant
inner join I_FiscalCalendarDate as FiscalYear on FiscalYear.CalendarDate = FicaHeader.DocumentDate
and FiscalYear.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant
inner join P_SAFTSumLineItemCA as SumFicaLineItem on SumFicaLineItem.CADocumentNumber = FicaHeader.CADocumentNumber
association [0..*] to I_AccountingDocumentTypeText as _AccDocTypeText on FicaItem.CADocumentType = _AccDocTypeText.AccountingDocumentType
association [1..1] to I_CADocumentType as _DocType on FicaItem.CADocumentType = _DocType.CADocumentType
and FicaHeader.CAApplicationArea = _DocType.CAApplicationArea
{
key FicaItem.CompanyCode as CompanyCode,
key FiscalYear.FiscalYear as FiscalYear,
key FicaHeader.CADocumentNumber as CADocumentNumber,
FicaHeader.CAApplicationArea as CAApplicationArea,
FicaItem.CADocumentType as AccountingDocumentType,
coalesce(_AccDocTypeText[1: Language = $session.system_language].AccountingDocumentTypeName,' ') as AccountingDocumentTypeName,
'' as AccountingDocumentHeaderText,
@Semantics.fiscal.period: true
FiscalYear.FiscalPeriod as FiscalPeriod,
FicaHeader.CAPostingDate as PostingDate,
FicaItem.CompanyCodeCurrency as CompanyCodeCurrency,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
FicaItem.CAAmountInLocalCurrency as TotalGrossAmountInCoCodeCrcy,
case
when SumFicaLineItem.TotalGrossAmountInCoCodeCrcy > 0
then 'C' //credit - H
else 'D' //Debit - S
end as DebitCreditCode,
FicaHeader.CreationDate,
FicaHeader.CreatedByUser,
FicaHeader.DocumentDate,
FicaHeader.TransactionCurrency,
FicaHeader.CADocumentClass,
//Associations
FicaItem._CompCode,
_DocType,
_AccDocTypeText
}
where
FicaHeader.CAReconciliationKey = $parameters.P_CAReconciliationKey
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