@VDM.private:true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName : 'PRUVATINVNUMBRC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RU_VATInvcNmbrWthBranchCode
as select distinct from P_RU_BSET //we cant select directly from bseg because it doesn't contain 0% VAT
inner join P_CompanyCodeAddlSpec on P_CompanyCodeAddlSpec.bukrs = P_RU_BSET.CompanyCode
inner join P_RU_TaxCode as TaxCode on TaxCode.CompanyCode = P_RU_BSET.CompanyCode
and TaxCode.TaxCode = P_RU_BSET.TaxCode
{
key P_RU_BSET.CompanyCode,
key P_RU_BSET.AccountingDocument,
key P_RU_BSET.FiscalYear,
// I_TaxCode.TaxCode, //in bset could be several tax codes for document, so do not output TaxCode here otherwise CDS will return several lines for 1 document!!
concat(P_RU_BSET.AccountingDocument,
concat('/', P_CompanyCodeAddlSpec.paval)) as AccountingDocWithBranchCode,
concat('/', P_CompanyCodeAddlSpec.paval) as BranchCode
}
where
TaxCode.TaxType = 'A'
and P_CompanyCodeAddlSpec.party = 'SAPR21'
and P_CompanyCodeAddlSpec.paval <> ''
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"P_COMPANYCODEADDLSPEC",
"P_RU_BSET",
"P_RU_TAXCODE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_RU_VATInvcNmbrWthBranchCode view