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
ActivePurchasingDocument I_PurchaseContractVersion ActivePurchasingDocument Purchase Contract
PurchasingDocumentVersion PurchasingDocumentVersion Version
ChangeRequestNote _VersionType ChangeRequestNote
PurchaseContractType I_PurchaseContractVersion PurchaseContractType
PurchasingDocumentTypeName _PurchasingDocumentTypeName PurchasingDocumentTypeName
PurchasingDocumentCategory I_PurchaseContractVersion PurchasingDocumentCategory
IncotermsClassification I_PurchaseContractVersion IncotermsClassification
CreationDate I_PurchaseContractVersion CreationDate
DocumentCurrency I_PurchaseContractVersion DocumentCurrency
PurchaseContractTargetAmount I_PurchaseContractVersion PurchaseContractTargetAmount
PurchasingDocVersionReasonCode PurchasingDocVersionReasonCode Reason for New Version
ReleaseCode I_PurchaseContractVersion ReleaseCode
PurchasingProcessingStatus I_PurchaseContractVersion PurchasingProcessingStatus
PurchasingDocumentStatusName
Supplier I_PurchaseContractVersion Supplier
FullNameendasSupplierName
FormattedAddress
AddressIDasadrnrendasAddressID
EmailAddressendasEmailAddress
PhoneNumberendasInternationalPhoneNumber
CompanyCode I_PurchaseContractVersion CompanyCode
CompanyCodeName _CompanyCode CompanyCodeName
PurchasingOrganization I_PurchaseContractVersion PurchasingOrganization
PurchasingOrganizationName _PurchasingOrganization PurchasingOrganizationName
PurchasingGroup I_PurchaseContractVersion PurchasingGroup
PurchasingGroupName _PurchasingGroup PurchasingGroupName
SupplyingSupplier SupplyingSupplier
InvoicingParty InvoicingParty
SupplierAddressID SupplierAddressID
CreatedByUser CreatedByUser
IncotermsTransferLocation I_PurchaseContractVersion IncotermsTransferLocation
PaymentTerms I_PurchaseContractVersion PaymentTerms
PaymentTermsDescription
IncotermsLocation1 IncotermsLocation1
IncotermsLocation2 IncotermsLocation2
IncotermsVersion IncotermsVersion
IncotermsVersionName _PurCtrIncotermsVersion IncotermsVersionName
CashDiscount1Days I_PurchaseContractVersion CashDiscount1Days
CashDiscount2Days I_PurchaseContractVersion CashDiscount2Days
NetPaymentDays I_PurchaseContractVersion NetPaymentDays
CashDiscount1Percent I_PurchaseContractVersion CashDiscount1Percent
CashDiscount2Percent I_PurchaseContractVersion CashDiscount2Percent
ValidityEndDate I_PurchaseContractVersion ValidityEndDate
ValidityStartDate I_PurchaseContractVersion ValidityStartDate
ExchangeRate
ExchangeRateIsFixed ExchangeRateIsFixed
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
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.sqlViewName: 'CCONTRACTFS'
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Purchase Contract'
@AbapCatalog.preserveKey: true
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@UI.headerInfo: {
      typeName: 'Purchase Contract', typeName_AsOtr: '005056B2532A1EE588FAB969558059B1',
      typeNamePlural: 'Purchase Contract', typeNamePlural_asOtr: '005056B2532A1EE588FAB969558059B1',
      typeImageUrl: '/sap/bc/ui5_ui5/sap/mm_contrs1/images/contract.jpg',
      title.value: 'PurchasingDocumentTypeName',
      description.value: 'ActivePurchasingDocument' }

@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED

