C_EWA_SalesContractQuery

DDL: C_EWA_SALESCONTRACTQUERY SQL: CSALES Type: view CONSUMPTION

Sales contracts - Query

C_EWA_SalesContractQuery (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Utilities

C_EWA_SalesContractQuery is a Consumption CDS View that provides data about "Sales contracts - Query" in SAP S/4HANA. It reads from 1 data source (I_EWA_SalesContractCube) and exposes 112 fields with key fields MaintenanceObjectList, MaintenanceObjectListItem, EWAEndDate, EWAValidFromDate.

SAP Help Documentation

CategoryCDS Views for Sales Contract
Data CategoryQuery
Purpose
This CDS view is used to extract all fields related to a waste specific Sales Contract. To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: v_vbak_vko (Authorization object for sales sales area) v_vbak_aat (Authorization object for sales document types)

Structure
Parameters The parameters of the CDS view are as follows: P_EndDate : This parameter represents end date of sales contract P_StartDate : This parameter represents start date of sales contract Fields Used for Filtering The main filters are as follows: sparte : This field is used to filter waste management specific contracts. Important Fields Important fields in this view include the following: Field Name Description Measure or Attribute Comment MaintenanceObjectList Object List Measure Object List Number MaintenanceObjectListItem Object Counter Measure Object List Counter EWAEndDate Valid to Attribute Date at Which a Time Slice Expires EWAValidFromDate Valid from Attribute Date from which time slice is valid SalesContract Sales contract Attribute Sales Document Division Division Attribute Division Material Material Attribute Material Number

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessUtilities
Application ComponentIS-U-WA
CapabilitiesAnalytical Query
PackageUtilities for SAP S/4HANA
Description <p>This CDS view is used to extract all fields related to a waste specific Sales Contract. </p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_EWA_SalesContractCube I_EWA_SalesContractCube from

Parameters (2)

NameTypeDefault
P_StartDate eewa_vdm_startdate
P_EndDate eewa_vdm_enddate

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName CSALES view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Sales contracts - Query view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #CONSUMPTION view
Analytics.query true view
ObjectModel.modelingPattern #ANALYTICAL_QUERY view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (112)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceObjectList MaintenanceObjectList Object List Number
KEY MaintenanceObjectListItem MaintenanceObjectListItem Object List Counter
KEY EWAEndDate EWAEndDate Date at Which a Time Slice Expires
KEY EWAValidFromDate EWAValidFromDate Date from which time slice is valid
SalesContract SalesContract Sales contract
SalesContractItem SalesContractItem Sales Document Item
SalesDocument SalesDocument Sales Contract
SalesContractItemCategory SalesContractItemCategory Sales contract item category
SalesDocumentItemType SalesDocumentItemType Item Type
IsReturnsItem IsReturnsItem Returns Item
CompletionRule CompletionRule Completion Rule for Quotation / Contract
Division Division Division
Material Material Material Number
Product Product Product Number
OriginallyRequestedMaterial OriginallyRequestedMaterial Material Entered
MaterialByCustomer MaterialByCustomer Material Number Used by Customer
InternationalArticleNumber InternationalArticleNumber International Article Number (EAN/UPC)
ProductHierarchyNode ProductHierarchyNode Product Hierarchy
ProductCatalog ProductCatalog Product Catalog Number
MaterialSubstitutionReason MaterialSubstitutionReason Reason for Material Substitution
MaterialGroup MaterialGroup Material Group
ProductGroup ProductGroup Product Sold Group
MaterialPricingGroup MaterialPricingGroup Product Price Group
AdditionalMaterialGroup1 AdditionalMaterialGroup1 Material Group 1
AdditionalMaterialGroup2 AdditionalMaterialGroup2 Material Group 2
AdditionalMaterialGroup3 AdditionalMaterialGroup3 Material Group 3
AdditionalMaterialGroup4 AdditionalMaterialGroup4 Material Group 4
AdditionalMaterialGroup5 AdditionalMaterialGroup5 Material Group 5
Plant Plant Plant (Own or External)
Batch Batch Batch Number
StorageLocation StorageLocation Storage Location
ProductConfiguration ProductConfiguration Configuration
BillOfMaterial BillOfMaterial Character field, 8 characters long
SalesContractItemText SalesContractItemText Short text for sales order item
SalesContractValidityEndDate SalesContractValidityEndDate Contract End Date
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
_OrderQuantityUnit _OrderQuantityUnit
_TargetQuantityUnit _TargetQuantityUnit
_RequestedQuantityUnit _RequestedQuantityUnit
_ItemVolumeUnit _ItemVolumeUnit
_SalesContract _SalesContract
SalesContractCount SalesContractCount Number of Sales Contracts
OrderQuantity OrderQuantity Cumulative order quantity in sales units
OrderQuantityUnit OrderQuantityUnit Sales Unit
TargetQuantity TargetQuantity Target Quantity in Sales Units
TargetQuantityUnit TargetQuantityUnit Target Quantity UoM
RequestedQuantity RequestedQuantity Requested Quantity
RequestedQuantityUnit RequestedQuantityUnit Unit of the Requested Quantity
ItemVolume ItemVolume Volume of the item
ItemVolumeUnit ItemVolumeUnit Volume Unit
AddressID AddressID Ship-to address
AddressRepresentationCode AddressRepresentationCode Version ID for International Addresses
AddressIsPersonAddress AddressIsPersonAddress Flag: This is a personal address
CorrespondenceLanguage CorrespondenceLanguage Language Key
PrfrdCommMediumType PrfrdCommMediumType Communication Method (Key) (Business Address Services)
CityNumber CityNumber City code for city/street file
CityName CityName Name
DistrictName DistrictName District
VillageName VillageName City (different from postal city)
PostalCode PostalCode City postal code
CompanyPostalCode CompanyPostalCode Company Postal Code (for Large Customers)
POBox POBox PO Box
POBoxAddrNonDeliverableReason POBoxAddrNonDeliverableReason PO Box Address Undeliverable Flag
POBoxIsWithoutNumber POBoxIsWithoutNumber Flag: PO Box Without Number
POBoxPostalCode POBoxPostalCode PO Box Postal Code
POBoxLobbyName POBoxLobbyName PO Box Lobby
POBoxDeviatingCityName POBoxDeviatingCityName PO Box City
POBoxDeviatingCityCode POBoxDeviatingCityCode City PO box code (City file)
POBoxDeviatingRegion POBoxDeviatingRegion Region for PO Box (Country/Region, State, Province, ...)
POBoxDeviatingCountry POBoxDeviatingCountry PO Box of Country/Region
Street Street Street Number for City/Street File
StreetName StreetName Street
StreetAddrNonDeliverableReason StreetAddrNonDeliverableReason Street Address Undeliverable Flag
StreetPrefixName1 StreetPrefixName1 Street 2
StreetPrefixName2 StreetPrefixName2 Street 3
StreetSuffixName1 StreetSuffixName1 Street 4
StreetSuffixName2 StreetSuffixName2 Street 5
HouseNumber HouseNumber House Number
HouseNumberSupplementText HouseNumberSupplementText House number supplement
Building Building Building (Number or Code)
Floor Floor Floor in building
RoomNumber RoomNumber Room or Apartment Number
Country Country Country/Region Key
Region Region Region (State, Province, County)
CareOfName CareOfName c/o name
FormOfAddress FormOfAddress Form-of-Address Key
AddresseeName1 AddresseeName1 Name 1
AddresseeName2 AddresseeName2 Name 2
AddresseeName3 AddresseeName3 Name 3
AddresseeName4 AddresseeName4 Name 4
TaxJurisdiction TaxJurisdiction Tax Jurisdiction
TransportZone TransportZone Transportation zone to or from which the goods are delivered
DeliveryServiceTypeCode DeliveryServiceTypeCode Type of Delivery Service
DeliveryServiceNumber DeliveryServiceNumber Number of Delivery Service
AddressTimeZone AddressTimeZone Address Time Zone
SecondaryRegion SecondaryRegion County code for county
SecondaryRegionName SecondaryRegionName County
TertiaryRegion TertiaryRegion Township code for Township
TertiaryRegionName TertiaryRegionName Township
AddressSearchTerm1 AddressSearchTerm1 Search Term 1
AddressSearchTerm2 AddressSearchTerm2 Search Term 2
RegionalStructureCheckStatus RegionalStructureCheckStatus City file test status
AddressGroup AddressGroup Address Group (Key) (Business Address Services)
DistrictNumber DistrictNumber District code for City and Street file
RegionalStructureGroup RegionalStructureGroup Regional structure grouping
AddressCreatedByUser AddressCreatedByUser Created By User
AddressChangedByUser AddressChangedByUser Last Changed By User
_AddressRepresentationCode _AddressRepresentationCode
_Country _Country
_FormOfAddress _FormOfAddress
_Region _Region
_TransportationZone _TransportationZone

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_EWA_SalesContractQuery.
-- 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: CSALES
-- Parameters: P_StartDate : eewa_vdm_startdate, P_EndDate : eewa_vdm_enddate

CREATE VIEW C_EWA_SalesContractQuery AS
SELECT
  MaintenanceObjectList,
  MaintenanceObjectListItem,
  EWAEndDate,
  EWAValidFromDate,
  SalesContract,
  SalesContractItem,
  SalesDocument,
  SalesContractItemCategory,
  SalesDocumentItemType,
  IsReturnsItem,
  CompletionRule,
  Division,
  Material,
  Product,
  OriginallyRequestedMaterial,
  MaterialByCustomer,
  InternationalArticleNumber,
  ProductHierarchyNode,
  ProductCatalog,
  MaterialSubstitutionReason,
  MaterialGroup,
  ProductGroup,
  MaterialPricingGroup,
  AdditionalMaterialGroup1,
  AdditionalMaterialGroup2,
  AdditionalMaterialGroup3,
  AdditionalMaterialGroup4,
  AdditionalMaterialGroup5,
  Plant,
  Batch,
  StorageLocation,
  ProductConfiguration,
  BillOfMaterial,
  SalesContractItemText,
  SalesContractValidityEndDate,
  PurchaseOrderByCustomer,
  SalesContractCount,
  OrderQuantity,
  OrderQuantityUnit,
  TargetQuantity,
  TargetQuantityUnit,
  RequestedQuantity,
  RequestedQuantityUnit,
  ItemVolume,
  ItemVolumeUnit,
  AddressID,
  AddressRepresentationCode,
  AddressIsPersonAddress,
  CorrespondenceLanguage,
  PrfrdCommMediumType,
  CityNumber,
  CityName,
  DistrictName,
  VillageName,
  PostalCode,
  CompanyPostalCode,
  POBox,
  POBoxAddrNonDeliverableReason,
  POBoxIsWithoutNumber,
  POBoxPostalCode,
  POBoxLobbyName,
  POBoxDeviatingCityName,
  POBoxDeviatingCityCode,
  POBoxDeviatingRegion,
  POBoxDeviatingCountry,
  Street,
  StreetName,
  StreetAddrNonDeliverableReason,
  StreetPrefixName1,
  StreetPrefixName2,
  StreetSuffixName1,
  StreetSuffixName2,
  HouseNumber,
  HouseNumberSupplementText,
  Building,
  Floor,
  RoomNumber,
  Country,
  Region,
  CareOfName,
  FormOfAddress,
  AddresseeName1,
  AddresseeName2,
  AddresseeName3,
  AddresseeName4,
  TaxJurisdiction,
  TransportZone,
  DeliveryServiceTypeCode,
  DeliveryServiceNumber,
  AddressTimeZone,
  SecondaryRegion,
  SecondaryRegionName,
  TertiaryRegion,
  TertiaryRegionName,
  AddressSearchTerm1,
  AddressSearchTerm2,
  RegionalStructureCheckStatus,
  AddressGroup,
  DistrictNumber,
  RegionalStructureGroup,
  AddressCreatedByUser,
  AddressChangedByUser
FROM I_EWA_SalesContractCube
;