C_SuplrInvcWrkflwEmlDcsnRsn

DDL: C_SUPLRINVCWRKFLWEMLDCSNRSN SQL: CSIWFEMLDCRSN Type: view CONSUMPTION

Approve or Reject Email for Invoice

C_SuplrInvcWrkflwEmlDcsnRsn (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_SuplrInvcWrkflwEmlDcsnRsn is a Consumption CDS View that provides data about "Approve or Reject Email for Invoice" in SAP S/4HANA. It reads from 4 data sources (I_WorkflowTask, I_WorkflowTaskApplObject, P_PurchasingLastWorkflowStep, I_WorkflowTask) and exposes 24 fields with key field WorkflowTaskInternalID.

SAP Help Documentation

CategoryCDS Views for Invoice Processing
Data CategoryN/A
Purpose
This CDS view is used as a data source to create email templates for approval or rejection of the workflow scenario Workflow for Parked Invoice as Complete . It contains data related to the supplier invoices header and the workflow data. This CDS view provides the data to answer the following business questions: What is the current approval status of the workflow scenario Workflow for Parked Invoice as Complete ? What is the rejection note for the completed invoice, if rejected with reason Others ? 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 SAP_MM_BC_INV_DOC_DSP_PC SAP_MM_BC_INV_PROCESS_MC Users who want to use this CDS view must have a role that includes authorization based on at least one of the business catalogs listed above. In this role, the following restriction types must be set to read access: BUKRS ( Company Code ) You can use the Display Restriction Types app to find out in which business catalogs these restriction types are included.

Structure
Parameters The parameters of the CDS view are as follows: WorkflowTaskInternalID (key): Internal ID of workflow task: SupplierInvoice : Supplier Invoice SAPObjectNodeRepresentation : The representation of the business object node type SuplrInvcWrkflwTaskDesc : Representation of Supplier Invoice Workflow Task Name SuplrInvcWrkflwTaskType : Representation of Supplier Invoice Workflow Task Type SuplrInvcWrkflwTskTypeDesc : Representation of Supplier Invoice Workflow Task Type Name SuplrInvcWrkflwTaskStatus : Supplier Invoice Workflow Task Status SuplrInvcWrkflwTskStatusDesc : Workflow Task Status Name WorkflowTaskCreatedByUser : User that created the workflow task SuplrInvcWrkflwTskCrtnDateTime : Representation of Supplier Invoice Workflow Task Creation Coordinated Universal Time WorkflowTaskCurrentUser : Current user of workflow task FullName : Full Name ApprovedByUserFullName : Full name of the user who has approved WorkflowTaskDefinition : Definition of workflow task WorkflowTaskDueUTCDateTime : Representation of Supplier Invoice Workflow Task due Coordinated Universal Time FiscalYear : Fiscal Year as defined for accounting purposes CompanyCode : Company Code InvoicingParty : Account of Invoicing Party InvoiceGrossAmount : Gross Amount in Supplier Invoice DocumentCurrency : Specifies the currency of a document WorkflowTaskResultReasonText : Description for the reason for the decision of a user in an approval workflow WorkflowTaskResultComment : Decision comment as text of a workflow task (result)

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-IV-INT-WF
CapabilitiesOutput: Email Data Provider
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (4)

SourceAliasJoin Type
I_WorkflowTask _Workflowtask from
I_WorkflowTaskApplObject _WorkflowTaskApplObject inner
P_PurchasingLastWorkflowStep _WorkitemData inner
I_WorkflowTask _WorkitemDet inner

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CSIWFEMLDCRSN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Approve or Reject Email for Invoice view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.modelingPattern #OUTPUT_EMAIL_DATA_PROVIDER view
ObjectModel.supportedCapabilities #OUTPUT_EMAIL_DATA_PROVIDER view
Metadata.ignorePropagatedAnnotations true view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY WorkflowTaskInternalID I_WorkflowTask WorkflowTaskInternalID Work Item ID
SupplierInvoice _SupplierInvoice SupplierInvoice Document Number of an Invoice Document
SAPObjectNodeRepresentation I_WorkflowTaskApplObject SAPObjectNodeRepresentation SAP Object Node Type
SuplrInvcWrkflwTaskDesc _TaskTitle WorkflowTaskName Work item text
SuplrInvcWrkflwTaskType I_WorkflowTask WorkflowTaskType Work Item Type
SuplrInvcWrkflwTskTypeDesc Work Item Type
SuplrInvcWrkflwTaskStatus I_WorkflowTask WorkflowTaskStatus Processing Status of a Work Item
SuplrInvcWrkflwTskStatusDesc Workflow: Work Item Status
WorkflowTaskCreatedByUser I_WorkflowTask WorkflowTaskCreatedByUser User Who Created the Work Item
SuplrInvcWrkflwTskCrtnDateTime I_WorkflowTask WrkflwTskCreationUTCDateTime Workflow: Creation Time Stamp
WorkflowTaskCurrentUser I_WorkflowTask WorkflowTaskCurrentUser Actual Agent of Work Item
FullName _User UserDescription User Description
ApprovedByUserFullName _ApproverUser UserDescription User Description
WorkflowTaskDefinition I_WorkflowTask WorkflowTaskDefinition Task ID
WorkflowTaskDueUTCDateTime Latest End Time for Work Item
FiscalYear _SupplierInvoice FiscalYear G/L Fiscal Year
CompanyCode _SupplierInvoice CompanyCode Receiver Company Code
CompanyCodeName _CompanyCodeText CompanyCodeName Name of Company Code or Company
InvoicingParty _SupplierInvoice InvoicingParty Different Invoicing Party
SupplierName _SupplierText SupplierName Name of Supplier
InvoiceGrossAmount _SupplierInvoice InvoiceGrossAmount Gross Invoice Amount in Document Currency
DocumentCurrency _SupplierInvoice DocumentCurrency Document Currency
WorkflowTaskResultReasonText Flexible Workflow: Decision Reason Text
WorkflowTaskResultComment _WorkflowTaskResultComment WorkflowTaskResultComment

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_SuplrInvcWrkflwEmlDcsnRsn.
-- 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: CSIWFEMLDCRSN

CREATE VIEW C_SuplrInvcWrkflwEmlDcsnRsn AS
SELECT
  _Workflowtask.WorkflowTaskInternalID AS WorkflowTaskInternalID,
  _SupplierInvoice.SupplierInvoice AS SupplierInvoice,
  _WorkflowTaskApplObject.SAPObjectNodeRepresentation AS SAPObjectNodeRepresentation,
  _TaskTitle.WorkflowTaskName AS SuplrInvcWrkflwTaskDesc,
  _Workflowtask.WorkflowTaskType AS SuplrInvcWrkflwTaskType,
  _Workflowtask._TaskType._Text[1:Language=$session.system_language].WorkflowTaskTypeDesc AS SuplrInvcWrkflwTskTypeDesc,
  _Workflowtask.WorkflowTaskStatus AS SuplrInvcWrkflwTaskStatus,
  _Workflowtask._TaskStatus._Text[1:Language=$session.system_language].WorkflowTaskStatusDesc AS SuplrInvcWrkflwTskStatusDesc,
  _Workflowtask.WorkflowTaskCreatedByUser AS WorkflowTaskCreatedByUser,
  _Workflowtask.WrkflwTskCreationUTCDateTime AS SuplrInvcWrkflwTskCrtnDateTime,
  _Workflowtask.WorkflowTaskCurrentUser AS WorkflowTaskCurrentUser,
  _User.UserDescription AS FullName,
  _ApproverUser.UserDescription AS ApprovedByUserFullName,
  _Workflowtask.WorkflowTaskDefinition AS WorkflowTaskDefinition,
  _Workflowtask._TaskDueDate.WorkflowTaskDueUTCDateTime AS WorkflowTaskDueUTCDateTime,
  _SupplierInvoice.FiscalYear AS FiscalYear,
  _SupplierInvoice.CompanyCode AS CompanyCode,
  _CompanyCodeText.CompanyCodeName AS CompanyCodeName,
  _SupplierInvoice.InvoicingParty AS InvoicingParty,
  _SupplierText.SupplierName AS SupplierName,
  _SupplierInvoice.InvoiceGrossAmount AS InvoiceGrossAmount,
  _SupplierInvoice.DocumentCurrency AS DocumentCurrency,
  _Workflowtask._WorkflowTaskResult._WorkflowTaskResultReason._WorkflowTaskResultReasonText[1:Language=$session.system_language].WorkflowTaskResultReasonText AS WorkflowTaskResultReasonText,
  _WorkflowTaskResultComment.WorkflowTaskResultComment AS WorkflowTaskResultComment
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 */
;