I_FixedAssetTaxItem

DDL: I_FIXEDASSETTAXITEM SQL: IFATAXITEM Type: view COMPOSITE

Tax Items for Fixed Asset

I_FixedAssetTaxItem is a Composite CDS View that provides data about "Tax Items for Fixed Asset" in SAP S/4HANA. It reads from 4 data sources (I_OperationalAcctgDocItem, I_Currency, I_FixedAsset, P_TW_TaxItem) and exposes 27 fields with key fields AccountingDocument, CompanyCode, FiscalYear, AccountingDocumentItem, TaxGroup.

Data Sources (4)

SourceAliasJoin Type
I_OperationalAcctgDocItem AcctgDocItem inner
I_Currency cur left_outer
I_FixedAsset fixedAsset left_outer
P_TW_TaxItem P_TW_TaxItem from

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_StatryRptRunType srf_report_run_type

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IFATAXITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label Tax Items for Fixed Asset view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem
KEY TaxGroup taxItem TaxGroup
DocumentReferenceID
Quantity I_OperationalAcctgDocItem Quantity
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency
AmountInCompanyCodeCurrency
CE2005
DocumentDate
PostingDate I_OperationalAcctgDocItem PostingDate
ReportingDate taxItem ReportingDate
FiscalPeriod
TaxAmount taxItem TaxAmount
TaxItemGroup taxItem TaxItemGroup
BusinessPlace taxItem BusinessPlace
TaxCode taxItem TaxCode
TaxRate taxItem TaxRate
TaxRateValidityStartDate taxItem TaxRateValidityStartDate
Supplier taxItem Supplier
Customer taxItem Customer
CustomerCountry taxItem CustomerCountry
SupplierCountry taxItem SupplierCountry
AccountingDocumentClass taxItem FormatCode
FixedAssetDescription I_FixedAsset FixedAssetDescription
AssetAdditionalDescription I_FixedAsset AssetAdditionalDescription
@AbapCatalog.sqlViewName: 'IFATAXITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck:#NOT_REQUIRED
//@AccessControl.personalData.blocking: #NOT_REQUIRED          //CE2005

@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED   //CE2005

@EndUserText.label: 'Tax Items for Fixed Asset'
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
define view I_FixedAssetTaxItem 
    with parameters
      P_StatryRptgEntity  : srf_reporting_entity,
      P_StatryRptCategory : srf_rep_cat_id,
      P_StatryRptRunID    : srf_report_run_id,
      P_StatryRptRunType  : srf_report_run_type 
      
as select from P_TW_TaxItem (
                    P_StatryRptgEntity  :$parameters.P_StatryRptgEntity ,
                    P_StatryRptCategory :$parameters.P_StatryRptCategory,                 
                    P_StatryRptRunID    :$parameters.P_StatryRptRunID,
                    P_StatryRptRunType  :$parameters.P_StatryRptRunType
                                                     ) as taxItem
inner join I_OperationalAcctgDocItem as AcctgDocItem
    on  taxItem.AccountingDocument    = AcctgDocItem.AccountingDocument
    and taxItem.CompanyCode           = AcctgDocItem.CompanyCode
    and taxItem.FiscalYear            = AcctgDocItem.FiscalYear
    and taxItem.TaxItemGroup          = AcctgDocItem.TaxItemGroup   //CE2108 : Internal Incident: 2180172804

left outer join I_FixedAsset as fixedAsset
    on AcctgDocItem.CompanyCode = fixedAsset.CompanyCode
    and AcctgDocItem.MasterFixedAsset = fixedAsset.MasterFixedAsset
    and AcctgDocItem.FixedAsset = fixedAsset.FixedAsset 
left outer join I_Currency as cur on AcctgDocItem.CompanyCodeCurrency = cur.Currency
     {
    
    key AcctgDocItem.AccountingDocument,
    key AcctgDocItem.CompanyCode,
    key AcctgDocItem.FiscalYear,
    key AcctgDocItem.AccountingDocumentItem,
    key taxItem.TaxGroup,
    AcctgDocItem._JournalEntry.DocumentReferenceID, //Reference Number

    AcctgDocItem.Quantity,
    @Semantics.currencyCode:true
    AcctgDocItem.CompanyCodeCurrency,     
    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode:'CompanyCodeCurrency'  
    cast( AcctgDocItem.AmountInCompanyCodeCurrency as abap.curr(10, 2))      as AmountInCompanyCodeCurrency,   --CE2005, remove decimal_shift function
    //AcctgDocItem.AmountInCompanyCodeCurrency,

//    cast(decimal_shift( amount => AcctgDocItem.AmountInCompanyCodeCurrency,   --CE2005, remove decimal_shift function

//      currency => AcctgDocItem.CompanyCodeCurrency ) as  abap.dec(12, 0)) as AmountInCompanyCodeCurrency,

    AcctgDocItem.DocumentDate,   
    AcctgDocItem.PostingDate,
    taxItem.ReportingDate,
    cast(cast(cast(left(
    cast(AcctgDocItem.DocumentDate as sstring),4) as abap.numc( 4 )) as int4) - 1911 
    as sstring)   as TaiwaneseCalendarYear,

    substring(cast(AcctgDocItem.DocumentDate as sstring),5, 2)                      as FiscalPeriod,
    @Semantics.amount.currencyCode:'CompanyCodeCurrency'  
    taxItem.TaxAmount,
    taxItem.TaxItemGroup,
    taxItem.BusinessPlace,
    taxItem.TaxCode,
    taxItem.TaxRate,
    taxItem.TaxRateValidityStartDate,  //CE2108 TDT

    taxItem.Supplier,
    taxItem.Customer,
    taxItem.CustomerCountry,
    taxItem.SupplierCountry,
    taxItem.FormatCode as AccountingDocumentClass,
    
    fixedAsset.FixedAssetDescription,
    fixedAsset.AssetAdditionalDescription
    
}
where taxItem.TaxType = 'V' //input

  and taxItem.IsReversal = '' //delete reversal documents

  and taxItem.IsReversed = '' //delete reversed documents

  and AcctgDocItem.FinancialAccountType = 'A' //Account type: Asset