C_ContractFs

DDL: C_CONTRACTFS SQL: CCONTRACTFS Type: view CONSUMPTION

Purchase Contract

C_ContractFs is a Consumption CDS View that provides data about "Purchase Contract" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContractVersion) and exposes 67 fields with key field PurchaseContract. It has 14 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseContractVersion I_PurchaseContractVersion from

Associations (14)

CardinalityTargetAliasCondition
[1..*] I_PurchaseContractHistory _PurchaseContractHistory $projection.PurchaseContract = _PurchaseContractHistory.PurchaseContract
[1..*] C_ContractItemFs _PurchaseContractItem $projection.PurchaseContract = _PurchaseContractItem.PurchaseContract
[1..*] C_PurContractItemHierFactSheet _PurContractItemHierFs $projection.PurchaseContract = _PurContractItemHierFs.PurchaseContract
[0..*] C_ContractFactSheetHeaderText _ContractFactSheetHeaderText $projection.PurchaseContract = _ContractFactSheetHeaderText.PurchaseContract
[0..*] I_PurchasingDocumentTypeText _PurchasingDocumentTypeText $projection.PurchasingDocumentCategory = _PurchasingDocumentTypeText.PurchasingDocumentCategory and $projection.PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType
[0..1] I_PurchasingDocumentTypeText _PurchasingDocumentTypeName $projection.PurchasingDocumentCategory = _PurchasingDocumentTypeName.PurchasingDocumentCategory and $projection.PurchaseContractType = _PurchasingDocumentTypeName.PurchasingDocumentType and _PurchasingDocumentTypeName.Language = $session.system_language
[0..*] I_PurgDocumentCategoryText _PurgDocumentCategoryText $projection.PurchasingDocumentCategory = _PurgDocumentCategoryText.PurchasingDocumentCategory
[0..*] I_IncotermsClassificationText _IncotermsClassificationText $projection.IncotermsClassification = _IncotermsClassificationText.IncotermsClassification
[0..*] I_ReleaseCodeText _ReleaseCodeText $projection.ReleaseCode = _ReleaseCodeText.ReleaseCode
[0..*] I_PaymentTermsText _PaymentTermsText $projection.PaymentTerms = _PaymentTermsText.PaymentTerms
[1..1] I_PurCtrIncoVersion _PurCtrIncotermsVersion $projection.IncotermsVersion = _PurCtrIncotermsVersion.IncotermsVersion
[1..1] I_SupplierOrAddressContactCard _SupplierHeadOffice ( _SupplierHeadOffice.ContactCardType = 'Address' and _SupplierHeadOffice.ContactCardID = $projection.SupplierAddressID and _SupplierHeadOffice.ContactCardRole = 'Supplier' )
[1..1] I_SupplierOrAddressContactCard _SupplierHeadOffice1 ( _SupplierHeadOffice1.ContactCardType = 'Supplier' and _SupplierHeadOffice1.ContactCardID = $projection.Supplier and _SupplierHeadOffice1.ContactCardRole = 'Supplier' )
[1] E_PurchasingDocument _Extension $projection.PurchaseContract = _Extension.PurchasingDocument

Annotations (18)

