I_PL_SAFTGetInvoiceHeader

DDL: I_PL_SAFTGETINVOICEHEADER Type: view_entity COMPOSITE Package: GLO_FIN_IS_SAFT_PL

SAFT PL FA Invoice Header

I_PL_SAFTGetInvoiceHeader is a Composite CDS View (Cube) that provides data about "SAFT PL FA Invoice Header" in SAP S/4HANA. It reads from 2 data sources (I_TaxItem, P_PL_SAFTInvoiceHeaderVersion2) and exposes 23 fields with key fields CompanyCode, AccountingDocument, FiscalYear. Part of development package GLO_FIN_IS_SAFT_PL.

Data Sources (2)

SourceAliasJoin Type
I_TaxItem I_TaxItem inner
P_PL_SAFTInvoiceHeaderVersion2 P_PL_SAFTInvoiceHeaderVersion2 from

Parameters (4)

NameTypeDefault
P_StartDate datum
P_EndDate datum
P_PL_CheckForLandText land1
P_CompanyCode bukrs

Annotations (11)

NameValueLevelField
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
Analytics.technicalName IPLSAFTGETHEAD view
Analytics.internalName #LOCAL view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.authorizationCheck #MANDATORY view
Metadata.allowExtensions true view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label SAFT PL FA Invoice Header view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_PL_SAFTInvoiceHeaderVersion2 CompanyCode
KEY AccountingDocument P_PL_SAFTInvoiceHeaderVersion2 AccountingDocument
KEY FiscalYear P_PL_SAFTInvoiceHeaderVersion2 FiscalYear
VATRegistration P_PL_SAFTInvoiceHeaderVersion2 VATRegistration
CustomerSupplierName P_PL_SAFTInvoiceHeaderVersion2 CustomerSupplierName
PL_SAFTCustomerSupplierAddress P_PL_SAFTInvoiceHeaderVersion2 CustomerSupplierAddress
PL_SAFTCustomerSupplierCountry P_PL_SAFTInvoiceHeaderVersion2 CustomerSupplierCountry
CompanyVATRegistration P_PL_SAFTInvoiceHeaderVersion2 CompanyVATRegistration
CompanyName P_PL_SAFTInvoiceHeaderVersion2 CompanyName
PL_SAFTCompanyCodeAddress P_PL_SAFTInvoiceHeaderVersion2 CompanyCodeAddress
PL_SAFTCountry P_PL_SAFTInvoiceHeaderVersion2 Country
PL_SAFTInvoiceDocumentNumber P_PL_SAFTInvoiceHeaderVersion2 InvoiceDocumentNumber
PL_SAFTInvoiceType P_PL_SAFTInvoiceHeaderVersion2 PL_SAFTInvoiceType
DocumentDate P_PL_SAFTInvoiceHeaderVersion2 DocumentDate
DeliveryDate P_PL_SAFTInvoiceHeaderVersion2 DeliveryDate
IsEUTriangularDeal P_PL_SAFTInvoiceHeaderVersion2 IsEUTriangularDeal
PL_SAFTCorrectionInvoice P_PL_SAFTInvoiceHeaderVersion2 CorrectionInvoice
SDDocumentReasonText P_PL_SAFTInvoiceHeaderVersion2 SDDocumentReasonText
TransactionCurrency P_PL_SAFTInvoiceHeaderVersion2 TransactionCurrency
AmountInTransactionCurrency P_PL_SAFTInvoiceHeaderVersion2 AmountInTransactionCurrency
TaxItem
IsReversal P_PL_SAFTInvoiceHeaderVersion2 IsReversal
IsReversed P_PL_SAFTInvoiceHeaderVersion2 IsReversed
@VDM.viewType: #COMPOSITE
@Analytics: { dataCategory: #CUBE }
@Analytics.technicalName: 'IPLSAFTGETHEAD'
@Analytics.internalName: #LOCAL
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AccessControl.authorizationCheck: #MANDATORY
@Metadata.allowExtensions:true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Consumption.dbHints: ['USE_HEX_PLAN']
@EndUserText.label: 'SAFT PL FA Invoice Header'
define view entity I_PL_SAFTGetInvoiceHeader
  with parameters

    P_StartDate : datum,
    P_EndDate   : datum,
    P_PL_CheckForLandText : land1,
    P_CompanyCode : bukrs
as select from P_PL_SAFTInvoiceHeaderVersion2 ( P_StartDate:$parameters.P_StartDate,
                               P_EndDate: $parameters.P_EndDate )
 inner join   I_TaxItem on I_TaxItem.AccountingDocument = P_PL_SAFTInvoiceHeaderVersion2.AccountingDocument
                           and I_TaxItem.TaxCountry = $parameters.P_PL_CheckForLandText
                           and I_TaxItem.CompanyCode = P_PL_SAFTInvoiceHeaderVersion2.CompanyCode
                           and I_TaxItem.FiscalYear = P_PL_SAFTInvoiceHeaderVersion2.FiscalYear

{
key P_PL_SAFTInvoiceHeaderVersion2.CompanyCode,
key P_PL_SAFTInvoiceHeaderVersion2.AccountingDocument,
key P_PL_SAFTInvoiceHeaderVersion2.FiscalYear,
P_PL_SAFTInvoiceHeaderVersion2.VATRegistration,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierName,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierAddress as PL_SAFTCustomerSupplierAddress,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierCountry as PL_SAFTCustomerSupplierCountry,
P_PL_SAFTInvoiceHeaderVersion2.CompanyVATRegistration,
P_PL_SAFTInvoiceHeaderVersion2.CompanyName,
P_PL_SAFTInvoiceHeaderVersion2.CompanyCodeAddress as PL_SAFTCompanyCodeAddress,
P_PL_SAFTInvoiceHeaderVersion2.Country as PL_SAFTCountry,
P_PL_SAFTInvoiceHeaderVersion2.InvoiceDocumentNumber as PL_SAFTInvoiceDocumentNumber,
P_PL_SAFTInvoiceHeaderVersion2.PL_SAFTInvoiceType,
P_PL_SAFTInvoiceHeaderVersion2.DocumentDate,
P_PL_SAFTInvoiceHeaderVersion2.DeliveryDate,
@Semantics.booleanIndicator:true
P_PL_SAFTInvoiceHeaderVersion2.IsEUTriangularDeal,
P_PL_SAFTInvoiceHeaderVersion2.CorrectionInvoice as PL_SAFTCorrectionInvoice,
P_PL_SAFTInvoiceHeaderVersion2.SDDocumentReasonText,
P_PL_SAFTInvoiceHeaderVersion2.TransactionCurrency,
@Semantics.amount.currencyCode: 'TransactionCurrency'
P_PL_SAFTInvoiceHeaderVersion2.AmountInTransactionCurrency,
 min(I_TaxItem.TaxItem) as TaxItem,
 P_PL_SAFTInvoiceHeaderVersion2.IsReversal,
 P_PL_SAFTInvoiceHeaderVersion2.IsReversed
}
where P_PL_SAFTInvoiceHeaderVersion2.CompanyCode = $parameters.P_CompanyCode
group by
P_PL_SAFTInvoiceHeaderVersion2.CompanyCode,
P_PL_SAFTInvoiceHeaderVersion2.AccountingDocument,
P_PL_SAFTInvoiceHeaderVersion2.FiscalYear,
P_PL_SAFTInvoiceHeaderVersion2.VATRegistration,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierName,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierAddress,
P_PL_SAFTInvoiceHeaderVersion2.CustomerSupplierCountry,
P_PL_SAFTInvoiceHeaderVersion2.CompanyVATRegistration,
P_PL_SAFTInvoiceHeaderVersion2.CompanyName,
P_PL_SAFTInvoiceHeaderVersion2.CompanyCodeAddress,
P_PL_SAFTInvoiceHeaderVersion2.Country,
P_PL_SAFTInvoiceHeaderVersion2.InvoiceDocumentNumber,
P_PL_SAFTInvoiceHeaderVersion2.PL_SAFTInvoiceType,
P_PL_SAFTInvoiceHeaderVersion2.DocumentDate,
P_PL_SAFTInvoiceHeaderVersion2.DeliveryDate,
P_PL_SAFTInvoiceHeaderVersion2.IsEUTriangularDeal,
P_PL_SAFTInvoiceHeaderVersion2.CorrectionInvoice,
P_PL_SAFTInvoiceHeaderVersion2.SDDocumentReasonText,
P_PL_SAFTInvoiceHeaderVersion2.TransactionCurrency,
P_PL_SAFTInvoiceHeaderVersion2.AmountInTransactionCurrency,
 P_PL_SAFTInvoiceHeaderVersion2.IsReversal,
 P_PL_SAFTInvoiceHeaderVersion2.IsReversed