P_VarConfignSalesDocumentItem
P_VarConfignSalesDocumentItem is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (vbap) and exposes 11 fields with key fields SalesDocument, SalesDocumentItem. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| vbap | SalesDocumentItem | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | P_VarConfignSalesDocument | _SalesDocument | SalesDocumentItem.vbeln = _SalesDocument.SalesDocument |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PAVCSALESDOCITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | vbap | vbeln | |
| KEY | SalesDocumentItem | vbap | posnr | |
| SDDocumentCategory | _SalesDocument | SDDocumentCategory | ||
| Product | vbap | matnr | ||
| Plant | vbap | werks | ||
| CreatedByUser | vbap | ernam | ||
| CreationDate | vbap | erdat | ||
| aedatendasLastChangeDate | ||||
| LastChangedByUserendasLastChangedByUser | ||||
| ProductConfiguration | vbap | cuobj | ||
| OrderQuantity | vbap | kwmeng |
@AbapCatalog.sqlViewName: 'PAVCSALESDOCITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #BASIC
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_VarConfignSalesDocumentItem
as select from vbap as SalesDocumentItem
association [1..1] to P_VarConfignSalesDocument as _SalesDocument on SalesDocumentItem.vbeln = _SalesDocument.SalesDocument
{
key SalesDocumentItem.vbeln as SalesDocument,
key SalesDocumentItem.posnr as SalesDocumentItem,
_SalesDocument.SDDocumentCategory as SDDocumentCategory,
SalesDocumentItem.matnr as Product,
SalesDocumentItem.werks as Plant,
SalesDocumentItem.ernam as CreatedByUser,
SalesDocumentItem.erdat as CreationDate,
case
when SalesDocumentItem.aedat = '00000000'
or SalesDocumentItem.aedat is null
then SalesDocumentItem.erdat
else SalesDocumentItem.aedat
end as LastChangeDate,
case
when SalesDocumentItem.aedat = '00000000'
or SalesDocumentItem.aedat is null
then SalesDocumentItem.ernam
else _SalesDocument.LastChangedByUser
end as LastChangedByUser,
SalesDocumentItem.cuobj as ProductConfiguration,
SalesDocumentItem.kwmeng as OrderQuantity
}
where
//Only configured Sales Document Items are relevant
cuobj != '000000000000000000'
and
//inidicator whether the item is directly configurable
//if it belongs to another item then it is configured through it
uepos is initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_VARCONFIGNSALESDOCUMENT",
"VBAP"
],
"ASSOCIATED":
[
"P_VARCONFIGNSALESDOCUMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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