P_PL_SAFTDocItemVat

DDL: P_PL_SAFTDOCITEMVAT SQL: PPLSAFTDOCIVAT Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_PL

SAFT PL VAT Number Document Line Item

P_PL_SAFTDocItemVat is a Composite CDS View that provides data about "SAFT PL VAT Number Document Line Item" in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, P_PL_SAFTTaxItemAgg) and exposes 9 fields with key fields TaxType, CompanyCode, AccountingDocument, FiscalYear. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (2)

SourceAliasJoin Type
I_OperationalAcctgDocItem Item inner
P_PL_SAFTTaxItemAgg TaxItemAgg from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTDOCIVAT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY TaxType P_PL_SAFTTaxItemAgg TaxType
KEY CompanyCode P_PL_SAFTTaxItemAgg CompanyCode
KEY AccountingDocument P_PL_SAFTTaxItemAgg AccountingDocument
KEY FiscalYear P_PL_SAFTTaxItemAgg FiscalYear
AccountingDocumentItem
SupplyingCountry I_OperationalAcctgDocItem SupplyingCountry
VATRegistration I_OperationalAcctgDocItem VATRegistration
VatCountry
_SupplyingCountry I_OperationalAcctgDocItem _SupplyingCountry
@AbapCatalog.sqlViewName: 'PPLSAFTDOCIVAT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PL_SAFTDocItemVat
  as select from P_PL_SAFTTaxItemAgg       as TaxItemAgg

    inner join   I_OperationalAcctgDocItem as Item on  Item.CompanyCode          = TaxItemAgg.CompanyCode
                                                   and Item.AccountingDocument   = TaxItemAgg.AccountingDocument
                                                   and Item.FiscalYear           = TaxItemAgg.FiscalYear
{
  key TaxItemAgg.TaxType,
  key TaxItemAgg.CompanyCode,
  key TaxItemAgg.AccountingDocument,
  key TaxItemAgg.FiscalYear,

      max(Item.AccountingDocumentItem) as AccountingDocumentItem,
      Item.SupplyingCountry,
      Item.VATRegistration,
      substring(Item.VATRegistration,1,2) as VatCountry,
      
      //Associations

      Item._SupplyingCountry
      
} where Item.FinancialAccountType = 'D' or Item.FinancialAccountType = 'K'
group by  TaxItemAgg.TaxType,
TaxItemAgg.CompanyCode,
TaxItemAgg.AccountingDocument,
TaxItemAgg.FiscalYear,
Item.SupplyingCountry,
Item.VATRegistration