define view C_ContractFs
  as select from I_PurchaseContractVersion

  association [1..*] to I_PurchaseContractHistory      as _PurchaseContractHistory     on  $projection.PurchaseContract = _PurchaseContractHistory.PurchaseContract

  association [1..*] to C_ContractItemFs               as _PurchaseContractItem        on  $projection.PurchaseContract = _PurchaseContractItem.PurchaseContract

  association [1..*] to C_PurContractItemHierFactSheet as _PurContractItemHierFs       on  $projection.PurchaseContract = _PurContractItemHierFs.PurchaseContract

  association [0..*] to C_ContractFactSheetHeaderText  as _ContractFactSheetHeaderText on  $projection.PurchaseContract = _ContractFactSheetHeaderText.PurchaseContract

  association [0..*] to I_PurchasingDocumentTypeText   as _PurchasingDocumentTypeText  on  $projection.PurchasingDocumentCategory = _PurchasingDocumentTypeText.PurchasingDocumentCategory
                                                                                       and $projection.PurchaseContractType       = _PurchasingDocumentTypeText.PurchasingDocumentType

  association [0..1] to I_PurchasingDocumentTypeText   as _PurchasingDocumentTypeName  on  $projection.PurchasingDocumentCategory = _PurchasingDocumentTypeName.PurchasingDocumentCategory
                                                                                       and $projection.PurchaseContractType       = _PurchasingDocumentTypeName.PurchasingDocumentType
                                                                                       and _PurchasingDocumentTypeName.Language   = $session.system_language

  association [0..*] to I_PurgDocumentCategoryText     as _PurgDocumentCategoryText    on  $projection.PurchasingDocumentCategory = _PurgDocumentCategoryText.PurchasingDocumentCategory

  association [0..*] to I_IncotermsClassificationText  as _IncotermsClassificationText on  $projection.IncotermsClassification = _IncotermsClassificationText.IncotermsClassification

  association [0..*] to I_ReleaseCodeText              as _ReleaseCodeText             on  $projection.ReleaseCode = _ReleaseCodeText.ReleaseCode

  association [0..*] to I_PaymentTermsText             as _PaymentTermsText            on  $projection.PaymentTerms = _PaymentTermsText.PaymentTerms

  association [1..1] to I_PurCtrIncoVersion            as _PurCtrIncotermsVersion      on  $projection.IncotermsVersion = _PurCtrIncotermsVersion.IncotermsVersion

  //  association [0..*] to I_PurchasingDocContactCard     as _ContactCard                 on  (

  //      _ContactCard.ContactCardType     = 'User'

  //      and _ContactCard.ContactCardID   = $projection.CreatedByUser

  //      and _ContactCard.ContactCardRole = 'Purchaser'

  //    )

  //  or(

  //    _ContactCard.ContactCardType       = 'User'

  //    and _ContactCard.ContactCardID     = $projection.CreatedByUser

  //    and _ContactCard.ContactCardRole   = 'Creator'

  //  )

  //  or(

  //    _ContactCard.ContactCardType       = 'Address'

  //    and _ContactCard.ContactCardID     = $projection.SupplierAddressID

  //    and _ContactCard.ContactCardRole   = 'Supplier'

  //  )

  //  or(

  //    _ContactCard.ContactCardType       = 'Supplier'

  //    and _ContactCard.ContactCardID     = $projection.Supplier

  //    and _ContactCard.ContactCardRole   = 'Supplier'

  //  )

  //  or(

  //    _ContactCard.ContactCardType       = 'Supplier'

  //    and _ContactCard.ContactCardID     = $projection.SupplyingSupplier

  //    and _ContactCard.ContactCardRole   = 'Goods Supplier'

  //  )

  //  or(

  //    _ContactCard.ContactCardType       = 'Supplier'

  //    and _ContactCard.ContactCardID     = $projection.InvoicingParty

  //    and _ContactCard.ContactCardRole   = 'Invoicing Party'

  //  )

  //  //    or    (_ContactCard.ContactCardType = 'SupplierContact'           and _ContactCard.ContactCardID = $projection.Supplier)

  //  //      or    (_ContactCard.ContactCardType = 'PurchasingDocument'        and _ContactCard.ContactCardID = $projection.PurchaseContract)


  association [1..1] to I_SupplierOrAddressContactCard as _SupplierHeadOffice          on  (
               _SupplierHeadOffice.ContactCardType     = 'Address'
               and _SupplierHeadOffice.ContactCardID   = $projection.SupplierAddressID
               and _SupplierHeadOffice.ContactCardRole = 'Supplier'
             )

  association [1..1] to I_SupplierOrAddressContactCard as _SupplierHeadOffice1         on  (
              //    _SupplierHeadOffice.ContactCardType     = 'Address'

              //    and _SupplierHeadOffice.ContactCardID   = $projection.SupplierAddressID

              //    and _SupplierHeadOffice.ContactCardRole = 'Supplier'

              //  )

              //or(

              _SupplierHeadOffice1.ContactCardType     = 'Supplier'
              and _SupplierHeadOffice1.ContactCardID   = $projection.Supplier
              and _SupplierHeadOffice1.ContactCardRole = 'Supplier'
            )

  //Extension Association

  association [1]    to E_PurchasingDocument           as _Extension                   on  $projection.PurchaseContract = _Extension.PurchasingDocument

