P_PurOrdMaintainItemActAddr
PO Maintenance: Purchase Order Item Address (Active)
P_PurOrdMaintainItemActAddr is a Consumption CDS View that provides data about "PO Maintenance: Purchase Order Item Address (Active)" in SAP S/4HANA. It reads from 7 data sources and exposes 10 fields with key fields PurchaseOrder, PurchaseOrderItem. Part of development package ODATA_MM_PUR_PO_MAINTAIN.
Data Sources (7)
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | PPOMAINTITMACTAD | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | ekpo | ebeln | Source PurchDoc |
| KEY | PurchaseOrderItem | ekpo | ebelp | Item pur. doc. |
| PurchaseOrderItemAddressNumber | ekpo | adrnr | Sold-To Address | |
| adrnrendasManualDeliveryAddressID | ||||
| FullNameendasDeliveryAddressName | ||||
| StreetNameendasDeliveryAddressStreetName | ||||
| PostalCodeendasDeliveryAddressPostalCode | ||||
| CityNameendasDeliveryAddressCityName | ||||
| RegionendasDeliveryAddressRegion | ||||
| CountryendasDeliveryAddressCountry |
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_PurOrdMaintainItemActAddr.
-- 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: PPOMAINTITMACTAD
CREATE VIEW P_PurOrdMaintainItemActAddr AS
SELECT
item.ebeln AS PurchaseOrder,
item.ebelp AS PurchaseOrderItem,
item.adrnr AS PurchaseOrderItemAddressNumber,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant.AddressID else customer_address.AddressID end else item.adrn2 end else item.adrnr end as ManualDeliveryAddressID AS adrnrendasManualDeliveryAddressID,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant.PlantName else customer_address.FullName end else adrn2_address.FullName end else ekpo_address.FullName end as DeliveryAddressName AS FullNameendasDeliveryAddressName,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant_address.StreetName else customer_address.StreetName end else adrn2_address.StreetName end else ekpo_address.StreetName end as DeliveryAddressStreetName AS StreetNameendasDeliveryAddressStreetName,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant_address.PostalCode else customer_address.PostalCode end else adrn2_address.PostalCode end else ekpo_address.PostalCode end as DeliveryAddressPostalCode AS PostalCodeendasDeliveryAddressPostalCode,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant_address.CityName else customer_address.CityName end else adrn2_address.CityName end else ekpo_address.CityName end as DeliveryAddressCityName AS CityNameendasDeliveryAddressCityName,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant_address.Region else customer_address.Region end else adrn2_address.Region end else ekpo_address.Region end as DeliveryAddressRegion AS RegionendasDeliveryAddressRegion,
case when item.adrnr = '' or item.adrnr is null then case when item.adrn2 = '' or item.adrn2 is null then case when item.kunnr = '' or item.kunnr is null then plant_address.Country else customer_address.Country end else adrn2_address.Country end else ekpo_address.Country end as DeliveryAddressCountry AS CountryendasDeliveryAddressCountry
FROM ekpo AS item
LEFT OUTER JOIN I_Address AS ekpo_address ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Address AS adrn2_address ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Plant AS plant ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Customer AS customer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Address AS plant_address ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Address AS customer_address ON /* join condition not captured in parsed metadata */
;
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