C_CN_PayReqnWrkflwApprvlTmpl

DDL: C_CN_PAYREQNWRKFLWAPPRVLTMPL Type: view_entity CONSUMPTION

Payment Requisition Approval Email

C_CN_PayReqnWrkflwApprvlTmpl (Consumption)

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

Country or Region-Specific Functions for Finance

C_CN_PayReqnWrkflwApprvlTmpl is a Consumption CDS View that provides data about "Payment Requisition Approval Email" in SAP S/4HANA. It reads from 3 data sources (I_PaymentRequisition, I_WorkflowTask, I_WorkflowTaskApplObject) and exposes 23 fields with key field WorkflowTaskInternalID. It has 1 association to related views.

SAP Help Documentation

CategoryPayment Requisition
StatusPayment Requisition Status
Purpose
This CDS view is designed to facilitate the generation of approval emails for payment requisitions within a workflow system. It aggregates and presents relevant data from various entities related to payment requisitions, workflow tasks, and user information, enabling the creation of comprehensive approval notifications. This CDS view provides the data to answer the following business questions: What is the status and priority of a specific payment requisition within the workflow? Who created the payment requisition, and what is their user description? What are the details of the payment requisition, including the amount, currency, type, and method? What are the planned payment date and any payment difference reasons associated with the requisition? What are the creation and deadline due times for the workflow task related to the payment requisition? What notes or reasons for rejection have been provided by the workflow approver? What is the URL for accessing the workflow task associated with the payment requisition? 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 loio3d8bf4c7269c4bdfbc35dbb91d77668b/cds_p_op_authorizations F_BKPF_BUK (Accounting Document: Authorization for Company Codes)

Structure
Important Fields Important fields in this view include the following: Field Name Description PAYTREQUISITIONAMTINTRANSCRCY Payment Requisition Amount SUPPLIER Supplier CHANGEDONDATETIME Changed On CREATIONDATETIME Created On PAYMENTREQUISITIONNUMBER Payment Requisition Number PAYREQNWRKFLWTSKDUUTCTME Latest start time PAYREQNWRKFLWTSKCRTNUTCTIME Latest start time WORKFLOWTASKURL Workflow Task URL PAYREQNWRKFLWTSKDUUTCDTE Latest Start Date PAYREQNWRKFLWTSKCRTNUTCDATE Latest Start Date PLANNEDPAYMENTDATE Planned Payment Date WORKFLOWTASKINTERNALID Work Item ID CURRENCY Currency PAYMENTREQUISITIONSTATUS Payment Requisition Status PAYMENTREQUISITIONTYPE Payment Requisition Type PAYMENTMETHOD Preferred Payment Method PAYMENTREQUISITIONPRIORITY Priority COMPANYCODE Company Code WORKFLOWAPPROVERNOTE PAYMENTDIFFERENCEREASON Reason Code CREATEDBYUSERDESCRIPTION Description LASTCHANGEDBYUSER Changed By CREATEDBYUSER Created By

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessCountry or Region-Specific Functions for Finance
Application ComponentFI-LOC-CM-CN
CapabilitiesOutput: Email Data Provider
PackageCountry or Region-Specific Functions for Finance for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (3)

SourceAliasJoin Type
I_PaymentRequisition _CnPayRequisition inner
I_WorkflowTask _WorkflowTask from
I_WorkflowTaskApplObject _WorkflowTaskApplObject inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_WorkflowTaskURL _WorkflowTaskURL _WorkflowTaskURL.WorkflowTaskInternalID = _WorkflowTask.WorkflowTaskInternalID