NameValueLevelField
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.sqlViewName CCONTRACTFS view
ClientDependent true view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Purchase Contract view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
UI.headerInfo.typeName Purchase Contract view
UI.headerInfo.typeName_AsOtr 005056B2532A1EE588FAB969558059B1 view
UI.headerInfo.typeNamePlural Purchase Contract view
UI.headerInfo.typeNamePlural_asOtr 005056B2532A1EE588FAB969558059B1 view
UI.headerInfo.typeImageUrl /sap/bc/ui5_ui5/sap/mm_contrs1/images/contract.jpg view
UI.headerInfo.title.value PurchasingDocumentTypeName view
UI.headerInfo.description.value ActivePurchasingDocument view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (67)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract I_PurchaseContractVersion PurchaseContract Purchasing Doc.
ActivePurchasingDocument I_PurchaseContractVersion ActivePurchasingDocument Purchase Contract
PurchasingDocumentVersion PurchasingDocumentVersion Version
ChangeRequestNote _VersionType ChangeRequestNote Short Description
PurchaseContractType I_PurchaseContractVersion PurchaseContractType Order Type
PurchasingDocumentTypeName _PurchasingDocumentTypeName PurchasingDocumentTypeName Description
PurchasingDocumentCategory I_PurchaseContractVersion PurchasingDocumentCategory Doc. Category
IncotermsClassification I_PurchaseContractVersion IncotermsClassification Incoterms
CreationDate I_PurchaseContractVersion CreationDate Time Stamp
DocumentCurrency I_PurchaseContractVersion DocumentCurrency Document Currency
PurchaseContractTargetAmount I_PurchaseContractVersion PurchaseContractTargetAmount Target Value
PurchasingDocVersionReasonCode PurchasingDocVersionReasonCode Reason for New Version
ReleaseCode I_PurchaseContractVersion ReleaseCode Release ind.
PurchasingProcessingStatus I_PurchaseContractVersion PurchasingProcessingStatus Proc. State
PurchasingDocumentStatusName
Supplier I_PurchaseContractVersion Supplier Supplier
FullNameendasSupplierName
FormattedAddress
AddressIDasadrnrendasAddressID
EmailAddressendasEmailAddress
PhoneNumberendasInternationalPhoneNumber
CompanyCode I_PurchaseContractVersion CompanyCode Receiver Company Code
CompanyCodeName _CompanyCode CompanyCodeName Company Name
PurchasingOrganization I_PurchaseContractVersion PurchasingOrganization Purchasing Organization
PurchasingOrganizationName _PurchasingOrganization PurchasingOrganizationName Purch. Org. Name
PurchasingGroup I_PurchaseContractVersion PurchasingGroup Purchasing Group
PurchasingGroupName _PurchasingGroup PurchasingGroupName Purchasing Grp. Name
SupplyingSupplier SupplyingSupplier Goods Supplier
InvoicingParty InvoicingParty Supplier
SupplierAddressID SupplierAddressID Address Number
CreatedByUser CreatedByUser User Name
IncotermsTransferLocation I_PurchaseContractVersion IncotermsTransferLocation Incoterms 2
PaymentTerms I_PurchaseContractVersion PaymentTerms Pyt Terms
PaymentTermsDescription
IncotermsLocation1 IncotermsLocation1 Inco. Location1
IncotermsLocation2 IncotermsLocation2 Inco. Location2
IncotermsVersion IncotermsVersion Inco. Version
IncotermsVersionName _PurCtrIncotermsVersion IncotermsVersionName
CashDiscount1Days I_PurchaseContractVersion CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days I_PurchaseContractVersion CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays I_PurchaseContractVersion NetPaymentDays Net Pmt Terms Period
CashDiscount1Percent I_PurchaseContractVersion CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent I_PurchaseContractVersion CashDiscount2Percent Disc. Percent 2
ValidityEndDate I_PurchaseContractVersion ValidityEndDate ValidTo
ValidityStartDate I_PurchaseContractVersion ValidityStartDate Validity Start Date
ExchangeRate
ExchangeRateIsFixed ExchangeRateIsFixed Fixed Exch.Rate
PurchasingItemHasHierarchy
SrvcProcmtItmHierIsEnbld
VersionIsEnabled
_PurchaseContractHistory _PurchaseContractHistory
_PurchaseContractItem _PurchaseContractItem
_PurContractItemHierFs _PurContractItemHierFs
_ContractFactSheetHeaderText _ContractFactSheetHeaderText
_PurCtrIncotermsVersion _PurCtrIncotermsVersion
_IncotermsClassification I_PurchaseContractVersion _IncotermsClassification
_PurchasingDocumentType I_PurchaseContractVersion _PurchasingDocumentType
_PurchasingDocumentCategory I_PurchaseContractVersion _PurchasingDocumentCategory
_SupplierHeadOffice _SupplierHeadOffice
_SupplierHeadOffice1 _SupplierHeadOffice1
_IncotermsClassificationText _IncotermsClassificationText
_PurchasingDocumentTypeText _PurchasingDocumentTypeText
_PurgDocumentCategoryText _PurgDocumentCategoryText
_PaymentTermsText _PaymentTermsText
_ReleaseCodeText _ReleaseCodeText
_PurchasingDocumentTypeName _PurchasingDocumentTypeName
_VersionReasonValHelp _VersionReasonValHelp

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 C_ContractFs.
-- 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: CCONTRACTFS

