P_PT_SelfBillingNumberRange
Self Billing Invoice Number Range
P_PT_SelfBillingNumberRange is a Composite CDS View that provides data about "Self Billing Invoice Number Range" in SAP S/4HANA. It reads from 1 data source (I_PT_SelfBillingNumberRange) and exposes 14 fields with key fields CompanyCode, PT_VATRegistrationCompanyCode, Supplier, stceg318asstcegendasVATRegistration, PT_SeriesIdentifier. It has 5 associations to related views. Part of development package ID-SIGN-PT-MM.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_SelfBillingNumberRange | I_PT_SelfBillingNumberRange | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_NumberRangeInterval | _NumberRange | _NumberRange.NumberRangeObject = 'J_1AOFFDOC' and $projection.PT_SeriesNumberRangeSubObject = _NumberRange.NumberRangeSubObject and $projection.PT_SeriesNumberRangeInterval = _NumberRange.NumberRangeInterval |
| [0..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [0..1] | I_PT_DgtlSgntrStrtSelfBillg | _StartSelfBillg | $projection.CompanyCode = _StartSelfBillg.CompanyCode and $projection.PT_SeriesNumberRangeInterval = _StartSelfBillg.PT_SeriesNumberRangeInterval and $projection.PT_SeriesNumberRangeSubObject = _StartSelfBillg.NumberRangeSubObject |
| [0..1] | lfas | _Vendor | $projection.Supplier = _Vendor.lifnr and _Vendor.land1 = 'PT' |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Self Billing Invoice Number Range | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | PT_VATRegistrationCompanyCode | |||
| KEY | Supplier | Supplier | Supplier | |
| KEY | stceg318asstcegendasVATRegistration | |||
| KEY | PT_SeriesIdentifier | PT_SeriesIdentifier | Series ID | |
| KEY | PT_SeriesTypeCode | |||
| KEY | PT_SeriesDocumentClass | |||
| PT_SeriesNumberRangeObject | _NumberRange | NumberRangeObject | ||
| PT_SeriesNumberRangeToYear | _NumberRange | NumberRangeToYear | ||
| PT_SeriesBusinessProcess | ||||
| PT_SeriesLastNumber | ||||
| PrmtHbAccountingDocumentType | PrmtHbAccountingDocumentType | Document Type | ||
| PT_SeriesNumberRangeSubObject | PT_SeriesNumberRangeSubObject | Triggering obj. | ||
| PT_SeriesNumberRangeInterval | PT_SeriesNumberRangeInterval | Number Range |
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_PT_SelfBillingNumberRange.
-- 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_PT_SelfBillingNumberRange AS
SELECT
CompanyCode,
cast( substring(_CompanyCode.VATRegistration, 3, 18) as stceg) AS PT_VATRegistrationCompanyCode,
Supplier,
case when _Supplier.Country = 'PT' then case when _Supplier.VATRegistration is not initial then cast( substring(_Supplier.VATRegistration, 3, 18) as stceg) else cast( substring(_Supplier.TaxNumber1, 3, 18) as stceg) end else cast( substring(_Vendor.stceg, 3, 18) as stceg) end as VATRegistration AS stceg318asstcegendasVATRegistration,
PT_SeriesIdentifier,
cast( 'S' as sipt_spectype ) AS PT_SeriesTypeCode,
'MG' AS PT_SeriesDocumentClass,
_NumberRange.NumberRangeObject AS PT_SeriesNumberRangeObject,
_NumberRange.NumberRangeToYear AS PT_SeriesNumberRangeToYear,
'S' AS PT_SeriesBusinessProcess,
cast (_NumberRange.NumberRangeToNumber as glo_pt_series_ln) AS PT_SeriesLastNumber,
PrmtHbAccountingDocumentType,
PT_SeriesNumberRangeSubObject,
PT_SeriesNumberRangeInterval
FROM I_PT_SelfBillingNumberRange
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_NumberRangeInterval AS _NumberRange ON _NumberRange.NumberRangeObject = 'J_1AOFFDOC' AND PT_SeriesNumberRangeSubObject = _NumberRange.NumberRangeSubObject AND PT_SeriesNumberRangeInterval = _NumberRange.NumberRangeInterval -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [0..1]
LEFT OUTER JOIN I_PT_DgtlSgntrStrtSelfBillg AS _StartSelfBillg ON CompanyCode = _StartSelfBillg.CompanyCode AND PT_SeriesNumberRangeInterval = _StartSelfBillg.PT_SeriesNumberRangeInterval AND PT_SeriesNumberRangeSubObject = _StartSelfBillg.NumberRangeSubObject -- association [0..1]
LEFT OUTER JOIN lfas AS _Vendor ON Supplier = _Vendor.lifnr AND _Vendor.land1 = 'PT' -- 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