P_RU_VATInvcNmbrWthBranchCode
P_RU_VATInvcNmbrWthBranchCode is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_CompanyCodeAddlSpec, P_RU_TaxCode) and exposes 5 fields with key fields CompanyCode, AccountingDocument, FiscalYear.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_CompanyCodeAddlSpec | P_CompanyCodeAddlSpec | inner |
| P_RU_TaxCode | TaxCode | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | PRUVATINVNUMBRC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
@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 <> ''
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA