P_CollsPromiseToPayDraft

DDL: P_COLLSPROMISETOPAYDRAFT Type: view COMPOSITE Package: ODATA_PROMISE_TO_PAY

Promise To Pay Draft

P_CollsPromiseToPayDraft is a Composite CDS View that provides data about "Promise To Pay Draft" in SAP S/4HANA. It reads from 2 data sources (I_CollsPromiseToPay, I_CollsPromiseToPayDraft) and exposes 84 fields with key field PromiseToPayUUID. It has 11 associations to related views. Part of development package ODATA_PROMISE_TO_PAY.

Data Sources (2)

SourceAliasJoin Type
I_CollsPromiseToPay I_CollsPromiseToPay from
I_CollsPromiseToPayDraft I_CollsPromiseToPayDraft union_all

Associations (11)

CardinalityTargetAliasCondition
[0..1] I_CaseAttribute _CaseAttribute $projection.PromiseToPayUUID = _CaseAttribute.CaseUniqueID
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_Country _Country $projection.ContactPersonFaxCountry = _Country.Country
[0..1] I_CollsPromiseToPayStatus _CollsPromiseToPayStatus $projection.PromiseToPayStatus = _CollsPromiseToPayStatus.PromiseToPayStatus
[0..1] I_UserContactCard _CreatedByContactCard $projection.CaseCreatedBy = _CreatedByContactCard.ContactCardID
[0..1] I_UserContactCard _ChangedByContactCard $projection.CaseLastChangedBy = _ChangedByContactCard.ContactCardID
[0..1] I_UserContactCard _ClosedByContactCard $projection.CaseClosedBy = _ClosedByContactCard.ContactCardID
[0..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[0..1] I_CollsPromiseToPayDraft _PromiseToPayDraft $projection.PromiseToPayUUID = _PromiseToPayDraft.PromiseToPayUUID
[0..1] I_DraftAdministrativeData _DraftAdministrativeData $projection.draftadministrativedatauuid = _DraftAdministrativeData.DraftUUID and _DraftAdministrativeData.DraftEntityType = 'R_COLLSPROMISETOPAYTP'

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PCOLLSP2PDR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey PromiseToPayUUID view

Fields (84)

KeyFieldSource TableSource FieldDescription
KEY PromiseToPayUUID PromiseToPayUUID Internal Key
DraftUUID _PromiseToPayDraft DraftUUID UUID
CompanyCodeendasCompanyCode
CustomerendasCustomer
ObjectTypeendasObjectType
LinkedInvoiceKeyendasLinkedInvoiceKey
PromisedAmountendasPromisedAmount
PaidAmountendasPaidAmount
CurrencyendasCurrency
DueDateendasDueDate
PromiseToPayDateendasPromiseToPayDate
LastPaymentDateendasLastPaymentDate
PromiseToPayLevelendasPromiseToPayLevel
ContactPersonendasContactPerson
CaseIDendasCaseID
CaseCreatedByendasCaseCreatedBy
CaseCreatedOnendasCaseCreatedOn
CaseLastChangedByendasCaseLastChangedBy
CaseLastChangedOnendasCaseLastChangedOn
CaseClosedByendasCaseClosedBy
CaseClosedTimeendasCaseClosedTime
HasActiveEntity TRUE
DraftAdministrativeDataUUID _PromiseToPayDraft DraftAdministrativeDataUUID UUID
CaseType _CaseAttribute CaseType Upper/Lowercase
IsClearedendasIsCleared
_CaseAttribute _CaseAttribute
_ChangedByContactCard _ChangedByContactCard
_ClosedByContactCard _ClosedByContactCard
_CollsPromiseToPayStatus _CollsPromiseToPayStatus
_CompanyCode _CompanyCode
_Country _Country
_CreatedByContactCard _CreatedByContactCard
_Currency _Currency
_Customer _Customer
DraftUUID DraftUUID UUID
CompanyCode CompanyCode Receiver Company Code
Customer Customer Sold-to Party
ObjectType ObjectType Type
LinkedInvoiceKey LinkedInvoiceKey Key
PromisedAmount PromisedAmount Promised Amount
PaidAmount PaidAmount Paid Amount
Currency Currency Valuation Crcy
DueDate DueDate Promised For
PromiseToPayDate PromiseToPayDate Promised On
LastPaymentDate LastPaymentDate Last Payment
PromiseToPayStatus PromiseToPayStatus State
PromiseToPayLevel PromiseToPayLevel Level
PromiseToPayGivenByPersonName PromiseToPayGivenByPersonName Promised By
ContactPersonEmailAddress ContactPersonEmailAddress Email
ContactPersonPhoneNumber ContactPersonPhoneNumber Telephone No.
ContactPersonFaxNumber ContactPersonFaxNumber Fax Number
ContactPersonFaxCountry ContactPersonFaxCountry C/R of Fax No.
ContactPerson ContactPerson Contact Person Key
NumberOfInstallments NumberOfInstallments Installments
PaidOnScheduleAmount PaidOnScheduleAmount Installment Amounts Paid on Schedule
PaidOffScheduleAmount PaidOffScheduleAmount Not on Schedule
NextInstallmentDueDate NextInstallmentDueDate Due Date of Next Open Installment
NextInstallmentAmount NextInstallmentAmount Open Amount
Prms2PToInvoiceGroupRefUUID Prms2PToInvoiceGroupRefUUID UUID
CaseID CaseID Case ID
CaseExternalReference CaseExternalReference External Reference
CaseCreatedBy CaseCreatedBy Created By
CaseCreatedOn CaseCreatedOn Created At
CaseLastChangedBy CaseLastChangedBy Changed By
CaseLastChangedOn CaseLastChangedOn Last Changed At
CaseClosedBy CaseClosedBy Closed By
CaseClosedTime CaseClosedTime Closed At
IsActiveEntity
HasActiveEntity HasActiveEntity TRUE
DraftCreationDateTime DraftCreationDateTime Time Stamp
DraftLastChangedDateTime DraftLastChangedDateTime Time Stamp
DraftAdministrativeDataUUID DraftAdministrativeDataUUID UUID
CaseType CaseType Upper/Lowercase
IsCleared IsCleared Integer
_CaseAttribute _CaseAttribute
_ChangedByContactCard _ChangedByContactCard
_ClosedByContactCard _ClosedByContactCard
_CollsPromiseToPayStatus _CollsPromiseToPayStatus
_CompanyCode _CompanyCode
_Country _Country
_CreatedByContactCard _CreatedByContactCard
_Currency _Currency
_Customer _Customer
_DraftAdministrativeData _DraftAdministrativeData

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_CollsPromiseToPayDraft.
-- 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 P_CollsPromiseToPayDraft AS
SELECT
  PromiseToPayUUID,
  _PromiseToPayDraft.DraftUUID AS DraftUUID,
  case when _PromiseToPayDraft.DraftUUID is null then CompanyCode else _PromiseToPayDraft.CompanyCode end as CompanyCode AS CompanyCodeendasCompanyCode,
  case when _PromiseToPayDraft.DraftUUID is null then Customer else _PromiseToPayDraft.Customer end as Customer AS CustomerendasCustomer,
  case when _PromiseToPayDraft.DraftUUID is null then ObjectType else _PromiseToPayDraft.ObjectType end as ObjectType AS ObjectTypeendasObjectType,
  case when _PromiseToPayDraft.DraftUUID is null then LinkedInvoiceKey else _PromiseToPayDraft.LinkedInvoiceKey end as LinkedInvoiceKey AS LinkedInvoiceKeyendasLinkedInvoiceKey,
  case when _PromiseToPayDraft.DraftUUID is null then PromisedAmount else _PromiseToPayDraft.PromisedAmount end as PromisedAmount AS PromisedAmountendasPromisedAmount,
  case when _PromiseToPayDraft.DraftUUID is null then PaidAmount else _PromiseToPayDraft.PaidAmount end as PaidAmount AS PaidAmountendasPaidAmount,
  case when _PromiseToPayDraft.DraftUUID is null then Currency else _PromiseToPayDraft.Currency end as Currency AS CurrencyendasCurrency,
  case when _PromiseToPayDraft.DraftUUID is null then DueDate else _PromiseToPayDraft.DueDate end as DueDate AS DueDateendasDueDate,
  case when _PromiseToPayDraft.DraftUUID is null then PromiseToPayDate else _PromiseToPayDraft.PromiseToPayDate end as PromiseToPayDate AS PromiseToPayDateendasPromiseToPayDate,
  case when _PromiseToPayDraft.DraftUUID is null then LastPaymentDate else _PromiseToPayDraft.LastPaymentDate end as LastPaymentDate AS LastPaymentDateendasLastPaymentDate,
  case when _PromiseToPayDraft.DraftUUID is null then PromiseToPayLevel else _PromiseToPayDraft.PromiseToPayLevel end as PromiseToPayLevel AS PromiseToPayLevelendasPromiseToPayLevel,
  case when _PromiseToPayDraft.DraftUUID is null then ContactPerson else _PromiseToPayDraft.ContactPerson end as ContactPerson AS ContactPersonendasContactPerson,
  case when _PromiseToPayDraft.DraftUUID is null then CaseID else _PromiseToPayDraft.CaseID end as CaseID AS CaseIDendasCaseID,
  case when _PromiseToPayDraft.DraftUUID is null then CaseCreatedBy else _PromiseToPayDraft.CaseCreatedBy end as CaseCreatedBy AS CaseCreatedByendasCaseCreatedBy,
  case when _PromiseToPayDraft.DraftUUID is null then CaseCreatedOn else _PromiseToPayDraft.CaseCreatedOn end as CaseCreatedOn AS CaseCreatedOnendasCaseCreatedOn,
  case when _PromiseToPayDraft.DraftUUID is null then CaseLastChangedBy else _PromiseToPayDraft.CaseLastChangedBy end as CaseLastChangedBy AS CaseLastChangedByendasCaseLastChangedBy,
  case when _PromiseToPayDraft.DraftUUID is null then CaseLastChangedOn else _PromiseToPayDraft.CaseLastChangedOn end as CaseLastChangedOn AS CaseLastChangedOnendasCaseLastChangedOn,
  case when _PromiseToPayDraft.DraftUUID is null then CaseClosedBy else _PromiseToPayDraft.CaseClosedBy end as CaseClosedBy AS CaseClosedByendasCaseClosedBy,
  case when _PromiseToPayDraft.DraftUUID is null then CaseClosedTime else _PromiseToPayDraft.CaseClosedTime end as CaseClosedTime AS CaseClosedTimeendasCaseClosedTime,
  cast ( 'X' as boolean ) AS HasActiveEntity,
  _PromiseToPayDraft.DraftAdministrativeDataUUID AS DraftAdministrativeDataUUID,
  _CaseAttribute.CaseType AS CaseType,
  case when _PromiseToPayDraft.DraftUUID is null then IsCleared else _PromiseToPayDraft.IsCleared end as IsCleared AS IsClearedendasIsCleared,
  CompanyCode,
  Customer,
  ObjectType,
  LinkedInvoiceKey,
  PromisedAmount,
  PaidAmount,
  Currency,
  DueDate,
  PromiseToPayDate,
  LastPaymentDate,
  PromiseToPayStatus,
  PromiseToPayLevel,
  PromiseToPayGivenByPersonName,
  ContactPersonEmailAddress,
  ContactPersonPhoneNumber,
  ContactPersonFaxNumber,
  ContactPersonFaxCountry,
  ContactPerson,
  NumberOfInstallments,
  PaidOnScheduleAmount,
  PaidOffScheduleAmount,
  NextInstallmentDueDate,
  NextInstallmentAmount,
  Prms2PToInvoiceGroupRefUUID,
  CaseID,
  CaseExternalReference,
  CaseCreatedBy,
  CaseCreatedOn,
  CaseLastChangedBy,
  CaseLastChangedOn,
  CaseClosedBy,
  CaseClosedTime,
  '' AS IsActiveEntity,
  DraftCreationDateTime,
  DraftLastChangedDateTime,
  IsCleared
FROM I_CollsPromiseToPay
LEFT OUTER JOIN I_CaseAttribute AS _CaseAttribute ON PromiseToPayUUID = _CaseAttribute.CaseUniqueID  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Country AS _Country ON ContactPersonFaxCountry = _Country.Country  -- association [0..1]
LEFT OUTER JOIN I_CollsPromiseToPayStatus AS _CollsPromiseToPayStatus ON PromiseToPayStatus = _CollsPromiseToPayStatus.PromiseToPayStatus  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _CreatedByContactCard ON CaseCreatedBy = _CreatedByContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _ChangedByContactCard ON CaseLastChangedBy = _ChangedByContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _ClosedByContactCard ON CaseClosedBy = _ClosedByContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency  -- association [0..1]
LEFT OUTER JOIN I_CollsPromiseToPayDraft AS _PromiseToPayDraft ON PromiseToPayUUID = _PromiseToPayDraft.PromiseToPayUUID  -- association [0..1]
LEFT OUTER JOIN I_DraftAdministrativeData AS _DraftAdministrativeData ON draftadministrativedatauuid = _DraftAdministrativeData.DraftUUID AND _DraftAdministrativeData.DraftEntityType = 'R_COLLSPROMISETOPAYTP'  -- association [0..1]
-- UNION ALL with additional select branch(es): I_CollsPromiseToPayDraft
;