I_SAFTAccountingItem
SAF-T Accounting Item
I_SAFTAccountingItem is a Basic CDS View that provides data about "SAF-T Accounting Item" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 31 fields with key fields AccountingDocument, FiscalYear, CompanyCode, AccountingDocumentItem. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_OperationalAcctgDocItem | a | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_OperationalAcctgDocItem | _ItemCustomer | _ItemCustomer.AccountingDocument = a.AccountingDocument and _ItemCustomer.CompanyCode = a.CompanyCode and _ItemCustomer.FiscalYear = a.FiscalYear and _ItemCustomer.FinancialAccountType = 'D' and _ItemCustomer.PostingKey = '01' |
| [0..1] | I_StRpTaxItem | _TaxItem | _TaxItem.AccountingDocument = a.AccountingDocument and _TaxItem.CompanyCode = a.CompanyCode and _TaxItem.FiscalYear = a.FiscalYear and _TaxItem.TaxCode = a.TaxCode |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ISAFTACCITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| EndUserText.label | SAF-T Accounting Item | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | AccountingDocument | I_OperationalAcctgDocItem | AccountingDocument | |
| KEY | FiscalYear | I_OperationalAcctgDocItem | FiscalYear | |
| KEY | CompanyCode | I_OperationalAcctgDocItem | CompanyCode | |
| KEY | AccountingDocumentItem | I_OperationalAcctgDocItem | AccountingDocumentItem | |
| ChartOfAccounts | I_OperationalAcctgDocItem | ChartOfAccounts | ||
| GLAccount | I_OperationalAcctgDocItem | GLAccount | ||
| Material | I_OperationalAcctgDocItem | Material | ||
| Quantityelse1endasQuantity | ||||
| CompanyCodeCurrency | I_OperationalAcctgDocItem | CompanyCodeCurrency | ||
| UnitOfMeasure | I_OperationalAcctgDocItem | BaseUnit | ||
| BaseUnit | I_OperationalAcctgDocItem | BaseUnit | ||
| DocumentDate | I_OperationalAcctgDocItem | DocumentDate | ||
| PostingDate | I_OperationalAcctgDocItem | PostingDate | ||
| DocumentItemText | I_OperationalAcctgDocItem | DocumentItemText | ||
| AmountInCompanyCodeCurrency | I_OperationalAcctgDocItem | AmountInCompanyCodeCurrency | ||
| TaxCode | I_OperationalAcctgDocItem | TaxCode | ||
| InvoiceReference | I_OperationalAcctgDocItem | InvoiceReference | ||
| InvoiceReferenceFiscalYear | I_OperationalAcctgDocItem | InvoiceReferenceFiscalYear | ||
| AccountingDocumentType | I_OperationalAcctgDocItem | AccountingDocumentType | ||
| PaymentMethod | I_OperationalAcctgDocItem | PaymentMethod | ||
| SpecialGLCode | I_OperationalAcctgDocItem | SpecialGLCode | ||
| FinancialAccountType | I_OperationalAcctgDocItem | FinancialAccountType | ||
| TaxAmountInCoCodeCrcy | I_OperationalAcctgDocItem | TaxAmountInCoCodeCrcy | ||
| _GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | |||
| _AccountingDocumentType | _AccountingDocumentType | |||
| _CompanyCodeCurrency | _CompanyCodeCurrency | |||
| _CompanyCode | _CompanyCode | |||
| _ItemCustomer | _ItemCustomer | |||
| _TaxItem | _TaxItem | |||
| _BaseUnit | _BaseUnit | |||
| _JournalEntry | _JournalEntry |
@AbapCatalog.sqlViewName: 'ISAFTACCITEM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'SAF-T Accounting Item'
define view I_SAFTAccountingItem as select from I_OperationalAcctgDocItem as a
association [0..1] to I_OperationalAcctgDocItem as _ItemCustomer on _ItemCustomer.AccountingDocument = a.AccountingDocument
and _ItemCustomer.CompanyCode = a.CompanyCode
and _ItemCustomer.FiscalYear = a.FiscalYear
and _ItemCustomer.FinancialAccountType = 'D'
and _ItemCustomer.PostingKey = '01'
association [0..1] to I_StRpTaxItem as _TaxItem on _TaxItem.AccountingDocument = a.AccountingDocument
and _TaxItem.CompanyCode = a.CompanyCode
and _TaxItem.FiscalYear = a.FiscalYear
and _TaxItem.TaxCode = a.TaxCode
//association [0..1] to P_SAFTACCT_TAXRATE as _TaxRateHasDecimals on _TaxRateHasDecimals.AccountingDocument = a.AccountingDocument
// and _TaxRateHasDecimals.CompanyCode = a.CompanyCode
// and _TaxRateHasDecimals.FiscalYear = a.FiscalYear
// and _TaxRateHasDecimals.TaxCode = a.TaxCode
{
key a.AccountingDocument as AccountingDocument,
key a.FiscalYear as FiscalYear,
key a.CompanyCode as CompanyCode,
key a.AccountingDocumentItem as AccountingDocumentItem ,
a.ChartOfAccounts,
a.GLAccount,
a.Material as Material,
case
when a.Quantity <> 0
then a.Quantity
else 1
end as Quantity,//MENGE,
a.CompanyCodeCurrency,
a.BaseUnit as UnitOfMeasure,
a.BaseUnit as BaseUnit,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
case
when a.Quantity <> 0
then division(abs(a.AmountInCompanyCodeCurrency),a.Quantity, 2 )
else abs(a.AmountInCompanyCodeCurrency)
end as NetPriceAmount,
a.DocumentDate as DocumentDate ,
a.PostingDate as PostingDate,
a.DocumentItemText,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
case
when a.DebitCreditCode = 'S' // Credit/debit need to be switched as is to reflect the customer accounting indicator
then abs(a.AmountInCompanyCodeCurrency)
else 0
end as DebitAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
case
when a.DebitCreditCode = 'H'
then abs(a.AmountInCompanyCodeCurrency)
else 0
end as CreditAmountInCoCodeCrcy,
a.AmountInCompanyCodeCurrency,
a.TaxCode as TaxCode,
// _TaxRateHasDecimals.ConditionCalculationType, //CE2011
a.InvoiceReference,
a.InvoiceReferenceFiscalYear,
a.AccountingDocumentType,
a.PaymentMethod,
a.SpecialGLCode,
a.FinancialAccountType,
a.TaxAmountInCoCodeCrcy,
_GLAccountInChartOfAccounts,
_AccountingDocumentType,
_CompanyCodeCurrency,
_CompanyCode,
_ItemCustomer,
_TaxItem,
_BaseUnit,
_JournalEntry
} where AccountingDocumentItemType <> 'T'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_COMPANYCODE",
"I_CURRENCY",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_JOURNALENTRY",
"I_OPERATIONALACCTGDOCITEM",
"I_STRPTAXITEM",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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