SEPM_I_SalesOrder

DDL: SEPM_I_SALESORDER SQL: SEPM_ISO Type: view Package: S_EPM_CDS_REF

EPM Demo: Sales Order

SEPM_I_SalesOrder is a CDS View of category Dimension that provides data about "EPM Demo: Sales Order" in SAP S/4HANA. It reads from 1 data source (snwd_so) and exposes 40 fields with key field SalesOrderUUID. It has 17 associations to related views. Part of development package S_EPM_CDS_REF.

Data Sources (1)

SourceAliasJoin Type
snwd_so snwd_so from

Associations (17)

CardinalityTargetAliasCondition
[0..1] SEPM_I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency
[0..1] SEPM_I_ShortTextGroup _ShortTextGroup $projection.ShortTextGroupUUID = _ShortTextGroup.ShortTextGroupUUID
[0..1] SEPM_I_BusinessPartner _Customer $projection.CustomerUUID = _Customer.BusinessPartnerUUID
[0..1] SEPM_I_CUSTOMER _CustomerV2 $projection.CustomerUUID = _CustomerV2.CustomerUUID
[0..1] SEPM_I_SlsOrdLifeCycleStatus _LifeCycleStatus $projection.SalesOrderLifeCycleStatus = _LifeCycleStatus.SalesOrderLifeCycleStatus
[0..1] SEPM_I_SalesOrderBillingStatus _BillingStatus $projection.SalesOrderBillingStatus = _BillingStatus.SalesOrderBillingStatus
[0..1] SEPM_I_SlsOrdDeliveryStatus _DeliveryStatus $projection.SalesOrderDeliveryStatus = _DeliveryStatus.SalesOrderDeliveryStatus
[0..1] Sepm_I_SalesOrdOverallStatus _OverallStatus $projection.SalesOrderOverallStatus = _OverallStatus.SalesOrderOverallStatus
[0..1] Sepm_I_SlsordPaymentMethod _PaymentMethod $projection.SalesOrderPaymentMethod = _PaymentMethod.SalesOrderPaymentMethod
[0..1] Sepm_I_SlsordPaymentTerms _PaymentTerms $projection.SalesOrderPaymentTerms = _PaymentTerms.SalesOrderPaymentTerms
[0..*] SEPM_I_SalesOrderItem _Item $projection.SalesOrderUUID = _Item.SalesOrderUUID
[0..1] SEPM_I_Employee _CreatedByUser $projection.CreatedByUser = _CreatedByUser.EmployeeUUID
[0..1] SEPM_I_Employee _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.EmployeeUUID
[1..1] SEPM_E_SalesOrder _Extension snwd_so.node_key = _Extension.SalesOrderUUID
[0..1] SEPM_I_ContactPerson _CustomerContact $projection.CustomerContactUUID = _CustomerContact.ContactPersonUUID
[0..1] SEPM_I_PartyAddress _ShipToPartyAddress $projection.ShipToPartyAddressUUID = _ShipToPartyAddress.PartyAddressUUID
[0..1] SEPM_I_PartyAddress _BillToPartyAddress $projection.BillToPartyAddressUUID = _BillToPartyAddress.PartyAddressUUID

Annotations (10)

NameValueLevelField
EndUserText.label EPM Demo: Sales Order view
ObjectModel.compositionRoot true view
Analytics.dataCategory #DIMENSION view
Analytics.dataExtraction.enabled true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName SEPM_ISO view
ObjectModel.representativeKey SalesOrderUUID view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY SalesOrderUUID Tree Model: Node Key
SalesOrder so_id Sales Order ID
CreatedByUser created_by Version Created By
CreationDateTime created_at Uploaded On
LastChangedByUser changed_by User Name
LastChangedDateTime changed_at Timestamp
IsCreatedByBusinessPartner created_by_bp Value
IsLastChangedByBusinessPartner changed_by_bp Value
ShortTextGroupUUID note_guid Node Key
CustomerUUID buyer_guid Node Key
TransactionCurrency currency_code Currency Code
GrossAmountInTransacCurrency gross_amount Tax-Inclusive Amount
NetAmountInTransactionCurrency net_amount Tax-Exclusive Amount
TaxAmountInTransactionCurrency tax_amount VAT Amount Type
SalesOrderLifeCycleStatus lifecycle_status Status
SalesOrderBillingStatus billing_status SO Confirmation
SalesOrderDeliveryStatus delivery_status SO Ordering
SalesOrderOverallStatus overall_status Overall Sts
Opportunity op_id Opportunity ID
CustomerContactUUID buy_contact_guid Node Key
ShipToPartyAddressUUID ship_to_adr_guid Node Key
BillToPartyAddressUUID bill_to_adr_guid Node Key
SalesOrderPaymentMethod payment_method Pymt Meth.
SalesOrderPaymentTerms payment_terms Terms of Paymnt
_TransactionCurrency _TransactionCurrency
_Item _Item
_Customer _Customer
_CustomerV2 _CustomerV2
_ShortTextGroup _ShortTextGroup
_DeliveryStatus _DeliveryStatus
_BillingStatus _BillingStatus
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_LifeCycleStatus _LifeCycleStatus
_OverallStatus _OverallStatus
_CustomerContact _CustomerContact
_ShipToPartyAddress _ShipToPartyAddress
_BillToPartyAddress _BillToPartyAddress
_PaymentMethod _PaymentMethod
_PaymentTerms _PaymentTerms

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 SEPM_I_SalesOrder.
-- 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: SEPM_ISO

