C_SalesOrderQuery

DDL: C_SALESORDERQUERY Type: view CONSUMPTION

Sales Order - Query

C_SalesOrderQuery (Consumption)

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

Sales

C_SalesOrderQuery is a Consumption CDS View that provides data about "Sales Order - Query" in SAP S/4HANA. It reads from 1 data source (I_SalesOrderCube) and exposes 101 fields with key field SalesOrder.

SAP API Hub

StateC1
Line of BusinessSales
Application ComponentSD-ANA
CapabilitiesAnalytical Query
PackageSales for SAP S/4HANA Cloud Private Edition
Description This CDS view provides the prerequisites for answering questions about sales orders at header level. Example business questions include:<ul> <li><p>What's the sold-to party of the sales order?</p></li> <li><p>What's the overall processing status of the sales order?</p></li> <li><p>How many sales orders are in the system and how many are still open?</p></li> <li><p>What is the overall open value of my sales orders?</p></li> </ul>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_SalesOrderCube I_SalesOrderCube from

Parameters (2)

NameTypeDefault
P_ExchangeRateType kurst
P_DisplayCurrency vdm_v_display_currency

Annotations (12)

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

Fields (101)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder SalesOrder SD Document
SalesOrderType SalesOrderType Sales Document Type
DisplayCurrency DisplayCurrency Display Currency
NumberOfIncomingSalesOrders NumberOfIncomingSalesOrders Number of Incoming Sales Orders
NumberOfOpenSalesOrders NumberOfOpenSalesOrders Number of Open Sales Orders
OpnSOForOrdReltdInvcsNetAmtDC OpnSOForOrdReltdInvcsNetAmtDC Open Sales Orders for Ord.Reltd Billing Net Amount IDC
OpnSlsOrdsForDelivAmtInDspCrcy OpnSlsOrdsForDelivAmtInDspCrcy Open Sales Orders for Deliveries Net Amt in Displ. Crcy
OpnSlsOrdsForInvcPlansNetAmtDC OpnSlsOrdsForInvcPlansNetAmtDC Open Sls Orders for Billing Plans Net Amt in Displ. Crcy
OpenSalesOrdersNetAmountInDC Open Sales Orders Net Amount In Display Currency
CreatedByUser CreatedByUser Name of Person Responsible for Creating the Object
CreationDate CreationDate Record Created On
CreationTime CreationTime Time at Which Record Was Created
LastChangeDate LastChangeDate Last Changed On
CreationDateYear CreationDateYear Year of Creation
CreationDateYearQuarter CreationDateYearQuarter Year/Quarter of Creation
CreationDateYearMonth CreationDateYearMonth Year/Month of Creation
SalesOrderDateYear SalesOrderDateYear Year of Order
SalesOrderDateYearQuarter SalesOrderDateYearQuarter Quarter of Order
SalesOrderDateYearMonth SalesOrderDateYearMonth Month of Order
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel Distribution Channel
OrganizationDivision OrganizationDivision Organization Division
SalesOffice SalesOffice Sales Office
SalesGroup SalesGroup Sales Group
PartnerCompany PartnerCompany Company ID of Trading Partner
SoldToParty SoldToParty Sold-to Party
SoldToPartyClassification SoldToPartyClassification Customer Classification
ShipToParty ShipToParty Ship-To Party (obsolete)
BillToParty BillToParty Inv. Recipient
PayerParty PayerParty Payer
CustomerGroup CustomerGroup Customer Group
AdditionalCustomerGroup1 AdditionalCustomerGroup1 Customer Group 1
AdditionalCustomerGroup2 AdditionalCustomerGroup2 Customer Group 2
AdditionalCustomerGroup3 AdditionalCustomerGroup3 Customer Group 3
AdditionalCustomerGroup4 AdditionalCustomerGroup4 Customer Group 4
AdditionalCustomerGroup5 AdditionalCustomerGroup5 Customer Group 5
CustomerRebateAgreement CustomerRebateAgreement Customer Rebate Agreement
SalesOrderDate SalesOrderDate Document Date (Date Received/Sent)
SDDocumentReason SDDocumentReason Order Reason (Reason for the Business Transaction)
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
CustomerPurchaseOrderType CustomerPurchaseOrderType Customer Purchase Order Type
CustomerPurchaseOrderDate CustomerPurchaseOrderDate Customer Reference Date
CustomerPurchaseOrderSuplmnt CustomerPurchaseOrderSuplmnt Purchase order number supplement
SalesDistrict SalesDistrict Sales District
ProductCatalog ProductCatalog Product Catalog Number
ServicesRenderedDate ServicesRenderedDate Date on which services are rendered
RetailPromotion RetailPromotion Retail Promotion
SalesOrderCondition SalesOrderCondition Sales Order Condition
RequestedDeliveryDate RequestedDeliveryDate Requested Delivery Date
ShippingType ShippingType Shipping Type
ShippingCondition ShippingCondition Shipping Conditions
IncotermsClassification IncotermsClassification Incoterms (Part 1)
IncotermsTransferLocation IncotermsTransferLocation Incoterms (Part 2)
IncotermsLocation1 IncotermsLocation1 Incoterms Location 1
IncotermsLocation2 IncotermsLocation2 Incoterms Location 2
IncotermsVersion IncotermsVersion Incoterms Version
DeliveryBlockReason DeliveryBlockReason Delivery Block (Document Header)
BillingDocumentDate BillingDocumentDate Billing Date
BillingCompanyCode BillingCompanyCode Company Code to Be Billed
HeaderBillingBlockReason HeaderBillingBlockReason Billing Block in SD Document
CustomerPaymentTerms CustomerPaymentTerms Terms of Payment Key
PaymentMethod PaymentMethod Payment Method
FixedValueDate FixedValueDate Fixed Value Date
CustomerProject CustomerProject Commercial Project ID
FiscalYear FiscalYear G/L Fiscal Year
FiscalPeriod FiscalPeriod Posting Period
BusinessArea BusinessArea Business Area
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup Account Assignment Group for Customer
CostCenterBusinessArea CostCenterBusinessArea Business Area from Cost Center
CostCenter CostCenter Cost Center
ControllingArea ControllingArea Controlling Area
OrderID OrderID Order Number
ReferenceSDDocument ReferenceSDDocument Document Number of Reference Document
ReferenceSDDocumentCategory ReferenceSDDocumentCategory Document Category of Preceding SD Document
BusinessSolutionOrder BusinessSolutionOrder Solution Order
OverallPurchaseConfStatus OverallPurchaseConfStatus Purchasing Confirmation Status (All Items)
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts Rejection Status (All Items)
TotalBlockStatus TotalBlockStatus Overall Block Status (Header)
OverallDelivConfStatus OverallDelivConfStatus Delivery Confirmation Status (All Items)
OverallTotalDeliveryStatus OverallTotalDeliveryStatus Overall Delivery Status (All Items)
OverallDeliveryStatus OverallDeliveryStatus Delivery Status (All Items)
OverallDeliveryBlockStatus OverallDeliveryBlockStatus Overall Delivery Block Status (All Items)
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus Order-Related Billing Status (All Items)
OverallBillingBlockStatus OverallBillingBlockStatus Billing Block Status (All Items)
OverallTotalSDDocRefStatus OverallTotalSDDocRefStatus Overall Reference Status (All Items)
OverallSDDocReferenceStatus OverallSDDocReferenceStatus Reference Status (All Items)
TotalCreditCheckStatus TotalCreditCheckStatus Overall Status of Credit Checks
MaxDocValueCreditCheckStatus MaxDocValueCreditCheckStatus Status of Credit Check Against Maximum Document Value
PaymentTermCreditCheckStatus PaymentTermCreditCheckStatus Status of Credit Check Against Terms of Payment
FinDocCreditCheckStatus FinDocCreditCheckStatus Status of Credit Check Against Financial Document
ExprtInsurCreditCheckStatus ExprtInsurCreditCheckStatus Status of Credit Check Against Export Credit Insurance
PaytAuthsnCreditCheckSts PaytAuthsnCreditCheckSts Status of Credit Check Against Payment Card Authorization
CentralCreditCheckStatus CentralCreditCheckStatus Central Credit Check Status
CentralCreditChkTechErrSts CentralCreditChkTechErrSts Status of Technical Error SAP Credit Management
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus Incompletion Status (Header)
OverallPricingIncompletionSts OverallPricingIncompletionSts Pricing Incompletion Status (All Items)
HeaderDelivIncompletionStatus HeaderDelivIncompletionStatus Delivery Incompletion Status (Header)
HeaderBillgIncompletionStatus HeaderBillgIncompletionStatus Billing Incompletion Status (Header)
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts Incompletion Status (All Items)
OvrlItmBillingIncompletionSts OvrlItmBillingIncompletionSts Billing Incompletion Status (All Items)
OvrlItmDelivIncompletionSts OvrlItmDelivIncompletionSts Delivery Incompletion Status (All Items)

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_SalesOrderQuery.
-- 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.
-- Parameters: P_ExchangeRateType : kurst, P_DisplayCurrency : vdm_v_display_currency

