m_v_m2s_pd_hdr
View for Purchasing Document Header
m_v_m2s_pd_hdr is a CDS View that provides data about "View for Purchasing Document Header" in SAP S/4HANA. It reads from 7 data sources and exposes 31 fields.
Data Sources (7)
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | CDS_M_M2S_PD_HDR | view | |
| EndUserText.label | View for Purchasing Document Header | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| ebelnasebeln | ||||
| bstyp | ekko | bstyp | ||
| bsart | ekko | bsart | ||
| ernam | ekko | ernam | ||
| lifnr | ekko | lifnr | ||
| zterm | ekko | zterm | ||
| ekorg | ekko | ekorg | ||
| ekgrp | ekko | ekgrp | ||
| waers | ekko | waers | ||
| wkurs | ekko | wkurs | ||
| bedat | ekko | bedat | ||
| kdatb | ekko | kdatb | ||
| kdate | ekko | kdate | ||
| kufix | ekko | kufix | ||
| memory | ekko | memory | ||
| frgrl | ekko | frgrl | ||
| spras | ekko | spras | ||
| bukrs | ekko | bukrs | ||
| loekz | ekko | loekz | ||
| reswk | ekko | reswk | ||
| ktwrt | ekko | ktwrt | ||
| description | ekko | description | ||
| name1asname1 | ||||
| sortl | lfa1 | sortl | ||
| ekotxasekotx | ||||
| eknamaseknam | ||||
| butxtasbutxt | ||||
| vtextasvtext | ||||
| spras_tvzbt | tvzbt | spras | ||
| itmcnt | m_v_m2s_pd_h_c | itmcnt | ||
| agodays | m_v_m2s_pd_h_c | agodays |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'CDS_M_M2S_PD_HDR'
@EndUserText.label: 'View for Purchasing Document Header'
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.sizeCategory: #L
@AccessControl.authorizationCheck:#PRIVILEGED_ONLY
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
/***********************************************************************************************************/
/* ME2STAR: Purchasing Document Header */
/***********************************************************************************************************/
define view m_v_m2s_pd_hdr
as select from ekko as ekko
left outer join m_v_m2s_pd_h_c as h_c on ekko.ebeln = h_c.ebeln
left outer join lfa1 as lfa1 on ekko.lifnr = lfa1.lifnr
left outer join t024e as t024e on ekko.ekorg = t024e.ekorg
left outer join t024 as t024 on ekko.ekgrp = t024.ekgrp
left outer join t001 as t001 on ekko.bukrs = t001.bukrs
left outer join tvzbt as tvzbt on ekko.zterm = tvzbt.zterm
and tvzbt.spras = 'E' -- workaround: has to be removed later!!!
{
-- fields from table EKKO
key ekko.ebeln as ebeln,
ekko.bstyp as bstyp,
ekko.bsart as bsart,
ekko.ernam as ernam,
ekko.lifnr as lifnr,
ekko.zterm as zterm,
ekko.ekorg as ekorg,
ekko.ekgrp as ekgrp,
ekko.waers as waers,
ekko.wkurs as wkurs,
ekko.bedat as bedat,
ekko.kdatb as kdatb,
ekko.kdate as kdate,
ekko.kufix as kufix,
ekko.memory as memory,
ekko.frgrl as frgrl,
ekko.spras as spras,
ekko.bukrs as bukrs,
ekko.loekz as loekz,
ekko.reswk as reswk,
ekko.ktwrt as ktwrt,
ekko.description as description,
-- fields from table LFA1
lfa1.name1 as name1,
lfa1.sortl as sortl,
-- fields from table T024E
t024e.ekotx as ekotx,
-- fields from table T024
t024.eknam as eknam,
-- fields from table T001
t001.butxt as butxt,
-- fields from table TVZBT
tvzbt.vtext as vtext,
tvzbt.spras as spras_tvzbt, -- -> will be set in SADL as condition
-- calculated fields
h_c.totval as totval,
h_c.itmcnt as itmcnt,
h_c.agodays as agodays
}
where
iseopblocked = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"M_V_M2S_PD_H_C",
"EKKO",
"LFA1",
"T001",
"T024",
"T024E",
"TVZBT"
],
"ASSOCIATED":
[],
"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