CREATE VIEW SEPM_I_SalesOrder AS
SELECT
  cast ( node_key as sepm_so_uuid preserving type ) AS SalesOrderUUID,
  so_id AS SalesOrder,
  created_by AS CreatedByUser,
  created_at AS CreationDateTime,
  changed_by AS LastChangedByUser,
  changed_at AS LastChangedDateTime,
  created_by_bp AS IsCreatedByBusinessPartner,
  changed_by_bp AS IsLastChangedByBusinessPartner,
  note_guid AS ShortTextGroupUUID,
  buyer_guid AS CustomerUUID,
  currency_code AS TransactionCurrency,
  gross_amount AS GrossAmountInTransacCurrency,
  net_amount AS NetAmountInTransactionCurrency,
  tax_amount AS TaxAmountInTransactionCurrency,
  lifecycle_status AS SalesOrderLifeCycleStatus,
  billing_status AS SalesOrderBillingStatus,
  delivery_status AS SalesOrderDeliveryStatus,
  overall_status AS SalesOrderOverallStatus,
  op_id AS Opportunity,
  buy_contact_guid AS CustomerContactUUID,
  ship_to_adr_guid AS ShipToPartyAddressUUID,
  bill_to_adr_guid AS BillToPartyAddressUUID,
  payment_method AS SalesOrderPaymentMethod,
  payment_terms AS SalesOrderPaymentTerms
FROM snwd_so
LEFT OUTER JOIN SEPM_I_Currency AS _TransactionCurrency ON TransactionCurrency = _TransactionCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN SEPM_I_ShortTextGroup AS _ShortTextGroup ON ShortTextGroupUUID = _ShortTextGroup.ShortTextGroupUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_BusinessPartner AS _Customer ON CustomerUUID = _Customer.BusinessPartnerUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_CUSTOMER AS _CustomerV2 ON CustomerUUID = _CustomerV2.CustomerUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_SlsOrdLifeCycleStatus AS _LifeCycleStatus ON SalesOrderLifeCycleStatus = _LifeCycleStatus.SalesOrderLifeCycleStatus  -- association [0..1]
LEFT OUTER JOIN SEPM_I_SalesOrderBillingStatus AS _BillingStatus ON SalesOrderBillingStatus = _BillingStatus.SalesOrderBillingStatus  -- association [0..1]
LEFT OUTER JOIN SEPM_I_SlsOrdDeliveryStatus AS _DeliveryStatus ON SalesOrderDeliveryStatus = _DeliveryStatus.SalesOrderDeliveryStatus  -- association [0..1]
LEFT OUTER JOIN Sepm_I_SalesOrdOverallStatus AS _OverallStatus ON SalesOrderOverallStatus = _OverallStatus.SalesOrderOverallStatus  -- association [0..1]
LEFT OUTER JOIN Sepm_I_SlsordPaymentMethod AS _PaymentMethod ON SalesOrderPaymentMethod = _PaymentMethod.SalesOrderPaymentMethod  -- association [0..1]
LEFT OUTER JOIN Sepm_I_SlsordPaymentTerms AS _PaymentTerms ON SalesOrderPaymentTerms = _PaymentTerms.SalesOrderPaymentTerms  -- association [0..1]
LEFT OUTER JOIN SEPM_I_SalesOrderItem AS _Item ON SalesOrderUUID = _Item.SalesOrderUUID  -- association [0..*]
LEFT OUTER JOIN SEPM_I_Employee AS _CreatedByUser ON CreatedByUser = _CreatedByUser.EmployeeUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_Employee AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.EmployeeUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_E_SalesOrder AS _Extension ON snwd_so.node_key = _Extension.SalesOrderUUID  -- association [1..1]
LEFT OUTER JOIN SEPM_I_ContactPerson AS _CustomerContact ON CustomerContactUUID = _CustomerContact.ContactPersonUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_PartyAddress AS _ShipToPartyAddress ON ShipToPartyAddressUUID = _ShipToPartyAddress.PartyAddressUUID  -- association [0..1]
LEFT OUTER JOIN SEPM_I_PartyAddress AS _BillToPartyAddress ON BillToPartyAddressUUID = _BillToPartyAddress.PartyAddressUUID  -- association [0..1]
;