P_SalesPlanItemWithDraft
P_SalesPlanItemWithDraft is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (salesplan_item, salesplan_item_d) and exposes 100 fields. It has 9 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| salesplan_item | salesplan_item | from |
| salesplan_item_d | salesplan_item_d | union_all |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SalesOrganization | _SalesOrganization | $projection.SalesOrganization = _SalesOrganization.SalesOrganization |
| [0..1] | I_DistributionChannel | _DistributionChannel | $projection.DistributionChannel = _DistributionChannel.DistributionChannel |
| [0..1] | I_Division | _Division | $projection.Division = _Division.Division |
| [0..1] | I_CustomerGroup | _CustomerGroup | $projection.CustomerGroup = _CustomerGroup.CustomerGroup |
| [0..1] | I_Customer | _Customer | $projection.Customer = _Customer.Customer |
| [0..1] | I_MaterialGroup | _MaterialGroup | $projection.MaterialGroup = _MaterialGroup.MaterialGroup |
| [0..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [0..1] | I_PersonWorkAgreement_1 | _SalesEmployee_2 | $projection.SalesEmployee = _SalesEmployee_2.PersonWorkAgreement |
| [0..1] | I_Currency | _SalesPlanCurrency | $projection.SalesPlanCurrency = _SalesPlanCurrency.Currency |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSDSPITEMWDRAFT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (100)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| SalesPlanItemUUID | salesplanitemuuid | SP Item UUID | ||
| SalesPlanUUID | salesplanuuid | Sales Plan UUID | ||
| IsActiveEntity | ||||
| SalesOrganization | salesorganization | Sales Organization | ||
| DistributionChannel | distributionchannel | RefDistCh-Cust/Mat. | ||
| OrganizationDivision | organizationdivision | Org. Division | ||
| SalesOffice | salesoffice | Sales Office | ||
| SalesGroup | salesgroup | Sales Group | ||
| SalesDistrict | salesdistrict | Sales District | ||
| CustomerGroup | customergroup | Customer Group | ||
| Customer | customer | Sold-to Party | ||
| ShipToParty | shiptoparty | Ship-To Party (obsolete) | ||
| BillToParty | billtoparty | Inv. Recipient | ||
| PayerParty | payerparty | Payer | ||
| AdditionalCustomerGroup1 | additionalcustomergroup1 | Customer Grp 1 | ||
| AdditionalCustomerGroup2 | additionalcustomergroup2 | Customer Grp 2 | ||
| AdditionalCustomerGroup3 | additionalcustomergroup3 | Customer Grp 3 | ||
| AdditionalCustomerGroup4 | additionalcustomergroup4 | Customer Grp 4 | ||
| AdditionalCustomerGroup5 | additionalcustomergroup5 | Customer Grp 5 | ||
| Division | division | Internal Division ID | ||
| Material | material | Vehicle Model | ||
| MaterialGroup | materialgroup | Product Group | ||
| AdditionalMaterialGroup1 | additionalmaterialgroup1 | MaterialGroup 1 | ||
| AdditionalMaterialGroup2 | additionalmaterialgroup2 | MaterialGroup 2 | ||
| AdditionalMaterialGroup3 | additionalmaterialgroup3 | MaterialGroup 3 | ||
| AdditionalMaterialGroup4 | additionalmaterialgroup4 | MaterialGroup 4 | ||
| AdditionalMaterialGroup5 | additionalmaterialgroup5 | MaterialGroup 5 | ||
| SalesEmployee | salesemployee | Sales Employee | ||
| Plant | plant | Valuation Area | ||
| ShippingType | shippingtype | Shipping Type | ||
| ProfitCenter | profitcenter | Profit Center | ||
| CostCenter | costcenter | Cost Center | ||
| CompanyCode | companycode | Receiver Company Code | ||
| ControllingArea | controllingarea | Controlling Area | ||
| BusinessArea | businessarea | Business Area | ||
| Country | country | Venue: Ctry/Reg | ||
| BillToPartyCountry | billtopartycountry | Dst.CtryRg.Ord. | ||
| Region | region | Venue Region | ||
| BillToPartyRegion | billtopartyregion | Region Order | ||
| SalesPlanPeriod | salesplanperiod | Sales Plan period | ||
| SalesPlanAmount | salesplanamount | Sales Plan amount | ||
| SalesPlanCurrency | salesplancurrency | Currency | ||
| _SalesOrganization | _SalesOrganization | |||
| _DistributionChannel | _DistributionChannel | |||
| _Division | _Division | |||
| _CustomerGroup | _CustomerGroup | |||
| _Customer | _Customer | |||
| _MaterialGroup | _MaterialGroup | |||
| _Material | _Material | |||
| _SalesEmployee_2 | _SalesEmployee_2 | |||
| SalesPlanUUID | salesplanuuid | Sales Plan UUID | ||
| IsActiveEntity | ||||
| SalesOrganization | salesorganization | Sales Organization | ||
| DistributionChannel | distributionchannel | RefDistCh-Cust/Mat. | ||
| OrganizationDivision | organizationdivision | Org. Division | ||
| SalesOffice | salesoffice | Sales Office | ||
| SalesGroup | salesgroup | Sales Group | ||
| SalesDistrict | salesdistrict | Sales District | ||
| CustomerGroup | customergroup | Customer Group | ||
| Customer | customer | Sold-to Party | ||
| ShipToParty | shiptoparty | Ship-To Party (obsolete) | ||
| BillToParty | billtoparty | Inv. Recipient | ||
| PayerParty | payerparty | Payer | ||
| AdditionalCustomerGroup1 | additionalcustomergroup1 | Customer Grp 1 | ||
| AdditionalCustomerGroup2 | additionalcustomergroup2 | Customer Grp 2 | ||
| AdditionalCustomerGroup3 | additionalcustomergroup3 | Customer Grp 3 | ||
| AdditionalCustomerGroup4 | additionalcustomergroup4 | Customer Grp 4 | ||
| AdditionalCustomerGroup5 | additionalcustomergroup5 | Customer Grp 5 | ||
| Division | division | Internal Division ID | ||
| Material | material | Vehicle Model | ||
| MaterialGroup | materialgroup | Product Group | ||
| AdditionalMaterialGroup1 | additionalmaterialgroup1 | MaterialGroup 1 | ||
| AdditionalMaterialGroup2 | additionalmaterialgroup2 | MaterialGroup 2 | ||
| AdditionalMaterialGroup3 | additionalmaterialgroup3 | MaterialGroup 3 | ||
| AdditionalMaterialGroup4 | additionalmaterialgroup4 | MaterialGroup 4 | ||
| AdditionalMaterialGroup5 | additionalmaterialgroup5 | MaterialGroup 5 | ||
| SalesEmployee | salesemployee | Sales Employee | ||
| Plant | plant | Valuation Area | ||
| ShippingType | shippingtype | Shipping Type | ||
| ProfitCenter | profitcenter | Profit Center | ||
| CostCenter | costcenter | Cost Center | ||
| CompanyCode | companycode | Receiver Company Code | ||
| ControllingArea | controllingarea | Controlling Area | ||
| BusinessArea | businessarea | Business Area | ||
| Country | country | Venue: Ctry/Reg | ||
| BillToPartyCountry | billtopartycountry | Dst.CtryRg.Ord. | ||
| Region | region | Venue Region | ||
| BillToPartyRegion | billtopartyregion | Region Order | ||
| SalesPlanPeriod | salesplanperiod | Sales Plan period | ||
| SalesPlanAmount | salesplanamount | Sales Plan amount | ||
| SalesPlanCurrency | salesplancurrency | Currency | ||
| _SalesOrganization | _SalesOrganization | |||
| _DistributionChannel | _DistributionChannel | |||
| _Division | _Division | |||
| _CustomerGroup | _CustomerGroup | |||
| _Customer | _Customer | |||
| _MaterialGroup | _MaterialGroup | |||
| _Material | _Material | |||
| _SalesEmployee_2 | _SalesEmployee_2 | |||
| _SalesPlanCurrency | _SalesPlanCurrency |
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_SalesPlanItemWithDraft.
-- 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: PSDSPITEMWDRAFT
CREATE VIEW P_SalesPlanItemWithDraft AS
SELECT
SalesPlanItemUUID,
SalesPlanUUID,
cast( 'X' as sdraft_is_active ) AS IsActiveEntity,
SalesOrganization,
DistributionChannel,
OrganizationDivision,
SalesOffice,
SalesGroup,
SalesDistrict,
CustomerGroup,
Customer,
ShipToParty,
BillToParty,
PayerParty,
AdditionalCustomerGroup1,
AdditionalCustomerGroup2,
AdditionalCustomerGroup3,
AdditionalCustomerGroup4,
AdditionalCustomerGroup5,
Division,
Material,
MaterialGroup,
AdditionalMaterialGroup1,
AdditionalMaterialGroup2,
AdditionalMaterialGroup3,
AdditionalMaterialGroup4,
AdditionalMaterialGroup5,
SalesEmployee,
Plant,
ShippingType,
ProfitCenter,
CostCenter,
CompanyCode,
ControllingArea,
BusinessArea,
Country,
BillToPartyCountry,
Region,
BillToPartyRegion,
SalesPlanPeriod,
SalesPlanAmount,
SalesPlanCurrency
FROM salesplan_item
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON SalesOrganization = _SalesOrganization.SalesOrganization -- association [0..1]
LEFT OUTER JOIN I_DistributionChannel AS _DistributionChannel ON DistributionChannel = _DistributionChannel.DistributionChannel -- association [0..1]
LEFT OUTER JOIN I_Division AS _Division ON Division = _Division.Division -- association [0..1]
LEFT OUTER JOIN I_CustomerGroup AS _CustomerGroup ON CustomerGroup = _CustomerGroup.CustomerGroup -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer -- association [0..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup -- association [0..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [0..1]
LEFT OUTER JOIN I_PersonWorkAgreement_1 AS _SalesEmployee_2 ON SalesEmployee = _SalesEmployee_2.PersonWorkAgreement -- association [0..1]
LEFT OUTER JOIN I_Currency AS _SalesPlanCurrency ON SalesPlanCurrency = _SalesPlanCurrency.Currency -- association [0..1]
-- UNION ALL with additional select branch(es): salesplan_item_d
;
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