Annotations (8)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Payment Requisition Approval Email view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY WorkflowTaskInternalID I_WorkflowTask WorkflowTaskInternalID Work Item ID
PaymentRequisitionNumber I_PaymentRequisition PaymentRequisitionNumber Payment Requisition Number
CompanyCode I_PaymentRequisition CompanyCode Receiver Company Code
PaymentRequisitionStatus I_PaymentRequisition PaymentRequisitionStatus Payment Requisition Status
Supplier I_PaymentRequisition Supplier Account Number of Supplier
PaymentRequisitionPriority I_PaymentRequisition PaymentRequisitionPriority Workflow priority
PaytRequisitionAmtInTransCrcy I_PaymentRequisition PaytRequisitionAmtInTransCrcy Payment Requisition Amount
Currency I_PaymentRequisition Currency Valuation Crcy
PaymentRequisitionType I_PaymentRequisition PaymentRequisitionType Payment Requisition Type
PaymentMethod I_PaymentRequisition PaymentMethod Preferred Payment Method
WorkflowApproverNote I_PaymentRequisition WorkflowApproverNote Reject Reason
PlannedPaymentDate I_PaymentRequisition PlannedPaymentDate Planned Payment Date
PaymentDifferenceReason I_PaymentRequisition PaymentDifferenceReason Reason Code for Payment Differences
CreatedByUser I_PaymentRequisition CreatedByUser Created By User
CreatedByUserDescription _User UserDescription User Description
PayReqnWrkflwTskCrtnUTCDate Latest Start Date for Work Item
PayReqnWrkflwTskCrtnUTCTime Latest start time for work item
PayReqnWrkflwTskDuUTCDte Latest Start Date for Work Item
PayReqnWrkflwTskDuUTCTme Latest start time for work item
CreationDateTime I_PaymentRequisition CreationDateTime Creation Date and Time
LastChangedByUser I_PaymentRequisition LastChangedByUser Changed By
ChangedOnDateTime I_PaymentRequisition ChangedOnDateTime Change Date and Time
WorkflowTaskURL _WorkflowTaskURL WorkflowTaskURL Workflow: Workflow Task URL

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_CN_PayReqnWrkflwApprvlTmpl.
-- 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.

CREATE VIEW C_CN_PayReqnWrkflwApprvlTmpl AS
SELECT
  _WorkflowTask.WorkflowTaskInternalID AS WorkflowTaskInternalID,
  _CnPayRequisition.PaymentRequisitionNumber AS PaymentRequisitionNumber,
  _CnPayRequisition.CompanyCode AS CompanyCode,
  _CnPayRequisition.PaymentRequisitionStatus AS PaymentRequisitionStatus,
  _CnPayRequisition.Supplier AS Supplier,
  _CnPayRequisition.PaymentRequisitionPriority AS PaymentRequisitionPriority,
  _CnPayRequisition.PaytRequisitionAmtInTransCrcy AS PaytRequisitionAmtInTransCrcy,
  _CnPayRequisition.Currency AS Currency,
  _CnPayRequisition.PaymentRequisitionType AS PaymentRequisitionType,
  _CnPayRequisition.PaymentMethod AS PaymentMethod,
  _CnPayRequisition.WorkflowApproverNote AS WorkflowApproverNote,
  _CnPayRequisition.PlannedPaymentDate AS PlannedPaymentDate,
  _CnPayRequisition.PaymentDifferenceReason AS PaymentDifferenceReason,
  _CnPayRequisition.CreatedByUser AS CreatedByUser,
  _User.UserDescription AS CreatedByUserDescription,
  cast(tstmp_to_dats( cast(_WorkflowTask.WrkflwTskCreationUTCDateTime as abap.dec( 15, 0 )), 'UTC', $session.client, 'NULL' ) as sww_lsd ) AS PayReqnWrkflwTskCrtnUTCDate,
  cast(tstmp_to_tims( cast(_WorkflowTask.WrkflwTskCreationUTCDateTime as abap.dec( 15, 0 )), 'UTC', $session.client, 'NULL' ) as sww_lst ) AS PayReqnWrkflwTskCrtnUTCTime,
  cast(tstmp_to_dats( cast(_WorkflowTask._TaskDueDate.WorkflowTaskDueUTCDateTime as abap.dec( 15, 0 )), 'UTC', $session.client, 'NULL' ) as sww_lsd ) AS PayReqnWrkflwTskDuUTCDte,
  cast(tstmp_to_tims( cast(_WorkflowTask._TaskDueDate.WorkflowTaskDueUTCDateTime as abap.dec( 15, 0 )), 'UTC', $session.client, 'NULL' ) as sww_lst ) AS PayReqnWrkflwTskDuUTCTme,
  _CnPayRequisition.CreationDateTime AS CreationDateTime,
  _CnPayRequisition.LastChangedByUser AS LastChangedByUser,
  _CnPayRequisition.ChangedOnDateTime AS ChangedOnDateTime,
  _WorkflowTaskURL.WorkflowTaskURL AS WorkflowTaskURL
FROM I_WorkflowTask AS _WorkflowTask
INNER JOIN I_WorkflowTaskApplObject AS _WorkflowTaskApplObject ON /* join condition not captured in parsed metadata */
INNER JOIN I_PaymentRequisition AS _CnPayRequisition ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_WorkflowTaskURL AS _WorkflowTaskURL ON _WorkflowTaskURL.WorkflowTaskInternalID = _WorkflowTask.WorkflowTaskInternalID  -- association [0..1]
;