@AbapCatalog.sqlViewName : 'ACRPLSAFTHLPITOT'
@AccessControl.authorizationCheck: #NOT_ALLOWED
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling: { type: #INHERITED, algorithm: #SESSION_VARIABLE }
@ObjectModel.usageType: { dataClass: #MIXED, sizeCategory: #XXL, serviceQuality: #X }
@AbapCatalog.compiler.compareFilter:true
@AbapCatalog.preserveKey:true
@EndUserText.label : 'SAF-T PL: Helper class for item totals'
define view ACR_PL_SAFT_HELPER_ITEM_TOTAL
with parameters
P_CompanyCode : bukrs,
P_StartDate : datum,
P_EndDate : datum,
P_TaxType : mwart,
P_CompanyCodeCurrency : waers,
P_Loc_Curr : saft_pl_vat_local_currency
as select from I_SAPClient as a
left outer join P_PL_SAFTTaxItemTotal( P_StartDate: $parameters .P_StartDate,
P_EndDate: $parameters .P_EndDate ) as b on b.CompanyCode = $parameters .P_CompanyCode
and b.TaxType = $parameters .P_TaxType
{
// if no items exist, value '0' must be in the number of lines and total amount
@Semantics.currencyCode: true
$parameters .P_CompanyCodeCurrency as CompanyCodeCurrency,
coalesce(NumberOfLines,0) as NumberOfLines,
@Semantics.amount.currencyCode : 'CompanyCodeCurrency'
case $parameters .P_Loc_Curr
when 'X' then
case $parameters .P_TaxType
when '1' then coalesce(- TotalTaxAmountInCoCodeCrcy,0)
else coalesce(TotalTaxAmountInCoCodeCrcy,0)
end
else
case $parameters .P_TaxType
when '1'then coalesce(- TotalTaxAmountInCountryCrcy,0)
else coalesce(TotalTaxAmountInCountryCrcy,0)
end
end as TotalTaxAmountInCountryCrcy
// @Semantics.amount.currencyCode : 'CompanyCodeCurrency'
// case $parameters .P_TaxType
// when '1'then coalesce(- TotalTaxAmountInCoCodeCrcy,0)
// else coalesce(TotalTaxAmountInCoCodeCrcy,0)
// end as TotalTaxAmountInCoCodeCrcy,
//
// @Semantics.amount.currencyCode : 'CompanyCodeCurrency'
// case $parameters .P_TaxType
// when '1'then coalesce(- TotalTaxAmountInCountryCrcy,0)
// else coalesce(TotalTaxAmountInCountryCrcy,0)
// end as TotalTaxAmountInCountryCrcy
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_SAPCLIENT",
"P_PL_SAFTTAXITEMTOTAL"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
ACR_PL_SAFT_HELPER_ITEM_TOTAL view