P_BSET1
P_BSET1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_Bset) and exposes 27 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxItemUUID. It has 7 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_Bset | P_Bset | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_JournalEntry | _JournalEntry | $projection.AccountingDocument = _JournalEntry.AccountingDocument and $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.FiscalYear = _JournalEntry.FiscalYear |
| [0..*] | I_OperationalAcctgDocItem | _OperationalAcctgDocItem | $projection.CompanyCode = _OperationalAcctgDocItem.CompanyCode and $projection.FiscalYear = _OperationalAcctgDocItem.FiscalYear and $projection.AccountingDocument = _OperationalAcctgDocItem.AccountingDocument |
| [0..1] | I_Currency | _CompanyCodeCurrency | $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency |
| [0..1] | I_Country | _TaxReturnCountry | $projection.TaxReturnCountry = _TaxReturnCountry.Country |
| [0..1] | I_Country | _TaxCountry | $projection.TaxCountry = _TaxCountry.Country |
| [0..1] | I_Country | _CompanyCodeCountry | $projection.CompanyCodeCountry = _CompanyCodeCountry.Country |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | AccountingDocument | AccountingDocument | Journal Entry | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | TaxItem | TaxItem | Tax Item | |
| KEY | TaxItemUUID | |||
| TaxCode | TaxCode | Tax Code | ||
| TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | ||
| TaxBaseAmountInCoCodeCrcy | TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | ||
| TaxBaseAmountInTransCrcy | TaxBaseAmountInTransCrcy | Value-Added Tax | ||
| TaxAmountInCoCodeCrcy | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | ||
| TaxAmountInTransCrcy | TaxAmount | Tax Amt in Rptg Crcy | ||
| TransactionTypeDetermination | TransactionTypeDetermination | Transaction Key | ||
| TaxAmountInRptgCrcy | TaxAmountInCountryCrcy | Tax Rept. Crcy | ||
| TaxBaseAmountInRptgCrcy | TaxBaseAmountInCountryCrcy | Base Amount | ||
| TransactionCurrency | ||||
| CompanyCodeCurrency | ||||
| TaxCountry | TaxCountry | Tax Ctry/Reg. | ||
| TaxReturnCountry | TaxReturnCountry | Reporting C/R | ||
| CurrencyendasReportingCurrency | ||||
| CountryendasReportingCountry | ||||
| TaxDataSource | ||||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| CompanyCodeCountry | _CompanyCode | Country | Venue: Ctry/Reg | |
| _CompanyCode | _CompanyCode | |||
| _JournalEntry | _JournalEntry | |||
| _OperationalAcctgDocItem | _OperationalAcctgDocItem | |||
| _CompanyCodeCurrency | _CompanyCodeCurrency |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_BSET1.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW P_BSET1 AS
SELECT
CompanyCode,
AccountingDocument,
FiscalYear,
TaxItem,
cast ( hextobin('00000000000000000000000000000000') as txrg_tax_item_uuid preserving type ) AS TaxItemUUID,
TaxCode,
TaxRateValidityStartDate,
TaxBaseAmountInCoCodeCrcy,
TaxBaseAmountInTransCrcy,
TaxAmountInCoCodeCrcy,
TaxAmount AS TaxAmountInTransCrcy,
TransactionTypeDetermination,
TaxAmountInCountryCrcy AS TaxAmountInRptgCrcy,
TaxBaseAmountInCountryCrcy AS TaxBaseAmountInRptgCrcy,
cast (_JournalEntry.TransactionCurrency as fins_currw) AS TransactionCurrency,
cast( _CompanyCode.Currency as fins_currh ) AS CompanyCodeCurrency,
TaxCountry,
TaxReturnCountry,
case when TaxCountry <> '' then _TaxCountry.CountryCurrency when TaxReturnCountry <> '' then _TaxReturnCountry.CountryCurrency else _CompanyCode.Currency end as ReportingCurrency AS CurrencyendasReportingCurrency,
case when TaxCountry <> '' then TaxCountry when TaxReturnCountry <> '' then TaxReturnCountry else _CompanyCode.Country end as ReportingCountry AS CountryendasReportingCountry,
cast ( '1' as figen_taxdatasource_id preserving type ) AS TaxDataSource,
DebitCreditCode,
_CompanyCode.Country AS CompanyCodeCountry
FROM P_Bset
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _JournalEntry ON AccountingDocument = _JournalEntry.AccountingDocument AND CompanyCode = _JournalEntry.CompanyCode AND FiscalYear = _JournalEntry.FiscalYear -- association [0..1]
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _OperationalAcctgDocItem ON CompanyCode = _OperationalAcctgDocItem.CompanyCode AND FiscalYear = _OperationalAcctgDocItem.FiscalYear AND AccountingDocument = _OperationalAcctgDocItem.AccountingDocument -- association [0..*]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_Country AS _TaxReturnCountry ON TaxReturnCountry = _TaxReturnCountry.Country -- association [0..1]
LEFT OUTER JOIN I_Country AS _TaxCountry ON TaxCountry = _TaxCountry.Country -- association [0..1]
LEFT OUTER JOIN I_Country AS _CompanyCodeCountry ON CompanyCodeCountry = _CompanyCodeCountry.Country -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA