C_SESWorkflowEmail

DDL: C_SESWORKFLOWEMAIL SQL: CSESWFEML Type: view CONSUMPTION

Email for SES Wfl Approval or Rejection

C_SESWorkflowEmail (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Sourcing & Procurement

C_SESWorkflowEmail is a Consumption CDS View that provides data about "Email for SES Wfl Approval or Rejection" in SAP S/4HANA. It reads from 5 data sources (I_ServiceEntrySheetBasic, I_WorkflowTask, I_WorkflowTaskApplObject, P_PurchasingLastWorkflowStep, I_WorkflowTask) and exposes 14 fields with key field WorkflowTaskInternalID. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Operational Procurement
Purpose
This CDS view is used as a data source to create email templates to communicate approval results in your service entry sheets workflow scenarios. It contains data related to the service entry sheet header data and the approval status. This CDS view provides the data to answer the following business questions: Has the service entry sheet been approved or rejected? What is the total net amount of the service entry sheet? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations The following business catalog needs to be assigned to a user to be able to use this CDS view: SAP_BR_PURCHASING_MANAGER Users who want to use this CDS view must have the following authorization objects assigned: M_SES_EKO (Purchasing Organization in Service Entry Sheet) M_SES_EKG (Purchasing Group)

Structure
Business Objects This view is built on the following business object: Service Entry Sheet (Lean Services) Important Fields Important fields in this view include the following: Field Name Description ServiceEntrySheet ID of the service entry sheet ServiceEntrySheetName Name of the service entry sheet

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-SVC-SES
CapabilitiesOutput: Email Data Provider
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view is used as a data source to create email templates to communicate approval results in your service entry sheets workflow scenarios. It contains data related to the service entry sheet header data and the approval status.</p> This CDS view provides the data to answer the following business questions:<ul> <li><p>Has the service entry sheet been approved or rejected?</p></li> <li><p>What is the total net amount of the service entry sheet?</p></li> </ul> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (5)

SourceAliasJoin Type
I_ServiceEntrySheetBasic _SES inner
I_WorkflowTask _WorkflowTask from
I_WorkflowTaskApplObject _WorkflowTaskApplObject inner
P_PurchasingLastWorkflowStep _WorkitemData inner
I_WorkflowTask _WorkitemDet inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_ServiceEntrySheetBasic _ServiceEntrySheet _ServiceEntrySheet.ServiceEntrySheet = _WorkflowTaskApplObject.SAPBusinessObjectNodeKey1 and _WorkflowTaskApplObject.WorkflowTaskInternalID is not null
[0..1] I_SrvcEntrShtItmTotNetAmt _Document _Document.ServiceEntrySheet = _WorkflowTaskApplObject.SAPBusinessObjectNodeKey1 and _WorkflowTaskApplObject.WorkflowTaskInternalID is not null

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CSESWFEML view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.supportedCapabilities #OUTPUT_EMAIL_DATA_PROVIDER view
ObjectModel.modelingPattern #OUTPUT_EMAIL_DATA_PROVIDER view
EndUserText.label Email for SES Wfl Approval or Rejection view
Metadata.ignorePropagatedAnnotations true view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY WorkflowTaskInternalID I_WorkflowTask WorkflowTaskInternalID Work Item ID
WorkflowTaskResultReasonText Flexible Workflow: Decision Reason Text
WorkflowTaskResultComment _WorkflowTaskResultComment WorkflowTaskResultComment
ServiceEntrySheet _ServiceEntrySheet ServiceEntrySheet Service Entry Sheet
ServiceEntrySheetName _ServiceEntrySheet ServiceEntrySheetName Name of Service Entry Sheet
PurchasingOrganization _ServiceEntrySheet PurchasingOrganization Purchasing Organization
PurchasingGroup _ServiceEntrySheet PurchasingGroup Purchasing Group
Supplier _ServiceEntrySheet Supplier Account Number of Supplier
PurchaseOrder _ServiceEntrySheet PurchaseOrder Reference Purchase Order
Currency _ServiceEntrySheet Currency Valuation Crcy
TotalNetAmount _Document TotalNetAmount Total Net Amount
ApprovalStatus _ServiceEntrySheet ApprovalStatus Document Status for Service Entry Sheet
ApprovedByUserFullName Created by User Fullname
CreatedByUserName Created by User Fullname

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 C_SESWorkflowEmail.
-- 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: CSESWFEML

CREATE VIEW C_SESWorkflowEmail AS
SELECT
  _WorkflowTask.WorkflowTaskInternalID AS WorkflowTaskInternalID,
  _WorkflowTask._WorkflowTaskResult._WorkflowTaskResultReason._WorkflowTaskResultReasonText[1:Language=$session.system_language].WorkflowTaskResultReasonText AS WorkflowTaskResultReasonText,
  _WorkflowTaskResultComment.WorkflowTaskResultComment AS WorkflowTaskResultComment,
  _ServiceEntrySheet.ServiceEntrySheet AS ServiceEntrySheet,
  _ServiceEntrySheet.ServiceEntrySheetName AS ServiceEntrySheetName,
  _ServiceEntrySheet.PurchasingOrganization AS PurchasingOrganization,
  _ServiceEntrySheet.PurchasingGroup AS PurchasingGroup,
  _ServiceEntrySheet.Supplier AS Supplier,
  _ServiceEntrySheet.PurchaseOrder AS PurchaseOrder,
  _ServiceEntrySheet.Currency AS Currency,
  _Document.TotalNetAmount AS TotalNetAmount,
  _ServiceEntrySheet.ApprovalStatus AS ApprovalStatus,
  cast(_ApproverUser.UserDescription as mm_oa_user_fullname ) AS ApprovedByUserFullName,
  cast(_SESCreatorUser.UserDescription as mm_oa_user_fullname ) AS CreatedByUserName
FROM I_WorkflowTask AS _WorkflowTask
INNER JOIN I_WorkflowTaskApplObject AS _WorkflowTaskApplObject ON /* join condition not captured in parsed metadata */
INNER JOIN P_PurchasingLastWorkflowStep AS _WorkitemData ON /* join condition not captured in parsed metadata */
INNER JOIN I_WorkflowTask AS _WorkitemDet ON /* join condition not captured in parsed metadata */
INNER JOIN I_ServiceEntrySheetBasic AS _SES ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ServiceEntrySheetBasic AS _ServiceEntrySheet ON _ServiceEntrySheet.ServiceEntrySheet = _WorkflowTaskApplObject.SAPBusinessObjectNodeKey1 AND _WorkflowTaskApplObject.WorkflowTaskInternalID is not null  -- association [0..1]
LEFT OUTER JOIN I_SrvcEntrShtItmTotNetAmt AS _Document ON _Document.ServiceEntrySheet = _WorkflowTaskApplObject.SAPBusinessObjectNodeKey1 AND _WorkflowTaskApplObject.WorkflowTaskInternalID is not null  -- association [0..1]
;