A_SalesContract

DDL: A_SALESCONTRACT Type: view COMPOSITE

Sales Contract Header

A_SalesContract is a Composite CDS View that provides data about "Sales Contract Header" in SAP S/4HANA. It reads from 1 data source (I_SalesContract) and exposes 47 fields with key field SalesContract. It has 5 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_SalesContract SalesContract from

Associations (5)

CardinalityTargetAliasCondition
[0..*] A_SalesContractItem _Item _Item.SalesContract = $projection.SalesContract
[0..*] A_SalesContractPartner _Partner _Partner.SalesContract = $projection.SalesContract
[0..*] A_SalesContractPrcgElmnt _PricingElement _PricingElement.SalesContract = $projection.SalesContract
[0..*] A_SalesContractText _Text _Text.SalesContract = $projection.SalesContract
[0..1] E_SalesDocumentBasic _Extension $projection.SalesContract = _Extension.SalesDocument

Annotations (15)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Sales Contract Header view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
AbapCatalog.sqlViewName ASALESCONTRACT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey SalesContract view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY SalesContract SalesContract Sales Document
SalesContractType SalesContractType
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision OrganizationDivision Org. Division
SalesGroup SalesGroup Sales Group
SalesOffice SalesOffice Sales Office
SalesDistrict SalesDistrict Sales District
SoldToParty SoldToParty Sold-to Party
CreationDate CreationDate Time Stamp
CreatedByUser CreatedByUser User Name
LastChangeDate LastChangeDate Time Stamp
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
CustomerPurchaseOrderType CustomerPurchaseOrderType
CustomerPurchaseOrderDate CustomerPurchaseOrderDate Purchase Order Date
SalesContractDate SalesContractDate Document Date
TotalNetAmount TotalNetAmount Total Net Amount
TransactionCurrency TransactionCurrency Transaction Currency
SDDocumentReason SDDocumentReason Order Reason
PricingDate PricingDate Pricing Date
IncotermsClassification IncotermsClassification Incoterms
IncotermsTransferLocation IncotermsTransferLocation Incoterms 2
IncotermsLocation1 IncotermsLocation1 Inco. Location1
IncotermsLocation2 IncotermsLocation2 Inco. Location2
IncotermsVersion IncotermsVersion Inco. Version
CustomerPaymentTerms CustomerPaymentTerms Pyt Terms
PaymentMethod PaymentMethod Pymt Meth.
SalesContractValidityStartDate SalesContractValidityStartDate
SalesContractValidityEndDate SalesContractValidityEndDate
SalesContractValidityPerdUnit SalesContractValidityPerdUnit
SalesContractValidityPerdCat SalesContractValidityPerdCat
SalesContractSignedDate SalesContractSignedDate
NmbrOfSalesContractValdtyPerd NmbrOfSalesContractValdtyPerd
SalesContractFollowUpAction SalesContractFollowUpAction
SlsContractFollowUpActionDate SlsContractFollowUpActionDate
ContractManualCompletion ContractManualCompletion
ReferenceSDDocument ReferenceSDDocument Reference Doc.
ReferenceSDDocumentCategory ReferenceSDDocumentCategory Prec.Doc.Categ.
SalesDocApprovalStatus SalesDocApprovalStatus
SalesContractApprovalReason SalesContractApprovalReason
OverallSDProcessStatus OverallSDProcessStatus
TotalCreditCheckStatus TotalCreditCheckStatus
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts
_Item _Item
_Partner _Partner
_PricingElement _PricingElement
_Text _Text

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 A_SalesContract.
-- 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 A_SalesContract AS
SELECT
  SalesContract,
  SalesContractType,
  SalesOrganization,
  DistributionChannel,
  OrganizationDivision,
  SalesGroup,
  SalesOffice,
  SalesDistrict,
  SoldToParty,
  CreationDate,
  CreatedByUser,
  LastChangeDate,
  PurchaseOrderByCustomer,
  CustomerPurchaseOrderType,
  CustomerPurchaseOrderDate,
  SalesContractDate,
  TotalNetAmount,
  TransactionCurrency,
  SDDocumentReason,
  PricingDate,
  IncotermsClassification,
  IncotermsTransferLocation,
  IncotermsLocation1,
  IncotermsLocation2,
  IncotermsVersion,
  CustomerPaymentTerms,
  PaymentMethod,
  SalesContractValidityStartDate,
  SalesContractValidityEndDate,
  SalesContractValidityPerdUnit,
  SalesContractValidityPerdCat,
  SalesContractSignedDate,
  NmbrOfSalesContractValdtyPerd,
  SalesContractFollowUpAction,
  SlsContractFollowUpActionDate,
  ContractManualCompletion,
  ReferenceSDDocument,
  ReferenceSDDocumentCategory,
  SalesDocApprovalStatus,
  SalesContractApprovalReason,
  OverallSDProcessStatus,
  TotalCreditCheckStatus,
  OverallSDDocumentRejectionSts
FROM I_SalesContract AS SalesContract
LEFT OUTER JOIN A_SalesContractItem AS _Item ON _Item.SalesContract = SalesContract  -- association [0..*]
LEFT OUTER JOIN A_SalesContractPartner AS _Partner ON _Partner.SalesContract = SalesContract  -- association [0..*]
LEFT OUTER JOIN A_SalesContractPrcgElmnt AS _PricingElement ON _PricingElement.SalesContract = SalesContract  -- association [0..*]
LEFT OUTER JOIN A_SalesContractText AS _Text ON _Text.SalesContract = SalesContract  -- association [0..*]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SalesContract = _Extension.SalesDocument  -- association [0..1]
;