A_PurchaseContract

DDL: A_PURCHASECONTRACT SQL: APURCONTRACT Type: view COMPOSITE

Purchase Contract

A_PurchaseContract is a Composite CDS View that provides data about "Purchase Contract" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContract) and exposes 42 fields with key field PurchaseContract. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseContract I_PurchaseContract from

Associations (3)

CardinalityTargetAliasCondition
[1..*] A_PurchaseContractItem _PurchaseContractItem $projection.PurchaseContract = _PurchaseContractItem.PurchaseContract
[0..*] A_PurCtrPartners _PurCtrPartners $projection.PurchaseContract = _PurCtrPartners.PurchaseContract ----Extension
[0..1] E_PurchasingDocument _PurchaseContractExtension $projection.PurchaseContract = _PurchaseContractExtension.PurchasingDocument association[0..*] to I_PurchaseContractStatus as _PurchaseContractStatus on $projection.PurchasingProcessingStatus = _PurchaseContractStatus.PurchasingProcessingStatus

Annotations (17)

NameValueLevelField
AbapCatalog.sqlViewName APURCONTRACT view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
VDM.viewType #COMPOSITE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.compositionRoot true view
ObjectModel.representativeKey PurchaseContract view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled false view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Purchase Contract view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract PurchaseContract
PurchaseContractType PurchaseContractType
CompanyCode CompanyCode
PurchasingDocumentDeletionCode PurchasingDocumentDeletionCode
CreationDate CreationDate
CreatedByUser CreatedByUser
Supplier Supplier
PurchasingOrganization PurchasingOrganization
PurchasingGroup PurchasingGroup
PaymentTerms PaymentTerms
CashDiscount1Days CashDiscount1Days
CashDiscount2Days CashDiscount2Days
NetPaymentDays NetPaymentDays
CashDiscount1Percent CashDiscount1Percent
CashDiscount2Percent CashDiscount2Percent
DocumentCurrency DocumentCurrency
ExchangeRate
ExchangeRateIsFixed ExchangeRateIsFixed
ValidityStartDate ValidityStartDate
ValidityEndDate ValidityEndDate
QuotationSubmissionDate QuotationSubmissionDate
CorrespncExternalReference CorrespncExternalReference
SupplierQuotation SupplierQuotation
SupplierRespSalesPersonName SupplierRespSalesPersonName
SupplierPhoneNumber SupplierPhoneNumber
SupplyingSupplier SupplyingSupplier
IncotermsClassification IncotermsClassification
IncotermsTransferLocation IncotermsTransferLocation
PurchaseContractTargetAmount PurchaseContractTargetAmount
InvoicingParty InvoicingParty
CorrespncInternalReference CorrespncInternalReference
ReleaseCode ReleaseCode
IncotermsVersion IncotermsVersion
IncotermsLocation1 IncotermsLocation1
IncotermsLocation2 IncotermsLocation2
IsEndOfPurposeBlocked IsEndOfPurposeBlocked
LastChangeDateTime LastChangeDateTime
PurchasingProcessingStatus PurchasingProcessingStatus
PurchasingProcessingStatusName
PurgContractIsInPreparation
_PurchaseContractItem _PurchaseContractItem
_PurCtrPartners _PurCtrPartners
@AbapCatalog.sqlViewName: 'APURCONTRACT'
@VDM.lifecycle.contract.type:#PUBLIC_REMOTE_API
@VDM.viewType : #COMPOSITE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel: {
  compositionRoot:true,
  representativeKey: 'PurchaseContract',
  createEnabled: true,
  updateEnabled: true,
  deleteEnabled: false
  
}
@AccessControl.personalData.blocking: #NOT_REQUIRED
@EndUserText.label: 'Purchase Contract'
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
define view A_PurchaseContract as select from I_PurchaseContract 

    association [1..*] to  A_PurchaseContractItem       as _PurchaseContractItem       on $projection.PurchaseContract = _PurchaseContractItem.PurchaseContract
  
    association [0..*] to  A_PurCtrPartners             as _PurCtrPartners             on $projection.PurchaseContract = _PurCtrPartners.PurchaseContract
  
//    association [0..*] to  A_PurCtrNotes                as _Purctrnotes                on $projection.PurchaseContract = _Purctrnotes.ArchitecturalObjectNumber

//  


    ----Extension Association
    association [0..1] to  E_PurchasingDocument         as _PurchaseContractExtension  on $projection.PurchaseContract = _PurchaseContractExtension.PurchasingDocument
    association[0..*]  to I_PurchaseContractStatus      as _PurchaseContractStatus     on $projection.PurchasingProcessingStatus = _PurchaseContractStatus.PurchasingProcessingStatus
                                                                                          
{
     key PurchaseContract,
      
      @ObjectModel.sapObjectNodeTypeReference: 'PurchaseContractType'
      PurchaseContractType,
    
      CompanyCode,
    
      PurchasingDocumentDeletionCode,
    
      CreationDate,
     
      CreatedByUser,
      
      Supplier,

      PurchasingOrganization,
      
      @ObjectModel.sapObjectNodeTypeReference:'PurchasingGroup'
      PurchasingGroup,
      
      @ObjectModel.sapObjectNodeTypeReference:'PaymentTerms'
      PaymentTerms,

      CashDiscount1Days,

      CashDiscount2Days,

      NetPaymentDays,

      CashDiscount1Percent,

      CashDiscount2Percent,
      
      @Semantics.currencyCode:true
      @ObjectModel.sapObjectNodeTypeReference:'Currency' 
      DocumentCurrency,
    
      cast (ExchangeRate as abap.char(12)) as ExchangeRate,
       
      ExchangeRateIsFixed,
       
      ValidityStartDate,
       
      ValidityEndDate,
       
      QuotationSubmissionDate,
       
      CorrespncExternalReference,
      
      SupplierQuotation,
       
      SupplierRespSalesPersonName,
      
      SupplierPhoneNumber,
       
      SupplyingSupplier,
      
      @ObjectModel.sapObjectNodeTypeReference: 'IncotermsClassification'
      IncotermsClassification,

      IncotermsTransferLocation,
      
      @Semantics.amount.currencyCode: 'DocumentCurrency'
      PurchaseContractTargetAmount,
      
      InvoicingParty,
      
      CorrespncInternalReference,
      
      ReleaseCode,
      
      @ObjectModel.sapObjectNodeTypeReference: 'IncotermsVersion' 
      IncotermsVersion,
      
      IncotermsLocation1,
      
      IncotermsLocation2,
      
      IsEndOfPurposeBlocked,

      LastChangeDateTime,

      PurchasingProcessingStatus,

      _PurchaseContractStatus[1: Language = $session.system_language].PurchasingProcessingStatusName,

      cast ('' as boolean) as PurgContractIsInPreparation,
         
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
        _PurchaseContractItem,
      
//      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]

//        _Purctrnotes,

      
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
        _PurCtrPartners
   
    
}

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASECONTRACT",
"I_PURCHASECONTRACTSTATUS"
],
"ASSOCIATED":
[
"A_PURCHASECONTRACTITEM",
"A_PURCTRPARTNERS",
"E_PURCHASINGDOCUMENT",
"I_PURCHASECONTRACTSTATUS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/