P_CndnContrConditionUsage

DDL: P_CNDNCONTRCONDITIONUSAGE Type: view_entity BASIC Package: WCB_CC_PERS

Condition Contract Condition Usage

P_CndnContrConditionUsage is a Basic CDS View that provides data about "Condition Contract Condition Usage" in SAP S/4HANA. It reads from 1 data source (wcocof) and exposes 33 fields with key field DocRelationshipUUID. It has 8 associations to related views. Part of development package WCB_CC_PERS.

Data Sources (1)

SourceAliasJoin Type
wcocof wcocof from

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_ConditionApplication _ConditionApplication $projection.ConditionApplication = _ConditionApplication.ConditionApplication
[0..1] I_PricingConditionType _ConditionType $projection.ConditionApplication = _ConditionType.ConditionApplication and $projection.ConditionType = _ConditionType.ConditionType
[1..1] I_ConditionContract _ConditionContract $projection.ConditionContract = _ConditionContract.ConditionContract
[0..1] I_CndnContrAccrRvslSts _CndnContrAccrRvslSts $projection.CndnContrAccrRvslSts = _CndnContrAccrRvslSts.CndnContrAccrRvslSts
[0..1] I_Currency _AccrSrceDocCurrency $projection.AccrSrceDocCurrency = _AccrSrceDocCurrency.Currency
[0..1] I_Plant _AccrSrceDocItemPlant $projection.AccrSrceDocItemPlant = _AccrSrceDocItemPlant.Plant
[0..1] I_CompanyCode _AccrSrceDocCompanyCode $projection.AccrSrceDocCompanyCode = _AccrSrceDocCompanyCode.CompanyCode
[0..1] I_CndnContrAccrSrceDocCat _CndnContrAccrSrceDocCat $projection.AccrSrceDocCategory = _CndnContrAccrSrceDocCat.AccrSrceDocCategory

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.representativeKey DocRelationshipUUID view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XXL view
VDM.viewType #BASIC view
VDM.private true view
Metadata.ignorePropagatedAnnotations true view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY DocRelationshipUUID ruuid SM Doc Rel UUID
PricingDocument knumv Doc. Condition
PricingProcedureStep stunr Step Number
PricingProcedureCounter zaehk Counter
ConditionContract num Total Members
CndnContrUUID guid UUID 22 char.
ConditionRecord knumh NoCondRec.Batch
ConditionSequentialNumberShort kopos SequNo of Cond.
CndnContrAccrRvslSts accr_rev_status Accr. Rev. Status
AccrSrceDocCategory Document Type
AccrSrceDocument Follow-On Doc.
AccrSrceDocumentYear Follow-On Doc Year
AccrSrceDocumentItem Number
ConditionApplication kappl Application
ConditionType kschl Tax Item Type
ConditionAmount kwert Condition Value
AccrSrceDocCurrency Transaction Currency
AccrSrceDocPostingDate Posting Date
SettlmtDate settl_date Settlement Date
SettlmtDateSequentialID settl_date_seq_id Settlement Date ID
RefSettlmtDate ref_settl_date Reference Date
RefSettlmtDateSequentialID ref_settl_date_seq_id Ref Settl Date ID
AccrSrceDocFiscalYear Settlement Year
AccrSrceDocItemPlant Receiving Plant
AccrSrceDocCompanyCode Value
_ConditionApplication _ConditionApplication
_ConditionType _ConditionType
_ConditionContract _ConditionContract
_AccrSrceDocCurrency _AccrSrceDocCurrency
_AccrSrceDocItemPlant _AccrSrceDocItemPlant
_AccrSrceDocCompanyCode _AccrSrceDocCompanyCode
_CndnContrAccrRvslSts _CndnContrAccrRvslSts
_CndnContrAccrSrceDocCat _CndnContrAccrSrceDocCat

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_CndnContrConditionUsage.
-- 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_CndnContrConditionUsage AS
SELECT
  ruuid AS DocRelationshipUUID,
  knumv AS PricingDocument,
  stunr AS PricingProcedureStep,
  zaehk AS PricingProcedureCounter,
  num AS ConditionContract,
  guid AS CndnContrUUID,
  knumh AS ConditionRecord,
  kopos AS ConditionSequentialNumberShort,
  accr_rev_status AS CndnContrAccrRvslSts,
  cast( doc_type_to as wcb_accdoc_category preserving type ) AS AccrSrceDocCategory,
  cast( docnr_to as wcb_accdoc_number preserving type ) AS AccrSrceDocument,
  cast( doc_year_to as wcb_accdoc_year preserving type ) AS AccrSrceDocumentYear,
  cast( kposn as wcb_accdoc_item preserving type ) AS AccrSrceDocumentItem,
  kappl AS ConditionApplication,
  kschl AS ConditionType,
  kwert AS ConditionAmount,
  cast( waers as wcb_accdoc_currency preserving type ) AS AccrSrceDocCurrency,
  cast( budat as wcb_accdoc_posting_date preserving type ) AS AccrSrceDocPostingDate,
  settl_date AS SettlmtDate,
  settl_date_seq_id AS SettlmtDateSequentialID,
  ref_settl_date AS RefSettlmtDate,
  ref_settl_date_seq_id AS RefSettlmtDateSequentialID,
  cast( gjahr as wcb_accdoc_fiscal_year preserving type ) AS AccrSrceDocFiscalYear,
  cast( werks as wcb_accdoc_item_plant preserving type ) AS AccrSrceDocItemPlant,
  cast( bukrs as wcb_accdoc_company_code preserving type ) AS AccrSrceDocCompanyCode
FROM wcocof
LEFT OUTER JOIN I_ConditionApplication AS _ConditionApplication ON ConditionApplication = _ConditionApplication.ConditionApplication  -- association [0..1]
LEFT OUTER JOIN I_PricingConditionType AS _ConditionType ON ConditionApplication = _ConditionType.ConditionApplication AND ConditionType = _ConditionType.ConditionType  -- association [0..1]
LEFT OUTER JOIN I_ConditionContract AS _ConditionContract ON ConditionContract = _ConditionContract.ConditionContract  -- association [1..1]
LEFT OUTER JOIN I_CndnContrAccrRvslSts AS _CndnContrAccrRvslSts ON CndnContrAccrRvslSts = _CndnContrAccrRvslSts.CndnContrAccrRvslSts  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _AccrSrceDocCurrency ON AccrSrceDocCurrency = _AccrSrceDocCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _AccrSrceDocItemPlant ON AccrSrceDocItemPlant = _AccrSrceDocItemPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _AccrSrceDocCompanyCode ON AccrSrceDocCompanyCode = _AccrSrceDocCompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CndnContrAccrSrceDocCat AS _CndnContrAccrSrceDocCat ON AccrSrceDocCategory = _CndnContrAccrSrceDocCat.AccrSrceDocCategory  -- association [0..1]
;