P_SubcontractingHierarchyNode
Subcontracting Document Hierarchy Node
P_SubcontractingHierarchyNode is a Composite CDS View that provides data about "Subcontracting Document Hierarchy Node" in SAP S/4HANA. It has 9 associations to related views. Part of development package ODATA_MM_PUR_SUBCONTRG_COCKPIT.
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_ReqdDelivDteRngeFrmDte | vdm_shippingdate | |
| P_ReqdDelivDteRngeToDte | vdm_shippingdate |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurgDocTypeShipgData | _PurgDocTypeShipgData | $projection.Plant = _PurgDocTypeShipgData.SupplyingPlant |
| [0..1] | I_Plant | _SupplyingPlantVH | $projection.SupplyingPlant = _SupplyingPlantVH.Plant |
| [0..1] | I_ProcmtDocType | _PurchasingDocTypeVH | $projection.PurchasingDocumentType = _PurchasingDocTypeVH.PurchasingDocumentType |
| [0..1] | I_ProposedShipgPointPerPlnt | _ProposedShipgPointsPerPlnt | $projection.Plant = _ProposedShipgPointsPerPlnt.Plant and _ProposedShipgPointsPerPlnt.StorageLocation = ' ' and $projection.LoadingGroup = _ProposedShipgPointsPerPlnt.LoadingGroup and $projection.ShippingCondition = _ProposedShipgPointsPerPlnt.ShippingCondition |
| [0..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [1..1] | I_SupplierCompanyByPlant | _SupplierCompanyByPlant | $projection.Supplier = _SupplierCompanyByPlant.Supplier and $projection.Plant = _SupplierCompanyByPlant.Plant |
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [0..1] | I_Productplantsales | _ProductPlantSales | $projection.Material = _ProductPlantSales.Product and $projection.Plant = _ProductPlantSales.Plant |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (67)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | MaterialComponent | ||
| KEY | Plant | Plant | Valuation Area | |
| KEY | Supplier | Subcontractor | Supplier | |
| KEY | Reservation | Reservation | Reservation | |
| KEY | ReservationItem | ReservationItem | Reservation Item | |
| KEY | RequirementType | RequirementType | RequirementType | |
| SuplrMatlPlnt | SuplrMatlPlnt | |||
| ScheduleLine | ScheduleLine | Schedule Line | ||
| MasterDataNode | MasterDataNode | |||
| ParentNode | ParentNode | Parent Node | ||
| HierarchyNodeLevel | HierarchyNodeLevel | Hierarchy Node Level | ||
| HierarchyDrillState | HierarchyDrillState | Drill State | ||
| PurchasingDocument | PurchaseOrder | Purchasing Document | ||
| PurchasingDocumentItem | PurchaseOrderItem | Purchasing Document Item | ||
| FormattedPurchaseOrderItem | ||||
| RequestedDeliveryDate | ShipmentCompletionDate | |||
| PlantCurrentDate | ||||
| Assembly | Assembly | Pegged Reqmt | ||
| ScheduleLineDeliveryDate | ScheduleLineDeliveryDate | Delivery Date | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| Batch | Batch | Lot No. | ||
| SupplyingPlant | SupplyingPlant | Supplying Plant | ||
| DistributionChannel | _Plant | DistributionChannel | RefDistCh-Cust/Mat. | |
| SalesOrganization | _Plant | SalesOrganization | Sales Organization | |
| Division | _Plant | Division | Internal Division ID | |
| MaterialGroupelseendasMaterialGroup | ||||
| StorageLocation | StorageLocation | StorageLocation | ||
| StillToBeDeliveredQuantity | StillToBeDeliveredQuantity | |||
| PurchaseOrderQuantityUnit | OrderQuantityUnit | Sales Unit | ||
| StockBalanceQuantityUnit | ||||
| StockUnit | ||||
| MaterialComponentName | ||||
| PlantName | _Plant | PlantName | Plant Name | |
| SupplierName | _Supplier | SupplierName | Supplier Name | |
| AssemblyName | AssemblyName | |||
| MaterialGroupName | ||||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| StorageLocationName | StorageLocationName | Storage Loc. Name | ||
| SupplyingPlantName | _SupplyingPlantVH | PlantName | Plant Name | |
| PurchasingGroupName | PurchasingGroupName | Purchasing Grp. Name | ||
| PurchasingOrganizationName | PurchasingOrganizationName | Purch. Org. Name | ||
| ShippingCondition | ShippingCondition | Shipping Conditions | ||
| DeliveryTypeelseendasDeliveryType | ||||
| LoadingGroupelseendasLoadingGroup | ||||
| NumberOfItems | NumberOfItems | |||
| PurchasingDocumentType | PurchasingDocumentType | RFQ Type | ||
| PurchasingDocumentTypeName | ||||
| GoodsMovementType | GoodsMovementType | Movement Type | ||
| RequiredQuantity | RequiredQuantity | Requirement qty | ||
| BaseUnit | BaseUnit | Unit of Measure | ||
| SpecialStockIdfgWBSElement | SpecialStockIdfgWBSElement | WBS Internal ID | ||
| InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | ||
| WBSDescription | WBSDescription | WBS Element Name | ||
| InventorySpecialStockTypeName | InventorySpecialStockTypeName | |||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | SalesOrderItem | Sales Order Item | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| AuthorizationGroup | _Supplier | AuthorizationGroup | AuthorizGroup | |
| SupplierAccountGroup | _Supplier | SupplierAccountGroup | Account group | |
| Customer | _Supplier | Customer | Sold-to Party | |
| _SupplierCompanyByPlant | _SupplierCompanyByPlant | |||
| _Supplier | _Supplier | |||
| _ProposedShipgPointsPerPlnt | _ProposedShipgPointsPerPlnt | |||
| _Plant | _Plant | |||
| _Material | _Material | |||
| PurchasingDocumentCategory | PurchasingDocumentCategory | Doc. Category |
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_SubcontractingHierarchyNode.
-- 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.
-- Parameters: P_ReqdDelivDteRngeFrmDte : vdm_shippingdate, P_ReqdDelivDteRngeToDte : vdm_shippingdate
CREATE VIEW P_SubcontractingHierarchyNode AS
SELECT
MaterialComponent AS Material,
Plant,
Subcontractor AS Supplier,
Reservation,
ReservationItem,
RequirementType,
SuplrMatlPlnt,
ScheduleLine,
MasterDataNode,
ParentNode,
HierarchyNodeLevel,
HierarchyDrillState,
PurchaseOrder AS PurchasingDocument,
PurchaseOrderItem AS PurchasingDocumentItem,
cast( FormattedPurchaseOrderItem as vdm_formattedpurchaseorditm preserving type ) AS FormattedPurchaseOrderItem,
ShipmentCompletionDate AS RequestedDeliveryDate,
$session.system_date AS PlantCurrentDate,
Assembly,
ScheduleLineDeliveryDate,
PurchasingGroup,
PurchasingOrganization,
Batch,
SupplyingPlant,
_Plant.DistributionChannel AS DistributionChannel,
_Plant.SalesOrganization AS SalesOrganization,
_Plant.Division AS Division,
case when _Material.MaterialGroup is not null then _Material.MaterialGroup else '' end as MaterialGroup AS MaterialGroupelseendasMaterialGroup,
StorageLocation,
StillToBeDeliveredQuantity,
OrderQuantityUnit AS PurchaseOrderQuantityUnit,
cast ( ' ' as abap.char(50) ) AS StockBalanceQuantityUnit,
cast (' ' as abap.char(50) ) AS StockUnit,
_Material._Text[1: Language = $session.system_language].MaterialName AS MaterialComponentName,
_Plant.PlantName AS PlantName,
_Supplier.SupplierName AS SupplierName,
AssemblyName,
_Material._MaterialGroup._Text[1: Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
DebitCreditCode,
StorageLocationName,
_SupplyingPlantVH.PlantName AS SupplyingPlantName,
PurchasingGroupName,
PurchasingOrganizationName,
ShippingCondition,
case when _PurgDocTypeShipgData.DeliveryType is not null then _PurgDocTypeShipgData.DeliveryType else '' end as DeliveryType AS DeliveryTypeelseendasDeliveryType,
case when _ProductPlantSales.LoadingGroup is not null then _ProductPlantSales.LoadingGroup else '' end as LoadingGroup AS LoadingGroupelseendasLoadingGroup,
NumberOfItems,
PurchasingDocumentType,
_PurchasingDocTypeVH._Text[1: Language = $session.system_language].PurchasingDocumentTypeName AS PurchasingDocumentTypeName,
GoodsMovementType,
RequiredQuantity,
BaseUnit,
SpecialStockIdfgWBSElement,
InventorySpecialStockType,
WBSDescription,
InventorySpecialStockTypeName,
SalesOrder,
SalesOrderItem,
CompanyCode,
_Supplier.AuthorizationGroup AS AuthorizationGroup,
_Supplier.SupplierAccountGroup AS SupplierAccountGroup,
_Supplier.Customer AS Customer,
PurchasingDocumentCategory
LEFT OUTER JOIN I_PurgDocTypeShipgData AS _PurgDocTypeShipgData ON Plant = _PurgDocTypeShipgData.SupplyingPlant -- association [0..1]
LEFT OUTER JOIN I_Plant AS _SupplyingPlantVH ON SupplyingPlant = _SupplyingPlantVH.Plant -- association [0..1]
LEFT OUTER JOIN I_ProcmtDocType AS _PurchasingDocTypeVH ON PurchasingDocumentType = _PurchasingDocTypeVH.PurchasingDocumentType -- association [0..1]
LEFT OUTER JOIN I_ProposedShipgPointPerPlnt AS _ProposedShipgPointsPerPlnt ON Plant = _ProposedShipgPointsPerPlnt.Plant AND _ProposedShipgPointsPerPlnt.StorageLocation = ' ' AND LoadingGroup = _ProposedShipgPointsPerPlnt.LoadingGroup AND ShippingCondition = _ProposedShipgPointsPerPlnt.ShippingCondition -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [0..1]
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SupplierCompanyByPlant ON Supplier = _SupplierCompanyByPlant.Supplier AND Plant = _SupplierCompanyByPlant.Plant -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [0..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [0..1]
LEFT OUTER JOIN I_Productplantsales AS _ProductPlantSales ON Material = _ProductPlantSales.Product AND Plant = _ProductPlantSales.Plant -- 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