P_PT_BillingNumberRange

DDL: P_PT_BILLINGNUMBERRANGE Type: view_entity COMPOSITE

PT Billing Document NR

P_PT_BillingNumberRange is a Composite CDS View that provides data about "PT Billing Document NR" in SAP S/4HANA. It reads from 1 data source (I_PT_DgtlSgntrNmbrRngeBilling) and exposes 11 fields with key fields CompanyCode, VATRegistration, PT_SeriesIdentifier, PT_SeriesTypeCode, PT_SeriesDocumentType. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PT_DgtlSgntrNmbrRngeBilling I_PT_DgtlSgntrNmbrRngeBilling from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_BillingDocumentType _BillingDocumentType _BillingDocumentType.BillingDocumentType = $projection.PortugueseLeadingBillgDocType
[0..1] I_NumberRangeInterval _NumberRange _NumberRange.NumberRangeObject = 'RV_BELEG' and _NumberRange.NumberRangeInterval = $projection.PT_SeriesNumberRangeInterval
[0..1] I_PT_DgtlSgntrStartBilling _DgtlsgntrStartBillg _DgtlsgntrStartBillg.PT_SeriesNumberRangeInterval = $projection.PT_SeriesNumberRangeInterval

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #CUSTOMIZING view
EndUserText.label PT Billing Document NR view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY VATRegistration
KEY PT_SeriesIdentifier PortugueseDgtlSignatureSeries Series ID
KEY PT_SeriesTypeCode
KEY PT_SeriesDocumentType PT_SeriesDocumentType SAF-T Document Type
PT_SeriesBusinessProcess
PT_SeriesNumberRangeObject _NumberRange NumberRangeObject
PT_SeriesNumberRangeSubObject _NumberRange NumberRangeSubObject Subobject value
PT_SeriesNumberRangeInterval NumberRangeInterval Number Range
PT_SeriesNumberRangeToYear _NumberRange NumberRangeToYear
PortugueseLeadingBillgDocType PortugueseLeadingBillgDocType Lead. Doc. type

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_BillingNumberRange.
-- 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_BillingNumberRange AS
SELECT
  CompanyCode,
  cast( substring(_CompanyCode.VATRegistration, 3, 18) as stceg) AS VATRegistration,
  PortugueseDgtlSignatureSeries AS PT_SeriesIdentifier,
  'N' AS PT_SeriesTypeCode,
  PT_SeriesDocumentType,
  'B' AS PT_SeriesBusinessProcess,
  _NumberRange.NumberRangeObject AS PT_SeriesNumberRangeObject,
  _NumberRange.NumberRangeSubObject AS PT_SeriesNumberRangeSubObject,
  NumberRangeInterval AS PT_SeriesNumberRangeInterval,
  _NumberRange.NumberRangeToYear AS PT_SeriesNumberRangeToYear,
  PortugueseLeadingBillgDocType
FROM I_PT_DgtlSgntrNmbrRngeBilling
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_BillingDocumentType AS _BillingDocumentType ON _BillingDocumentType.BillingDocumentType = PortugueseLeadingBillgDocType  -- association [0..1]
LEFT OUTER JOIN I_NumberRangeInterval AS _NumberRange ON _NumberRange.NumberRangeObject = 'RV_BELEG' AND _NumberRange.NumberRangeInterval = PT_SeriesNumberRangeInterval  -- association [0..1]
LEFT OUTER JOIN I_PT_DgtlSgntrStartBilling AS _DgtlsgntrStartBillg ON _DgtlsgntrStartBillg.PT_SeriesNumberRangeInterval = PT_SeriesNumberRangeInterval  -- association [0..1]
;