P_PurOrdMaintainHeaderDraft
P_PurOrdMaintainHeaderDraft is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (ekko_po_d) and exposes 41 fields with key field PurchaseOrderHeaderDraftUUID. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| ekko_po_d | ekkod | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_PurOrdMaintDraftAdminData | _DraftAdministrativeData | ekkod.db_key = _DraftAdministrativeData.DraftID and _DraftAdministrativeData.EntityName = 'MM_PO_DRAFT' |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AbapCatalog.sqlViewName | PPOMAINTHDRDRAFT | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view |
Fields (41)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrderHeaderDraftUUID | guid | UUID 22 char. | |
| PurchaseOrder | ekko_po_d | ebeln | Source PurchDoc | |
| PurchasingDocumentCategory | ||||
| PurchasingDocumentType | ekko_po_d | bsart | Stnd purch.ord. | |
| CompanyCode | ekko_po_d | bukrs | Value | |
| PurchasingOrganization | ekko_po_d | ekorg | Purchasing Org. | |
| PurchasingGroup | ekko_po_d | ekgrp | Sub. purchasing grp | |
| Supplier | ekko_po_d | lifnr | Vendor no. | |
| Currency | ekko_po_d | waers | Transaction Currency | |
| PaymentTerms | ekko_po_d | zterm | Terms of Payment | |
| CashDiscount1Days | ekko_po_d | zbd1t | Payment in | |
| CashDiscount2Days | ekko_po_d | zbd2t | Payment in | |
| NetPaymentDays | ekko_po_d | zbd3t | Payment in | |
| CashDiscount1Percent | ekko_po_d | zbd1p | Max. Cash Dis. (%) | |
| CashDiscount2Percent | ekko_po_d | zbd2p | Nrm. Cash Dis. (%) | |
| ExchangeRate | ||||
| IncotermsClassification | ekko_po_d | inco1 | Incoterms | |
| IncotermsTransferLocation | ekko_po_d | inco2 | Incoterms 2 | |
| IncotermsVersion | ekko_po_d | incov | Inco. Version | |
| IncotermsLocation1 | ekko_po_d | inco2_l | Inco. Location1 | |
| IncotermsLocation2 | ekko_po_d | inco3_l | Inco. Location2 | |
| CreatedByUser | ekko_po_d | crea_uname | User Name | |
| PurchaseOrderDate | ekko_po_d | bedat | Start date | |
| LastChangeDateTime | ekko_po_d | lchg_date_time | Time Stamp | |
| LastChangeUser | ekko_po_d | lchg_uname | User Name | |
| InvoicingParty | ekko_po_d | lifre | Location Alias | |
| ReleaseIsNotCompleted | ||||
| IsHeld | ekko_po_d | memory | Incomplete | |
| PurchasingDocumentCondition | ekko_po_d | knumv | Doc. Condition | |
| PricingProcedure | ekko_po_d | kalsm | Search Proced. | |
| AddressID | ekko_po_d | adrnr | Sold-To Address | |
| AddressName | ekko_po_d | ad_name1 | Name | |
| AddressStreetName | ekko_po_d | ad_street | Street | |
| AddressHouseNumber | ekko_po_d | ad_hsnm1 | House Number | |
| AddressPostalCode | ekko_po_d | ad_pstcd1 | Postal Code | |
| AddressCityName | ekko_po_d | ad_city1 | City | |
| AddressPhoneNumber | ekko_po_d | ad_tlnmbr1 | Telephone | |
| AddressFaxNumber | ekko_po_d | ad_fxnmbr1 | Fax | |
| AddressRegion | ekko_po_d | regio | Resident Region | |
| AddressCountry | ekko_po_d | land1 | Trip Ctry/Reg | |
| AddressCorrespondenceLanguage | ekko_po_d | langu | Primary lang. |
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 P_PurOrdMaintainHeaderDraft.
-- 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: PPOMAINTHDRDRAFT
CREATE VIEW P_PurOrdMaintainHeaderDraft AS
SELECT
guid AS PurchaseOrderHeaderDraftUUID,
ekkod.ebeln AS PurchaseOrder,
cast('F' as abap.char(1)) AS PurchasingDocumentCategory,
ekkod.bsart AS PurchasingDocumentType,
ekkod.bukrs AS CompanyCode,
ekkod.ekorg AS PurchasingOrganization,
ekkod.ekgrp AS PurchasingGroup,
ekkod.lifnr AS Supplier,
ekkod.waers AS Currency,
ekkod.zterm AS PaymentTerms,
ekkod.zbd1t AS CashDiscount1Days,
ekkod.zbd2t AS CashDiscount2Days,
ekkod.zbd3t AS NetPaymentDays,
ekkod.zbd1p AS CashDiscount1Percent,
ekkod.zbd2p AS CashDiscount2Percent,
cast(ekkod.wkurs as abap.dec(19,5)) AS ExchangeRate,
ekkod.inco1 AS IncotermsClassification,
ekkod.inco2 AS IncotermsTransferLocation,
ekkod.incov AS IncotermsVersion,
ekkod.inco2_l AS IncotermsLocation1,
ekkod.inco3_l AS IncotermsLocation2,
ekkod.crea_uname AS CreatedByUser,
ekkod.bedat AS PurchaseOrderDate,
ekkod.lchg_date_time AS LastChangeDateTime,
ekkod.lchg_uname AS LastChangeUser,
ekkod.lifre AS InvoicingParty,
cast('' as abap.char(1)) AS ReleaseIsNotCompleted,
ekkod.memory AS IsHeld,
ekkod.knumv AS PurchasingDocumentCondition,
ekkod.kalsm AS PricingProcedure,
ekkod.adrnr AS AddressID,
ekkod.ad_name1 AS AddressName,
ekkod.ad_street AS AddressStreetName,
ekkod.ad_hsnm1 AS AddressHouseNumber,
ekkod.ad_pstcd1 AS AddressPostalCode,
ekkod.ad_city1 AS AddressCityName,
ekkod.ad_tlnmbr1 AS AddressPhoneNumber,
ekkod.ad_fxnmbr1 AS AddressFaxNumber,
ekkod.regio AS AddressRegion,
ekkod.land1 AS AddressCountry,
ekkod.langu AS AddressCorrespondenceLanguage
FROM ekko_po_d AS ekkod
LEFT OUTER JOIN P_PurOrdMaintDraftAdminData AS _DraftAdministrativeData ON ekkod.db_key = _DraftAdministrativeData.DraftID AND _DraftAdministrativeData.EntityName = 'MM_PO_DRAFT' -- 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