C_SalesDocumentList
List of sales documents
C_SalesDocumentList is a Consumption CDS View that provides data about "List of sales documents" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 30 fields with key fields SalesDocument, SalesDocumentItem. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SalesDocument | SalesDocument | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_ProductText | _Product | _Product.Product = $projection.Product and _Product.Language = $session.system_language |
| [0..1] | I_Customer | _Customer | $projection.SoldToParty = _Customer.Customer |
| [0..1] | I_SalesDocumentTypeText | _SalesDocumentTypeText | _SalesDocumentTypeText.SalesDocumentType = $projection.SalesDocumentType and _SalesDocumentTypeText.Language = $session.system_language |
| [0..1] | I_SalesDocItemCompletePartner | _ShipToParty | $projection.SalesDocument = _ShipToParty.SalesDocument and $projection.SalesDocumentItem = _ShipToParty.SalesDocumentItem and _ShipToParty.PartnerFunction = 'WE' |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| OData.entityType.name | SalesDocumentList_Type | view | |
| EndUserText.label | List of sales documents | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | I_SalesDocument | SalesDocument | SD Document |
| KEY | SalesDocumentItem | SalesDocumentItem | SalesDocumentItem | Sales Document Item |
| SDDocumentCategory | I_SalesDocument | SDDocumentCategory | Document Cat. | |
| SoldToParty | I_SalesDocument | SoldToParty | Sold-to Party | |
| SalesOrganization | I_SalesDocument | SalesOrganization | Sales Organization | |
| DistributionChannel | I_SalesDocument | DistributionChannel | RefDistCh-Cust/Mat. | |
| OrganizationDivision | I_SalesDocument | OrganizationDivision | Org. Division | |
| SalesDocumentType | I_SalesDocument | SalesDocumentType | Sales Doc. Type | |
| PurchaseOrderByCustomer | I_SalesDocument | PurchaseOrderByCustomer | Purchase Order Number | |
| CreatedByUser | I_SalesDocument | CreatedByUser | User Name | |
| CreationDate | I_SalesDocument | CreationDate | Time Stamp | |
| SalesDocumentDate | I_SalesDocument | SalesDocumentDate | Document Date | |
| OverallSDProcessStatus | I_SalesDocument | OverallSDProcessStatus | ||
| OverallTotalDeliveryStatus | I_SalesDocument | OverallTotalDeliveryStatus | ||
| NetAmount | SalesDocumentItem | NetAmount | Stated Amount | |
| TransactionCurrency | SalesDocumentItem | TransactionCurrency | Transaction Currency | |
| CustomerRefItemText | SalesDocumentItem | PurchaseOrderByCustomer | Purchase Order Number | |
| SalesDocumentItemText | SalesDocumentItem | SalesDocumentItemText | Item Descr. | |
| Product | SalesDocumentItem | Product | Product Sold | |
| Plant | SalesDocumentItem | Plant | Valuation Area | |
| OrderQuantity | SalesDocumentItem | OrderQuantity | Quantity | |
| OrderQuantityUnit | SalesDocumentItem | OrderQuantityUnit | Sales Unit | |
| ShippingPoint | SalesDocumentItem | ShippingPoint | Shipping Point | |
| DeliveryStatus | SalesDocumentItem | DeliveryStatus | Delivery Status | |
| ShipToParty | ||||
| ProductName | _Product | ProductName | Description | |
| CustomerName | _Customer | CustomerName | Name of Customer | |
| _Product | _Product | |||
| _Customer | _Customer | |||
| _SalesDocumentTypeText | _SalesDocumentTypeText |
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_SalesDocumentList.
-- 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 C_SalesDocumentList AS
SELECT
SalesDocument.SalesDocument AS SalesDocument,
SalesDocumentItem.SalesDocumentItem AS SalesDocumentItem,
SalesDocument.SDDocumentCategory AS SDDocumentCategory,
SalesDocument.SoldToParty AS SoldToParty,
SalesDocument.SalesOrganization AS SalesOrganization,
SalesDocument.DistributionChannel AS DistributionChannel,
SalesDocument.OrganizationDivision AS OrganizationDivision,
SalesDocument.SalesDocumentType AS SalesDocumentType,
SalesDocument.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
SalesDocument.CreatedByUser AS CreatedByUser,
SalesDocument.CreationDate AS CreationDate,
SalesDocument.SalesDocumentDate AS SalesDocumentDate,
SalesDocument.OverallSDProcessStatus AS OverallSDProcessStatus,
SalesDocument.OverallTotalDeliveryStatus AS OverallTotalDeliveryStatus,
SalesDocumentItem.NetAmount AS NetAmount,
SalesDocumentItem.TransactionCurrency AS TransactionCurrency,
SalesDocumentItem.PurchaseOrderByCustomer AS CustomerRefItemText,
SalesDocumentItem.SalesDocumentItemText AS SalesDocumentItemText,
SalesDocumentItem.Product AS Product,
SalesDocumentItem.Plant AS Plant,
SalesDocumentItem.OrderQuantity AS OrderQuantity,
SalesDocumentItem.OrderQuantityUnit AS OrderQuantityUnit,
SalesDocumentItem.ShippingPoint AS ShippingPoint,
SalesDocumentItem.DeliveryStatus AS DeliveryStatus,
cast ( _ShipToParty.Customer as kunwe ) AS ShipToParty,
_Product.ProductName AS ProductName,
_Customer.CustomerName AS CustomerName
FROM I_SalesDocument AS SalesDocument
LEFT OUTER JOIN I_ProductText AS _Product ON _Product.Product = Product AND _Product.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON SoldToParty = _Customer.Customer -- association [0..1]
LEFT OUTER JOIN I_SalesDocumentTypeText AS _SalesDocumentTypeText ON _SalesDocumentTypeText.SalesDocumentType = SalesDocumentType AND _SalesDocumentTypeText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_SalesDocItemCompletePartner AS _ShipToParty ON SalesDocument = _ShipToParty.SalesDocument AND SalesDocumentItem = _ShipToParty.SalesDocumentItem AND _ShipToParty.PartnerFunction = 'WE' -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA