C_SalesDocumentByObjectStatus
Sales Documents by Object Status
C_SalesDocumentByObjectStatus is a Consumption CDS View that provides data about "Sales Documents by Object Status" in SAP S/4HANA. It reads from 2 data sources (P_SalesDocumentByMultObjSts, I_SalesDocument) and exposes 34 fields with key fields SalesDocument, SalesDocumentItem. It has 15 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_SalesDocumentByMultObjSts | P_SalesDocumentByMultObjSts | inner |
| I_SalesDocument | SalesDocument | from |
Associations (15)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SalesDocumentItem | _SalesDocumentItem | $projection.SalesDocument = _SalesDocumentItem.SalesDocument and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem |
| [0..1] | C_Incompl_SalesDocCatVH | _SalesDocumentCategory | $projection.SDDocumentCategory = _SalesDocumentCategory.SDDocumentCategory |
| [0..1] | C_Incompl_SalesDocTypeVH | _SalesDocumentType | $projection.SDDocumentCategory = _SalesDocumentType.SDDocumentCategory and $projection.SalesDocumentType = _SalesDocumentType.SalesDocumentType |
| [0..1] | C_SoldToValueHelp | _SoldToParty | $projection.SoldToParty = _SoldToParty.Customer |
| [0..1] | I_MaterialStdVH | _MaterialVH | $projection.Material = _MaterialVH.Material |
| [0..1] | C_SalesDocumentUserVH | _CreatedByUser | $projection.CreatedByUser = _CreatedByUser.UserID |
| [0..1] | I_Currency | _TransactionCurrency | $projection.TransactionCurrency = _TransactionCurrency.Currency |
| [0..1] | I_SalesOrganization | _SalesOrganization | $projection.SalesOrganization = _SalesOrganization.SalesOrganization |
| [0..1] | C_Dischannelvaluehelp | _DistributionChannel | $projection.SalesOrganization = _DistributionChannel.SalesOrganization and $projection.DistributionChannel = _DistributionChannel.DistributionChannel |
| [0..1] | C_OrgDivisionValueHelp | _OrganizationDivision | $projection.SalesOrganization = _OrganizationDivision.SalesOrganization and $projection.DistributionChannel = _OrganizationDivision.DistributionChannel and $projection.OrganizationDivision = _OrganizationDivision.Division |
| [0..1] | C_SalesOfficeValueHelp | _SalesOffice | $projection.SalesOrganization = _SalesOffice.SalesOrganization and $projection.DistributionChannel = _SalesOffice.DistributionChannel and $projection.OrganizationDivision = _SalesOffice.OrganizationDivision and $projection.SalesOffice = _SalesOffice.SalesOffice |
| [0..1] | C_SalesGroupValueHelp | _SalesGroup | $projection.SalesOffice = _SalesGroup.SalesOffice and $projection.SalesGroup = _SalesGroup.SalesGroup |
| [0..1] | I_OverallSDProcessStatus | _OverallSDProcessStatus | $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus |
| [1] | E_SalesDocumentBasic | _Extension | $projection.SalesDocument = _Extension.SalesDocument |
| [1] | E_SalesDocumentItemBasic | _ItemExtension | $projection.SalesDocument = _ItemExtension.SalesDocument and $projection.SalesDocumentItem = _ItemExtension.SalesDocumentItem |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CSLSDOCBYOBJSTS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Sales Documents by Object Status | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| Search.searchable | true | view | |
| UI.headerInfo.typeName | Sales Document | view | |
| UI.headerInfo.typeNamePlural | Sales Documents | view | |
| UI.headerInfo.title.type | #STANDARD | view | |
| UI.headerInfo.title.value | SalesDocumentItem | view |
Fields (34)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | I_SalesDocument | SalesDocument | SD Document |
| KEY | SalesDocumentItem | SalesDocumentByMultObjSts | SalesDocumentItem | Sales Document Item |
| SystemStatusName | SalesDocumentByMultObjSts | SystemStatusName | ||
| UserStatusName | SalesDocumentByMultObjSts | UserStatusName | ||
| SystemStatusShortName | SalesDocumentByMultObjSts | SystemStatusShortName | ||
| UserStatusShortName | SalesDocumentByMultObjSts | UserStatusShortName | ||
| SDDocumentCategory | I_SalesDocument | SDDocumentCategory | Document Cat. | |
| SalesDocumentType | I_SalesDocument | SalesDocumentType | Sales Doc. Type | |
| SoldToParty | I_SalesDocument | SoldToParty | Sold-to Party | |
| Material | ||||
| CreatedByUser | I_SalesDocument | CreatedByUser | User Name | |
| PurchaseOrderByCustomer | I_SalesDocument | PurchaseOrderByCustomer | Purchase Order Number | |
| CreationDate | I_SalesDocument | CreationDate | Time Stamp | |
| NetAmount | ||||
| TransactionCurrency | ||||
| SalesOrganization | I_SalesDocument | SalesOrganization | Sales Organization | |
| DistributionChannel | I_SalesDocument | DistributionChannel | RefDistCh-Cust/Mat. | |
| OrganizationDivision | I_SalesDocument | OrganizationDivision | Org. Division | |
| SalesOffice | I_SalesDocument | SalesOffice | Sales Office | |
| SalesGroup | I_SalesDocument | SalesGroup | Sales Group | |
| RequestedDeliveryDate | I_SalesDocument | RequestedDeliveryDate | Requested Delivery Date | |
| OverallSDProcessStatus | I_SalesDocument | OverallSDProcessStatus | ||
| _SalesDocumentCategory | _SalesDocumentCategory | |||
| _SalesDocumentType | _SalesDocumentType | |||
| _SoldToParty | _SoldToParty | |||
| _CreatedByUser | _CreatedByUser | |||
| _TransactionCurrency | _TransactionCurrency | |||
| _OverallSDProcessStatus | _OverallSDProcessStatus | |||
| _SalesOrganization | _SalesOrganization | |||
| _DistributionChannel | _DistributionChannel | |||
| _OrganizationDivision | _OrganizationDivision | |||
| _SalesOffice | _SalesOffice | |||
| _SalesGroup | _SalesGroup | |||
| _MaterialVH | _MaterialVH |
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_SalesDocumentByObjectStatus.
-- 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: CSLSDOCBYOBJSTS
CREATE VIEW C_SalesDocumentByObjectStatus AS
SELECT
SalesDocument.SalesDocument AS SalesDocument,
SalesDocumentByMultObjSts.SalesDocumentItem AS SalesDocumentItem,
SalesDocumentByMultObjSts.SystemStatusName AS SystemStatusName,
SalesDocumentByMultObjSts.UserStatusName AS UserStatusName,
SalesDocumentByMultObjSts.SystemStatusShortName AS SystemStatusShortName,
SalesDocumentByMultObjSts.UserStatusShortName AS UserStatusShortName,
SalesDocument.SDDocumentCategory AS SDDocumentCategory,
SalesDocument.SalesDocumentType AS SalesDocumentType,
SalesDocument.SoldToParty AS SoldToParty,
cast(_SalesDocumentItem.Material as productnumber preserving type ) AS Material,
SalesDocument.CreatedByUser AS CreatedByUser,
SalesDocument.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
SalesDocument.CreationDate AS CreationDate,
cast((case when SalesDocumentByMultObjSts.SalesDocumentItem = '000000' then SalesDocument.TotalNetAmount else _SalesDocumentItem.NetAmount end) as netwr_ap preserving type) AS NetAmount,
cast((case when SalesDocumentByMultObjSts.SalesDocumentItem = '000000' then SalesDocument.TransactionCurrency else _SalesDocumentItem.TransactionCurrency end) as waerk preserving type) AS TransactionCurrency,
SalesDocument.SalesOrganization AS SalesOrganization,
SalesDocument.DistributionChannel AS DistributionChannel,
SalesDocument.OrganizationDivision AS OrganizationDivision,
SalesDocument.SalesOffice AS SalesOffice,
SalesDocument.SalesGroup AS SalesGroup,
SalesDocument.RequestedDeliveryDate AS RequestedDeliveryDate,
SalesDocument.OverallSDProcessStatus AS OverallSDProcessStatus
FROM I_SalesDocument AS SalesDocument
INNER JOIN P_SalesDocumentByMultObjSts ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesDocumentItem AS _SalesDocumentItem ON SalesDocument = _SalesDocumentItem.SalesDocument AND SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem -- association [0..1]
LEFT OUTER JOIN C_Incompl_SalesDocCatVH AS _SalesDocumentCategory ON SDDocumentCategory = _SalesDocumentCategory.SDDocumentCategory -- association [0..1]
LEFT OUTER JOIN C_Incompl_SalesDocTypeVH AS _SalesDocumentType ON SDDocumentCategory = _SalesDocumentType.SDDocumentCategory AND SalesDocumentType = _SalesDocumentType.SalesDocumentType -- association [0..1]
LEFT OUTER JOIN C_SoldToValueHelp AS _SoldToParty ON SoldToParty = _SoldToParty.Customer -- association [0..1]
LEFT OUTER JOIN I_MaterialStdVH AS _MaterialVH ON Material = _MaterialVH.Material -- association [0..1]
LEFT OUTER JOIN C_SalesDocumentUserVH AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID -- association [0..1]
LEFT OUTER JOIN I_Currency AS _TransactionCurrency ON TransactionCurrency = _TransactionCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON SalesOrganization = _SalesOrganization.SalesOrganization -- association [0..1]
LEFT OUTER JOIN C_Dischannelvaluehelp AS _DistributionChannel ON SalesOrganization = _DistributionChannel.SalesOrganization AND DistributionChannel = _DistributionChannel.DistributionChannel -- association [0..1]
LEFT OUTER JOIN C_OrgDivisionValueHelp AS _OrganizationDivision ON SalesOrganization = _OrganizationDivision.SalesOrganization AND DistributionChannel = _OrganizationDivision.DistributionChannel AND OrganizationDivision = _OrganizationDivision.Division -- association [0..1]
LEFT OUTER JOIN C_SalesOfficeValueHelp AS _SalesOffice ON SalesOrganization = _SalesOffice.SalesOrganization AND DistributionChannel = _SalesOffice.DistributionChannel AND OrganizationDivision = _SalesOffice.OrganizationDivision AND SalesOffice = _SalesOffice.SalesOffice -- association [0..1]
LEFT OUTER JOIN C_SalesGroupValueHelp AS _SalesGroup ON SalesOffice = _SalesGroup.SalesOffice AND SalesGroup = _SalesGroup.SalesGroup -- association [0..1]
LEFT OUTER JOIN I_OverallSDProcessStatus AS _OverallSDProcessStatus ON OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SalesDocument = _Extension.SalesDocument -- association [1]
LEFT OUTER JOIN E_SalesDocumentItemBasic AS _ItemExtension ON SalesDocument = _ItemExtension.SalesDocument AND SalesDocumentItem = _ItemExtension.SalesDocumentItem -- association [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