{
      @UI.lineItem: [{
      //         qualifier: 'Contract',  //In a ListReport will be shown LineItem annotated fields without a qualifier only

           position: 10,
           importance: #HIGH }]
      @UI.identification: {position: 5, importance: #HIGH }
      @Consumption.semanticObject: 'PurchaseContract'
      @UI.hidden: true
  key I_PurchaseContractVersion.PurchaseContract,

      @UI.lineItem: [{ position: 10, label: 'Purchase Contract', importance: #HIGH }]
      @UI.identification: {position: 5, importance: #HIGH }
      @Consumption.semanticObject: 'PurchaseContract'
      @EndUserText.label: 'Purchase Contract'
      I_PurchaseContractVersion.ActivePurchasingDocument,

      @ObjectModel.readOnly: true
      @EndUserText.label: 'Version'
      @UI: { dataPoint     : {title: 'Version'} }
      @ObjectModel.text.element: ['ChangeRequestNote']
      @UI.textArrangement: #TEXT_FIRST
      PurchasingDocumentVersion,

      @UI.hidden: true
      @Semantics.text: true
      _VersionType.ChangeRequestNote,

      @ObjectModel.text.association: '_PurchasingDocumentTypeName'
      I_PurchaseContractVersion.PurchaseContractType,

      @UI.hidden: true
      _PurchasingDocumentTypeName.PurchasingDocumentTypeName,

      @ObjectModel.text.association: '_PurgDocumentCategoryText'
      I_PurchaseContractVersion.PurchasingDocumentCategory,

      @ObjectModel.text.association: '_IncotermsClassificationText'
      @UI.fieldGroup: [{
           qualifier: 'DeliveryandPayment',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 20,
           exclude: false,
           importance: #HIGH },
           {
           qualifier: 'Detail2',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 20,
           exclude: false,
           importance: #HIGH
           }]
      I_PurchaseContractVersion.IncotermsClassification,

      I_PurchaseContractVersion.CreationDate,

      @Semantics.currencyCode:true
      I_PurchaseContractVersion.DocumentCurrency,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      @DefaultAggregation: #NONE
      @UI.identification: [{
          position: 10,
          importance: #HIGH }]
      @UI.lineItem: [{
      //         qualifier: 'Contract',

           position: 30,
           importance: #HIGH }]
      @UI.dataPoint: {
             title: 'Target Value', title_asOtr: '005056B2532A1ED58CA9FB4462B2A9B7' }
      I_PurchaseContractVersion.PurchaseContractTargetAmount,

        @UI.identification: [{
          position: 90,
          importance: #HIGH }]
        @UI.lineItem: [{
           position: 90,
           importance: #HIGH }]
        @UI.textArrangement: #TEXT_ONLY
        @ObjectModel.text.association: '_VersionReasonValHelp'
        @EndUserText.label: 'Reason for New Version'
        PurchasingDocVersionReasonCode,

      @ObjectModel.text.association: '_ReleaseCodeText'
      //      @UI.lineItem: [{

      //      //         qualifier: 'Contract',

      //           position: 40,

      //           importance: #HIGH }]

      //      @UI.dataPoint: {

      //             title: 'Status', title_asOtr: '005056B2532A1EE585B97A4F343C0274' }

      I_PurchaseContractVersion.ReleaseCode,

      I_PurchaseContractVersion.PurchasingProcessingStatus,

      @ObjectModel: {
        readOnly: true,
        virtualElement,
        virtualElementCalculatedBy: 'ABAP:CL_PURCONTR_FS_ITEM_TRA_EXIT'
        }
      @UI.lineItem: [{
           position: 40,
           importance: #HIGH }]
      @UI: {
          dataPoint: { title: 'Purchasing Document Status' }}
      cast( '' as val_text)                                                        as PurchasingDocumentStatusName,

      @ObjectModel.text.element:  [ 'SupplierName' ]
            @UI.fieldGroup: [{                                                                                     //^3351437

                 qualifier: 'Supplier',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 10,
                 exclude: false,
                 importance: #HIGH },
                 {
                 qualifier: 'Detail3',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 10,
                 exclude: false,
                 importance: #HIGH
                 }]                                                                                                //v3351437

      @UI.lineItem: [{
      //         qualifier: 'Contract',

           position: 20,
           importance: #HIGH }]
      @UI.dataPoint: { title: 'Supplier' }
      @Consumption.semanticObject: 'Supplier'
      @UI.textArrangement: #TEXT_FIRST
      I_PurchaseContractVersion.Supplier,

      //    cast(I_PurchaseContract._Supplier.AddressID as ContactCardAddress) as AddressID,

      //    _Supplier.SupplierName,

      //    _Supplier._StandardAddress.StreetName,

      //    _Supplier._StandardAddress.HouseNumber,

      //    _Supplier._StandardAddress.CityName,

      //    _Supplier._StandardAddress.PostalCode,

      //    _Supplier._StandardAddress._DefaultEmailAddress.EmailAddress,

      //    _Supplier._StandardAddress._DefaultMobilePhoneNumber.PhoneNumber as MobilePhoneNumber,

      //    _Supplier._StandardAddress._DefaultMobilePhoneNumber.InternationalPhoneNumber as InternationalMobilePhoneNumber,

      //    _Supplier._StandardAddress._DefaultPhoneNumber.PhoneNumber,

      //    _Supplier._StandardAddress._DefaultPhoneNumber.InternationalPhoneNumber,

      //    _Supplier._StandardAddress._DefaultFaxNumber.FaxNumber,

      //    _Supplier._StandardAddress._DefaultFaxNumber.InternationalFaxNumber,


      //      @UI.dataPoint: {

      //         title: 'Supplier', title_asOtr: '40F2E93067D51EE5849F03BA94FC846B' }

      case
      when _SupplierHeadOffice.AddressID is not null then
            _SupplierHeadOffice.FullName
            else _SupplierHeadOffice1.FullName
            end                                                                    as SupplierName,

            @UI.fieldGroup: [{                                                                                     //^3351437

                 qualifier: 'Supplier',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 20,
                 exclude: false,
                 importance: #HIGH },
                 {
                 qualifier: 'Detail3',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 20,
                 exclude: false,
                 importance: #HIGH
                 }]
      @ObjectModel: { virtualElement,
            virtualElementCalculatedBy: 'CL_VDM_CC_ADDRESS_FORMAT',
            readOnly: true }
      @Semantics.address.label: true
      cast('' as contactcardformattedaddress) as FormattedAddress,
      @ObjectModel.readOnly: true
      @UI.hidden: true
                                                                                                                   //v3351437

      case
       when _SupplierHeadOffice.AddressID is not null then
          cast(_SupplierHeadOffice.AddressID as adrnr) //contactcardaddress)

           else
          cast(_SupplierHeadOffice1.AddressID as adrnr)//contactcardaddress)

          end                                                                      as AddressID,

            @UI.fieldGroup: [{                                                                                     //^3351437

                 qualifier: 'Supplier',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 30,
                 exclude: false,
                 importance: #HIGH },
                 {
                 qualifier: 'Detail3',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 30,
                 exclude: false,
                 importance: #HIGH
                 }]                                                                                                //v3351437

      case
        when _SupplierHeadOffice.AddressID is not null then
        _SupplierHeadOffice.EmailAddress
        else _SupplierHeadOffice1.EmailAddress end                                 as EmailAddress,

            @UI.fieldGroup: [{                                                                                     //^3351437

                 qualifier: 'Supplier',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 40,
                 exclude: false,
                 importance: #HIGH },
                 {
                 qualifier: 'Detail3',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 40,
                 exclude: false,
                 importance: #HIGH
                 }]                                                                                                //v3351437

      case
      when _SupplierHeadOffice.AddressID is not null then
        _SupplierHeadOffice.PhoneNumber
      else
       _SupplierHeadOffice1.PhoneNumber
        end                                                                        as InternationalPhoneNumber,

            @UI.fieldGroup: [{                                                                                     //^3351437

                 qualifier: 'Supplier',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 50,
                 exclude: false,
                 importance: #HIGH },
                 {
                 qualifier: 'Detail3',
                 groupLabel: 'Supplier', groupLabel_asOtr: '40F2E93067D51EE5849F03BA94FC846B',
                 position: 50,
                 exclude: false,
                 importance: #HIGH
                 }]                                                                                                //v3351437

      case
      when _SupplierHeadOffice.AddressID is not null then
       _SupplierHeadOffice.MobilePhoneNumber
      else
        _SupplierHeadOffice1.MobilePhoneNumber
      end                                                                          as InternationalMobilePhoneNumber,

      @ObjectModel.text.element:  [ 'CompanyCodeName' ]
      @UI.identification: [{
          position: 40,
          importance: #HIGH }]
      I_PurchaseContractVersion.CompanyCode,

      _CompanyCode.CompanyCodeName,

      @ObjectModel.text.element:  [ 'PurchasingOrganizationName' ]
      @UI.identification: [{
          position: 20,
          label: 'Purchasing Organization', label_asOtr: '40F2E93067D51ED58EEEC1A60CED08B2',
          importance: #HIGH }]
      @UI.dataPoint     : { title: 'Purchasing Organization'}
      @UI.textArrangement: #TEXT_FIRST
      I_PurchaseContractVersion.PurchasingOrganization,

      _PurchasingOrganization.PurchasingOrganizationName,

      @ObjectModel.text.element:  [ 'PurchasingGroupName' ]
      @UI.identification: [{
          position: 30,
          importance: #HIGH }]
      I_PurchaseContractVersion.PurchasingGroup,

      _PurchasingGroup.PurchasingGroupName,

      // for contacts

      SupplyingSupplier,

      InvoicingParty,

      SupplierAddressID,

      CreatedByUser,

      @UI.fieldGroup: [{
           qualifier: 'DeliveryandPayment',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 30,
           exclude: false,
           importance: #HIGH },
           {
           qualifier: 'Detail2',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 30,
           exclude: false,
           importance: #HIGH
           }]
      I_PurchaseContractVersion.IncotermsTransferLocation,

      @ObjectModel.text.association: '_PaymentTermsText'
      @UI.fieldGroup: [{
           qualifier: 'DeliveryandPayment',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 10,
           exclude: false,
           importance: #HIGH },
           {
           qualifier: 'Detail2',
           groupLabel: 'Delivery and Payment', groupLabel_asOtr: '40F2E93067D51EE5849F988EA19FC670',
           position: 10,
           exclude: false,
           importance: #HIGH
           }]
      I_PurchaseContractVersion.PaymentTerms,

      //   Modeled only

      //   will be filled in OData Implementation

      cast('' as mm_pur_paymenttermstext)                                          as PaymentTermsDescription,

      @UI: {fieldGroup: { qualifier: 'DeliveryandPayment', position: 40, importance: #HIGH,
      label: 'Incoterm Location 1'}}
      IncotermsLocation1,

      @UI: {fieldGroup: { qualifier: 'DeliveryandPayment', position: 50, importance: #HIGH,
      label: 'Incoterm Location 2'}}
      IncotermsLocation2,

      @UI: {fieldGroup: { qualifier: 'DeliveryandPayment', position: 60, importance: #HIGH,
      label: 'Incoterms Version'}}
      @UI.textArrangement: #TEXT_FIRST
      @ObjectModel.text.element: ['IncotermsVersionName']
      IncotermsVersion,

      @UI.hidden: true
      @Semantics.text: true
      @ObjectModel.readOnly: true
      _PurCtrIncotermsVersion.IncotermsVersionName,

      @UI: {fieldGroup: {qualifier: 'DeliveryandPayment', position: 70, importance: #HIGH, label: 'First Payment in Days'}}
      I_PurchaseContractVersion.CashDiscount1Days,
      @UI: {fieldGroup: {qualifier: 'DeliveryandPayment', position: 90, importance: #HIGH, label: 'Second Payment in Days'}}
      I_PurchaseContractVersion.CashDiscount2Days,
      @UI: {fieldGroup: {qualifier: 'DeliveryandPayment', position: 110, importance: #HIGH, label: 'Cash Discount Days'}}
      I_PurchaseContractVersion.NetPaymentDays,
      @UI: {fieldGroup: {qualifier: 'DeliveryandPayment', position: 80, importance: #HIGH, label: 'Discount for First Payment in %'}}
      I_PurchaseContractVersion.CashDiscount1Percent,
      @UI: {fieldGroup: {qualifier: 'DeliveryandPayment', position: 100, importance: #HIGH, label: 'Discount for Second Payment in %'}}
      I_PurchaseContractVersion.CashDiscount2Percent,

      @UI.identification: [{
          position: 60,
          importance: #HIGH }]
      @Semantics.businessDate.at: true
      I_PurchaseContractVersion.ValidityEndDate,

      @UI.identification: [{
          position: 50,
          importance: #HIGH }]
      @Semantics.businessDate.at: true
      I_PurchaseContractVersion.ValidityStartDate,

      @UI.identification: [{
          position: 70,
          importance: #HIGH }]
      //ExchangeRate,

      cast( I_PurchaseContractVersion.ExchangeRate as fis_exchange_rate preserving type ) as ExchangeRate,

      @UI.identification: [{
          position: 80,
          importance: #HIGH }]
      ExchangeRateIsFixed,

      @UI.hidden: true
      @ObjectModel.virtualElement : true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PURCONTR_FS_ITEM_TRA_EXIT'
      cast ( '' as abap_boolean )                                                  as PurchasingItemHasHierarchy,

      @UI.hidden: true
      @ObjectModel.virtualElement : true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PURCONTR_FS_ITEM_TRA_EXIT'
      cast ( '' as abap_boolean )                                                  as SrvcProcmtItmHierIsEnbld,

      @UI.hidden: true
      @ObjectModel.virtualElement : true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PURCONTR_FS_ITEM_TRA_EXIT'
      cast ('' as boolean)                                                         as VersionIsEnabled,

      //Associations

      _PurchaseContractHistory,
      _PurchaseContractItem,
      @ObjectModel.filter.enabled: false
      _PurContractItemHierFs,
      _ContractFactSheetHeaderText,
      _PurCtrIncotermsVersion,
      I_PurchaseContractVersion._IncotermsClassification,
      I_PurchaseContractVersion._PurchasingDocumentType,
      I_PurchaseContractVersion._PurchasingDocumentCategory,

      //      _ContactCard,

      _SupplierHeadOffice,
      _SupplierHeadOffice1,
      _IncotermsClassificationText,
      _PurchasingDocumentTypeText,
      _PurgDocumentCategoryText,
      _PaymentTermsText,
      _ReleaseCodeText,
      _PurchasingDocumentTypeName,
      _VersionReasonValHelp

}
where
  PurchasingDocumentDeletionCode <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_PURCHASECONTRACTVERSION",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_PURCONTRVERSIONTYPE",
"I_PURCTRINCOVERSION",
"I_SUPPLIERORADDRESSCONTACTCARD"
],
"ASSOCIATED":
[
"C_CONTRACTFACTSHEETHEADERTEXT",
"C_CONTRACTITEMFS",
"C_PURCONTRACTITEMHIERFACTSHEET",
"E_PURCHASINGDOCUMENT",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSCLASSIFICATIONTEXT",
"I_PAYMENTTERMSTEXT",
"I_PURCHASECONTRACTHISTORY",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURCHASINGDOCUMENTTYPE",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_PURCTRINCOVERSION",
"I_PURGDOCUMENTCATEGORYTEXT",
"I_PURGDOCVERSIONREASONVALHELP",
"I_RELEASECODETEXT",
"I_SUPPLIERORADDRESSCONTACTCARD"
],
"BASE":
[
"I_PURCHASECONTRACTVERSION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/