CREATE VIEW C_SalesOrderQuery AS
SELECT
  SalesOrder,
  SalesOrderType,
  DisplayCurrency,
  NumberOfIncomingSalesOrders,
  NumberOfOpenSalesOrders,
  OpnSOForOrdReltdInvcsNetAmtDC,
  OpnSlsOrdsForDelivAmtInDspCrcy,
  OpnSlsOrdsForInvcPlansNetAmtDC,
  cast(1 as opn_ord_amt_idc) AS OpenSalesOrdersNetAmountInDC,
  CreatedByUser,
  CreationDate,
  CreationTime,
  LastChangeDate,
  CreationDateYear,
  CreationDateYearQuarter,
  CreationDateYearMonth,
  SalesOrderDateYear,
  SalesOrderDateYearQuarter,
  SalesOrderDateYearMonth,
  SalesOrganization,
  DistributionChannel,
  OrganizationDivision,
  SalesOffice,
  SalesGroup,
  PartnerCompany,
  SoldToParty,
  SoldToPartyClassification,
  ShipToParty,
  BillToParty,
  PayerParty,
  CustomerGroup,
  AdditionalCustomerGroup1,
  AdditionalCustomerGroup2,
  AdditionalCustomerGroup3,
  AdditionalCustomerGroup4,
  AdditionalCustomerGroup5,
  CustomerRebateAgreement,
  SalesOrderDate,
  SDDocumentReason,
  PurchaseOrderByCustomer,
  CustomerPurchaseOrderType,
  CustomerPurchaseOrderDate,
  CustomerPurchaseOrderSuplmnt,
  SalesDistrict,
  ProductCatalog,
  ServicesRenderedDate,
  RetailPromotion,
  SalesOrderCondition,
  RequestedDeliveryDate,
  ShippingType,
  ShippingCondition,
  IncotermsClassification,
  IncotermsTransferLocation,
  IncotermsLocation1,
  IncotermsLocation2,
  IncotermsVersion,
  DeliveryBlockReason,
  BillingDocumentDate,
  BillingCompanyCode,
  HeaderBillingBlockReason,
  CustomerPaymentTerms,
  PaymentMethod,
  FixedValueDate,
  CustomerProject,
  FiscalYear,
  FiscalPeriod,
  BusinessArea,
  CustomerAccountAssignmentGroup,
  CostCenterBusinessArea,
  CostCenter,
  ControllingArea,
  OrderID,
  ReferenceSDDocument,
  ReferenceSDDocumentCategory,
  BusinessSolutionOrder,
  OverallPurchaseConfStatus,
  OverallSDDocumentRejectionSts,
  TotalBlockStatus,
  OverallDelivConfStatus,
  OverallTotalDeliveryStatus,
  OverallDeliveryStatus,
  OverallDeliveryBlockStatus,
  OverallOrdReltdBillgStatus,
  OverallBillingBlockStatus,
  OverallTotalSDDocRefStatus,
  OverallSDDocReferenceStatus,
  TotalCreditCheckStatus,
  MaxDocValueCreditCheckStatus,
  PaymentTermCreditCheckStatus,
  FinDocCreditCheckStatus,
  ExprtInsurCreditCheckStatus,
  PaytAuthsnCreditCheckSts,
  CentralCreditCheckStatus,
  CentralCreditChkTechErrSts,
  HdrGeneralIncompletionStatus,
  OverallPricingIncompletionSts,
  HeaderDelivIncompletionStatus,
  HeaderBillgIncompletionStatus,
  OvrlItmGeneralIncompletionSts,
  OvrlItmBillingIncompletionSts,
  OvrlItmDelivIncompletionSts
FROM I_SalesOrderCube
;