P_RU_MONITOR_CONTRACTS

DDL: P_RU_MONITOR_CONTRACTS SQL: PRUMONCNT Type: view CONSUMPTION

Contracts

P_RU_MONITOR_CONTRACTS is a Consumption CDS View that provides data about "Contracts" in SAP S/4HANA. It reads from 1 data source (P_RU_MONITOR_CONTRACTS_DS) and exposes 16 fields with key fields CompanyCode, BusinessPartnerContract. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_RU_MONITOR_CONTRACTS_DS Contracts from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode Contracts.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_CustomerCompany _CustomerCompany Contracts.Customer = _CustomerCompany.Customer and Contracts.CompanyCode = _CustomerCompany.CompanyCode
[0..1] I_SupplierCompany _SupplierCompany Contracts.Supplier = _SupplierCompany.Supplier and Contracts.CompanyCode = _SupplierCompany.CompanyCode
[0..1] C_RU_MonitorContractValueHelpC _ContractsValueHelp Contracts.CompanyCode = _ContractsValueHelp.CompanyCode and Contracts.BusinessPartnerContract = _ContractsValueHelp.BusinessPartnerContract

Annotations (10)

NameValueLevelField
VDM.private true view
EndUserText.label Contracts view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName PRUMONCNT view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.preserveKey true view
UI.headerInfo.typeName Contract view
UI.headerInfo.typeNamePlural Contracts view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY BusinessPartnerContract P_RU_MONITOR_CONTRACTS_DS BusinessPartnerContract Int. Contract Number
BusinessPartnerContractExt P_RU_MONITOR_CONTRACTS_DS BusinessPartnerContractExt Ext. Contract Number
ContractStartDate P_RU_MONITOR_CONTRACTS_DS ContractStartDate Contract Start Date
ContractEndDate P_RU_MONITOR_CONTRACTS_DS ContractEndDate Contract End Date
CndnContrType ContractTp
Customer P_RU_MONITOR_CONTRACTS_DS Customer Sold-to Party
Supplier P_RU_MONITOR_CONTRACTS_DS Supplier Supplier
CreatedByUser P_RU_MONITOR_CONTRACTS_DS CreatedByUser User Name
CustomerName
CompanyCodeName _CompanyCode CompanyCodeName Company Name
SupplierName
_CompanyCode _CompanyCode
_SupplierCompany _SupplierCompany
_CustomerCompany _CustomerCompany
_ContractsValueHelp _ContractsValueHelp

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_RU_MONITOR_CONTRACTS.
-- 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.
-- SQL view name: PRUMONCNT

CREATE VIEW P_RU_MONITOR_CONTRACTS AS
SELECT
  CompanyCode,
  Contracts.BusinessPartnerContract AS BusinessPartnerContract,
  Contracts.BusinessPartnerContractExt AS BusinessPartnerContractExt,
  Contracts.ContractStartDate AS ContractStartDate,
  Contracts.ContractEndDate AS ContractEndDate,
  cast ( ContractType as wcb_contract_type) AS CndnContrType,
  Contracts.Customer AS Customer,
  Contracts.Supplier AS Supplier,
  Contracts.CreatedByUser AS CreatedByUser,
  _CustomerCompany._Customer.CustomerName AS CustomerName,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  _SupplierCompany._Supplier.SupplierName AS SupplierName
FROM P_RU_MONITOR_CONTRACTS_DS AS Contracts
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON Contracts.CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CustomerCompany AS _CustomerCompany ON Contracts.Customer = _CustomerCompany.Customer AND Contracts.CompanyCode = _CustomerCompany.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_SupplierCompany AS _SupplierCompany ON Contracts.Supplier = _SupplierCompany.Supplier AND Contracts.CompanyCode = _SupplierCompany.CompanyCode  -- association [0..1]
LEFT OUTER JOIN C_RU_MonitorContractValueHelpC AS _ContractsValueHelp ON Contracts.CompanyCode = _ContractsValueHelp.CompanyCode AND Contracts.BusinessPartnerContract = _ContractsValueHelp.BusinessPartnerContract  -- association [0..1]
;