P_KZ_CUSTOMDECLARATIONPREV
P_KZ_CUSTOMDECLARATIONPREV is a CDS View in S/4HANA. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_KZ_VATRetCdec | view | left_outer | COMPOSITE |
@AbapCatalog.sqlViewName: 'PKZCUSTDECLPREV'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
define view P_KZ_CustomDeclarationPrev
with parameters
P_FiscalYear : gjahr,
P_FiscalPeriod : j_3rf_quarters
as select from I_KZ_VATCstmDeclnItemLog as ItemLog
join P_KZ_CUSTOMDECLARATION as CustDecl on CustDecl.CompanyCode = ItemLog.CompanyCode
and CustDecl.CustomsDeclaration = ItemLog.CustomsDeclaration
and CustDecl.FiscalYear = ItemLog.FiscalYear
and CustDecl.PostingFiscalPeriod = ItemLog.PostingFiscalPeriod
join I_CompanyCode as CompanyCode on CompanyCode.CompanyCode = CustDecl.CompanyCode
{
//P_KZ_CustomDeclaration
key StatryRptgEntity,
key StatryRptCategory,
key StatryRptRunID,
key CustDecl.CompanyCode,
key ItemLog.CustomsDeclaration as CustomDeclarationNumber,
key CustomsDeclarationType,
CompanyCode.Currency,
@Semantics.amount.currencyCode: 'Currency'
sum(TaxAmount) as LocalVATAmount,
@Semantics.amount.currencyCode: 'Currency'
sum(PaidAmountInPaytCurrency) as PaidVATAmount,
@Semantics.amount.currencyCode: 'Currency'
sum(CAReturnAmountInTransCurrency) as ReimbursedVATAmount
}
where
ItemLog.FiscalYear < $parameters.P_FiscalYear
or(
ItemLog.FiscalYear = $parameters.P_FiscalYear
and ItemLog.PostingFiscalPeriod < $parameters.P_FiscalPeriod
)
group by
StatryRptgEntity,
StatryRptCategory,
StatryRptRunID,
CustDecl.CompanyCode,
ItemLog.CustomsDeclaration,
CustomsDeclarationType,
CompanyCode.Currency
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_KZ_VATCSTMDECLNITEMLOG",
"P_KZ_CUSTOMDECLARATION"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/