CREATE VIEW C_ContractFs AS
SELECT
  I_PurchaseContractVersion.PurchaseContract AS PurchaseContract,
  I_PurchaseContractVersion.ActivePurchasingDocument AS ActivePurchasingDocument,
  PurchasingDocumentVersion,
  _VersionType.ChangeRequestNote AS ChangeRequestNote,
  I_PurchaseContractVersion.PurchaseContractType AS PurchaseContractType,
  _PurchasingDocumentTypeName.PurchasingDocumentTypeName AS PurchasingDocumentTypeName,
  I_PurchaseContractVersion.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  I_PurchaseContractVersion.IncotermsClassification AS IncotermsClassification,
  I_PurchaseContractVersion.CreationDate AS CreationDate,
  I_PurchaseContractVersion.DocumentCurrency AS DocumentCurrency,
  I_PurchaseContractVersion.PurchaseContractTargetAmount AS PurchaseContractTargetAmount,
  PurchasingDocVersionReasonCode,
  I_PurchaseContractVersion.ReleaseCode AS ReleaseCode,
  I_PurchaseContractVersion.PurchasingProcessingStatus AS PurchasingProcessingStatus,
  cast( '' as val_text) AS PurchasingDocumentStatusName,
  I_PurchaseContractVersion.Supplier AS Supplier,
  case when _SupplierHeadOffice.AddressID is not null then _SupplierHeadOffice.FullName else _SupplierHeadOffice1.FullName end as SupplierName AS FullNameendasSupplierName,
  cast('' as contactcardformattedaddress) AS FormattedAddress,
  case when _SupplierHeadOffice.AddressID is not null then cast(_SupplierHeadOffice.AddressID as adrnr) else cast(_SupplierHeadOffice1.AddressID as adrnr) end as AddressID AS AddressIDasadrnrendasAddressID,
  case when _SupplierHeadOffice.AddressID is not null then _SupplierHeadOffice.EmailAddress else _SupplierHeadOffice1.EmailAddress end as EmailAddress AS EmailAddressendasEmailAddress,
  case when _SupplierHeadOffice.AddressID is not null then _SupplierHeadOffice.PhoneNumber else _SupplierHeadOffice1.PhoneNumber end as InternationalPhoneNumber AS PhoneNumberendasInternationalPhoneNumber,
  I_PurchaseContractVersion.CompanyCode AS CompanyCode,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  I_PurchaseContractVersion.PurchasingOrganization AS PurchasingOrganization,
  _PurchasingOrganization.PurchasingOrganizationName AS PurchasingOrganizationName,
  I_PurchaseContractVersion.PurchasingGroup AS PurchasingGroup,
  _PurchasingGroup.PurchasingGroupName AS PurchasingGroupName,
  SupplyingSupplier,
  InvoicingParty,
  SupplierAddressID,
  CreatedByUser,
  I_PurchaseContractVersion.IncotermsTransferLocation AS IncotermsTransferLocation,
  I_PurchaseContractVersion.PaymentTerms AS PaymentTerms,
  cast('' as mm_pur_paymenttermstext) AS PaymentTermsDescription,
  IncotermsLocation1,
  IncotermsLocation2,
  IncotermsVersion,
  _PurCtrIncotermsVersion.IncotermsVersionName AS IncotermsVersionName,
  I_PurchaseContractVersion.CashDiscount1Days AS CashDiscount1Days,
  I_PurchaseContractVersion.CashDiscount2Days AS CashDiscount2Days,
  I_PurchaseContractVersion.NetPaymentDays AS NetPaymentDays,
  I_PurchaseContractVersion.CashDiscount1Percent AS CashDiscount1Percent,
  I_PurchaseContractVersion.CashDiscount2Percent AS CashDiscount2Percent,
  I_PurchaseContractVersion.ValidityEndDate AS ValidityEndDate,
  I_PurchaseContractVersion.ValidityStartDate AS ValidityStartDate,
  cast( I_PurchaseContractVersion.ExchangeRate as fis_exchange_rate preserving type ) AS ExchangeRate,
  ExchangeRateIsFixed,
  cast ( '' as abap_boolean ) AS PurchasingItemHasHierarchy,
  cast ( '' as abap_boolean ) AS SrvcProcmtItmHierIsEnbld,
  cast ('' as boolean) AS VersionIsEnabled,
  I_PurchaseContractVersion._IncotermsClassification AS _IncotermsClassification,
  I_PurchaseContractVersion._PurchasingDocumentType AS _PurchasingDocumentType,
  I_PurchaseContractVersion._PurchasingDocumentCategory AS _PurchasingDocumentCategory
FROM I_PurchaseContractVersion
LEFT OUTER JOIN I_PurchaseContractHistory AS _PurchaseContractHistory ON PurchaseContract = _PurchaseContractHistory.PurchaseContract  -- association [1..*]
LEFT OUTER JOIN C_ContractItemFs AS _PurchaseContractItem ON PurchaseContract = _PurchaseContractItem.PurchaseContract  -- association [1..*]
LEFT OUTER JOIN C_PurContractItemHierFactSheet AS _PurContractItemHierFs ON PurchaseContract = _PurContractItemHierFs.PurchaseContract  -- association [1..*]
LEFT OUTER JOIN C_ContractFactSheetHeaderText AS _ContractFactSheetHeaderText ON PurchaseContract = _ContractFactSheetHeaderText.PurchaseContract  -- association [0..*]
LEFT OUTER JOIN I_PurchasingDocumentTypeText AS _PurchasingDocumentTypeText ON PurchasingDocumentCategory = _PurchasingDocumentTypeText.PurchasingDocumentCategory AND PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType  -- association [0..*]
LEFT OUTER JOIN I_PurchasingDocumentTypeText AS _PurchasingDocumentTypeName ON PurchasingDocumentCategory = _PurchasingDocumentTypeName.PurchasingDocumentCategory AND PurchaseContractType = _PurchasingDocumentTypeName.PurchasingDocumentType AND _PurchasingDocumentTypeName.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_PurgDocumentCategoryText AS _PurgDocumentCategoryText ON PurchasingDocumentCategory = _PurgDocumentCategoryText.PurchasingDocumentCategory  -- association [0..*]
LEFT OUTER JOIN I_IncotermsClassificationText AS _IncotermsClassificationText ON IncotermsClassification = _IncotermsClassificationText.IncotermsClassification  -- association [0..*]
LEFT OUTER JOIN I_ReleaseCodeText AS _ReleaseCodeText ON ReleaseCode = _ReleaseCodeText.ReleaseCode  -- association [0..*]
LEFT OUTER JOIN I_PaymentTermsText AS _PaymentTermsText ON PaymentTerms = _PaymentTermsText.PaymentTerms  -- association [0..*]
LEFT OUTER JOIN I_PurCtrIncoVersion AS _PurCtrIncotermsVersion ON IncotermsVersion = _PurCtrIncotermsVersion.IncotermsVersion  -- association [1..1]
LEFT OUTER JOIN I_SupplierOrAddressContactCard AS _SupplierHeadOffice ON ( _SupplierHeadOffice.ContactCardType = 'Address' AND _SupplierHeadOffice.ContactCardID = SupplierAddressID AND _SupplierHeadOffice.ContactCardRole = 'Supplier' )  -- association [1..1]
LEFT OUTER JOIN I_SupplierOrAddressContactCard AS _SupplierHeadOffice1 ON ( _SupplierHeadOffice1.ContactCardType = 'Supplier' AND _SupplierHeadOffice1.ContactCardID = Supplier AND _SupplierHeadOffice1.ContactCardRole = 'Supplier' )  -- association [1..1]
LEFT OUTER JOIN E_PurchasingDocument AS _Extension ON PurchaseContract = _Extension.PurchasingDocument  -- association [1]
;