P_DisputeCaseDraft

DDL: P_DISPUTECASEDRAFT Type: view COMPOSITE

P_DisputeCaseDraft is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_DisputeCaseDraft, R_DisputeCase) and exposes 119 fields with key field DisputeCaseUUID. It has 23 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_DisputeCaseDraft I_DisputeCaseDraft union_all
R_DisputeCase R_DisputeCase from

Associations (23)

CardinalityTargetAliasCondition
[0..1] I_RootCause _RootCause $projection.DisputeCaseRootCause = _RootCause.DisputeCaseRootCause and $projection.CaseType = _RootCause.CaseType
[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_UserContactCard _ProcessorContactCard $projection.CaseProcessor = _ProcessorContactCard.ContactCardID
[0..1] I_UserContactCard _ResponsibleContactCard $projection.CaseResponsible = _ResponsibleContactCard.ContactCardID
[0..1] I_DisputeCaseDraft _DisputeCaseDraft $projection.DisputeCaseUUID = _DisputeCaseDraft.DisputeCaseUUID
[0..1] I_UserContactCard _DisputeCaseCoordinatorCard $projection.DisputeCaseCoordinator = _DisputeCaseCoordinatorCard.ContactCardID
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_DisputeCaseExternalAppl _DisputeCaseExternalAppl $projection.DisputeCaseExternalApplication = _DisputeCaseExternalAppl.DisputeCaseExternalApplication
[0..1] I_Country _Country $projection.ContactPersonFaxCountry = _Country.Country
[0..1] I_Caseentity _CaseEntity $projection.CaseID = _CaseEntity.CaseUniqueID
[0..1] I_Casetypes _CaseTypes $projection.CaseType = _CaseTypes.CaseType
[0..1] I_CaseEscalationReason _Escalation $projection.CaseEscalationReason = _Escalation.CaseEscalationReason
[0..1] I_CaseCategory _CaseCategory $projection.CaseCategory = _CaseCategory.CaseCategory and $projection.CaseType = _CaseCategory.CaseType
[0..1] I_CasePriority _Priority $projection.CasePriority = _Priority.CasePriority
[0..1] I_Caseauthorizationlevel _AuthLevel $projection.CaseAuthorizationLevel = _AuthLevel.CaseAuthorizationLevel
[0..1] I_CaseStatusProfile _StatProfile $projection.CaseStatusProfile = _StatProfile.CaseStatusProfile
[0..1] I_Caseindividualstatus _Individual $projection.CaseStatus = _Individual.CaseStatus and $projection.CaseStatusProfile = _Individual.CaseStatusProfile
[0..1] I_CaseSystemStatus _CaseSystemStatus $projection.CaseSystemStatus = _CaseSystemStatus.CaseSystemStatus
[0..1] I_CaseReasons _Reasons $projection.CaseReason = _Reasons.CaseReason and $projection.CaseType = _Reasons.CaseType
[0..1] I_DraftAdministrativeData _DraftAdministrativeData $projection.DraftAdministrativeDataUUID = _DraftAdministrativeData.DraftUUID and _DraftAdministrativeData.DraftEntityType = 'R_DISPUTECASETP'

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PDISPCASEDR 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 DisputeCaseUUID view

Fields (119)

KeyFieldSource TableSource FieldDescription
KEY DisputeCaseUUID DisputeCaseUUID UUID
DraftUUID _DisputeCaseDraft DraftUUID UUID
OriginalAmountendasOriginalAmount
DisputedAmountendasDisputedAmount
PaidAmountendasPaidAmount
CreditedAmountendasCreditedAmount
WriteOffAmountendasWriteOffAmount
ContactPersonNameendasContactPersonName
ContactPersonendasContactPerson
CustomerendasCustomer
CompanyCodeendasCompanyCode
CaseTypeendasCaseType
CaseIDendasCaseID
CaseCreatedByendasCaseCreatedBy
CaseCreatedOnendasCaseCreatedOn
CaseLastChangedByendasCaseLastChangedBy
CaseLastChangedOnendasCaseLastChangedOn
CaseClosedByendasCaseClosedBy
CaseClosedTimeendasCaseClosedTime
CaseProcessorendasCaseProcessor
CaseResponsibleendasCaseResponsible
CaseTitleendasCaseTitle
CaseCategoryendasCaseCategory
CasePriorityendasCasePriority
CaseStatusProfileendasCaseStatusProfile
CaseStatusendasCaseStatus
CaseSystemStatusendasCaseSystemStatus
CaseReasonendasCaseReason
HasActiveEntity TRUE
DraftAdministrativeDataUUID _DisputeCaseDraft DraftAdministrativeDataUUID UUID
_AuthLevel _AuthLevel
_CaseSystemStatus _CaseSystemStatus
_CaseTypes _CaseTypes
_CaseCategory _CaseCategory
_ChangedByContactCard _ChangedByContactCard
_ClosedByContactCard _ClosedByContactCard
_CompanyCode _CompanyCode
_Country _Country
_CreatedByContactCard _CreatedByContactCard
_Customer _Customer
_DisputeCaseCoordinatorCard _DisputeCaseCoordinatorCard
_DisputeCaseExternalAppl _DisputeCaseExternalAppl
_Escalation _Escalation
_Individual _Individual
_Priority _Priority
_ProcessorContactCard _ProcessorContactCard
_Reasons _Reasons
_ResponsibleContactCard _ResponsibleContactCard
_RootCause _RootCause
_StatProfile _StatProfile
DraftUUID DraftUUID UUID
DisputeCaseCoordinator DisputeCaseCoordinator Coordinator
DisputeCaseRootCause DisputeCaseRootCause Root Cause Code
CaseProcessingDeadlineDate CaseProcessingDeadlineDate Process. Deadline
OriginalAmount OriginalAmount Original Disputed Amount
DisputedAmount DisputedAmount Disputed Amount
PaidAmount PaidAmount Paid Amount
CreditedAmount CreditedAmount Credited
WriteOffAmount WriteOffAmount Cleared Manually
ManuallyClearedAmount ManuallyClearedAmount Automatically Written Off
DisputeCaseCurrency DisputeCaseCurrency Currency
ContactPersonName ContactPersonName Full Name
ContactPersonEmailAddress ContactPersonEmailAddress Email
ContactPersonPhoneNumber ContactPersonPhoneNumber Telephone No.
ContactPersonFaxNumber ContactPersonFaxNumber Fax Number
ContactPersonFaxCountry ContactPersonFaxCountry C/R of Fax No.
ContactPerson ContactPerson Contact Person Key
Customer Customer Sold-to Party
CompanyCode CompanyCode Receiver Company Code
DisputeCaseExternalApplication DisputeCaseExternalApplication External Appl.
CaseType CaseType Upper/Lowercase
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
CasePlannedCloseDate CasePlannedCloseDate Planned Close Date
CaseProcessor CaseProcessor Processor
CaseResponsible CaseResponsible Person Responsible
CaseTitle CaseTitle Case Title
CaseEscalationReason CaseEscalationReason Escalation Reason
CaseCategory CaseCategory Category
CasePriority CasePriority Priority
CaseAuthorizationLevel CaseAuthorizationLevel Auth. Level
CaseStatusProfile CaseStatusProfile Status Profile
CaseStatus CaseStatus Status
CaseSystemStatus CaseSystemStatus System Status
CaseReason CaseReason Reason
CustomerDisputedAmount CustomerDisputedAmount Customer Disputed Amount
CustomerDisputedCurrency CustomerDisputedCurrency Currency
IsActiveEntity
HasActiveEntity HasActiveEntity TRUE
DraftCreationDateTime DraftCreationDateTime Time Stamp
DraftLastChangedDateTime DraftLastChangedDateTime Time Stamp
DraftAdministrativeDataUUID DraftAdministrativeDataUUID UUID
_AuthLevel _AuthLevel
_CaseSystemStatus _CaseSystemStatus
_CaseTypes _CaseTypes
_CaseCategory _CaseCategory
_ChangedByContactCard _ChangedByContactCard
_ClosedByContactCard _ClosedByContactCard
_CompanyCode _CompanyCode
_Country _Country
_CreatedByContactCard _CreatedByContactCard
_Customer _Customer
_DisputeCaseCoordinatorCard _DisputeCaseCoordinatorCard
_DisputeCaseExternalAppl _DisputeCaseExternalAppl
_Escalation _Escalation
_Individual _Individual
_Priority _Priority
_ProcessorContactCard _ProcessorContactCard
_Reasons _Reasons
_ResponsibleContactCard _ResponsibleContactCard
_RootCause _RootCause
_StatProfile _StatProfile
_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_DisputeCaseDraft.
-- 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_DisputeCaseDraft AS
SELECT
  DisputeCaseUUID,
  _DisputeCaseDraft.DraftUUID AS DraftUUID,
  case when _DisputeCaseDraft.DraftUUID is null then OriginalAmount else _DisputeCaseDraft.OriginalAmount end as OriginalAmount AS OriginalAmountendasOriginalAmount,
  case when _DisputeCaseDraft.DraftUUID is null then DisputedAmount else _DisputeCaseDraft.DisputedAmount end as DisputedAmount AS DisputedAmountendasDisputedAmount,
  case when _DisputeCaseDraft.DraftUUID is null then PaidAmount else _DisputeCaseDraft.PaidAmount end as PaidAmount AS PaidAmountendasPaidAmount,
  case when _DisputeCaseDraft.DraftUUID is null then CreditedAmount else _DisputeCaseDraft.CreditedAmount end as CreditedAmount AS CreditedAmountendasCreditedAmount,
  case when _DisputeCaseDraft.DraftUUID is null then WriteOffAmount else _DisputeCaseDraft.WriteOffAmount end as WriteOffAmount AS WriteOffAmountendasWriteOffAmount,
  case when _DisputeCaseDraft.DraftUUID is null then ContactPersonName else _DisputeCaseDraft.ContactPersonName end as ContactPersonName AS ContactPersonNameendasContactPersonName,
  case when _DisputeCaseDraft.DraftUUID is null then ContactPerson else _DisputeCaseDraft.ContactPerson end as ContactPerson AS ContactPersonendasContactPerson,
  case when _DisputeCaseDraft.DraftUUID is null then Customer else _DisputeCaseDraft.Customer end as Customer AS CustomerendasCustomer,
  case when _DisputeCaseDraft.DraftUUID is null then CompanyCode else _DisputeCaseDraft.CompanyCode end as CompanyCode AS CompanyCodeendasCompanyCode,
  case when _DisputeCaseDraft.DraftUUID is null then CaseType else _DisputeCaseDraft.CaseType end as CaseType AS CaseTypeendasCaseType,
  case when _DisputeCaseDraft.DraftUUID is null then CaseID else _DisputeCaseDraft.CaseID end as CaseID AS CaseIDendasCaseID,
  case when _DisputeCaseDraft.DraftUUID is null then CaseCreatedBy else _DisputeCaseDraft.CaseCreatedBy end as CaseCreatedBy AS CaseCreatedByendasCaseCreatedBy,
  case when _DisputeCaseDraft.DraftUUID is null then CaseCreatedOn else _DisputeCaseDraft.CaseCreatedOn end as CaseCreatedOn AS CaseCreatedOnendasCaseCreatedOn,
  case when _DisputeCaseDraft.DraftUUID is null then CaseLastChangedBy else _DisputeCaseDraft.CaseLastChangedBy end as CaseLastChangedBy AS CaseLastChangedByendasCaseLastChangedBy,
  case when _DisputeCaseDraft.DraftUUID is null then CaseLastChangedOn else _DisputeCaseDraft.CaseLastChangedOn end as CaseLastChangedOn AS CaseLastChangedOnendasCaseLastChangedOn,
  case when _DisputeCaseDraft.DraftUUID is null then CaseClosedBy else _DisputeCaseDraft.CaseClosedBy end as CaseClosedBy AS CaseClosedByendasCaseClosedBy,
  case when _DisputeCaseDraft.DraftUUID is null then CaseClosedTime else _DisputeCaseDraft.CaseClosedTime end as CaseClosedTime AS CaseClosedTimeendasCaseClosedTime,
  case when _DisputeCaseDraft.DraftUUID is null then CaseProcessor else _DisputeCaseDraft.CaseProcessor end as CaseProcessor AS CaseProcessorendasCaseProcessor,
  case when _DisputeCaseDraft.DraftUUID is null then CaseResponsible else _DisputeCaseDraft.CaseResponsible end as CaseResponsible AS CaseResponsibleendasCaseResponsible,
  case when _DisputeCaseDraft.DraftUUID is null then CaseTitle else _DisputeCaseDraft.CaseTitle end as CaseTitle AS CaseTitleendasCaseTitle,
  case when _DisputeCaseDraft.DraftUUID is null then CaseCategory else _DisputeCaseDraft.CaseCategory end as CaseCategory AS CaseCategoryendasCaseCategory,
  case when _DisputeCaseDraft.DraftUUID is null then CasePriority else _DisputeCaseDraft.CasePriority end as CasePriority AS CasePriorityendasCasePriority,
  case when _DisputeCaseDraft.DraftUUID is null then CaseStatusProfile else _DisputeCaseDraft.CaseStatusProfile end as CaseStatusProfile AS CaseStatusProfileendasCaseStatusProfile,
  case when _DisputeCaseDraft.DraftUUID is null then CaseStatus else _DisputeCaseDraft.CaseStatus end as CaseStatus AS CaseStatusendasCaseStatus,
  case when _DisputeCaseDraft.DraftUUID is null then CaseSystemStatus else _DisputeCaseDraft.CaseSystemStatus end as CaseSystemStatus AS CaseSystemStatusendasCaseSystemStatus,
  case when _DisputeCaseDraft.DraftUUID is null then CaseReason else _DisputeCaseDraft.CaseReason end as CaseReason AS CaseReasonendasCaseReason,
  cast ( 'X'as boolean ) AS HasActiveEntity,
  _DisputeCaseDraft.DraftAdministrativeDataUUID AS DraftAdministrativeDataUUID,
  DisputeCaseCoordinator,
  DisputeCaseRootCause,
  CaseProcessingDeadlineDate,
  OriginalAmount,
  DisputedAmount,
  PaidAmount,
  CreditedAmount,
  WriteOffAmount,
  ManuallyClearedAmount,
  DisputeCaseCurrency,
  ContactPersonName,
  ContactPersonEmailAddress,
  ContactPersonPhoneNumber,
  ContactPersonFaxNumber,
  ContactPersonFaxCountry,
  ContactPerson,
  Customer,
  CompanyCode,
  DisputeCaseExternalApplication,
  CaseType,
  CaseID,
  CaseExternalReference,
  CaseCreatedBy,
  CaseCreatedOn,
  CaseLastChangedBy,
  CaseLastChangedOn,
  CaseClosedBy,
  CaseClosedTime,
  CasePlannedCloseDate,
  CaseProcessor,
  CaseResponsible,
  CaseTitle,
  CaseEscalationReason,
  CaseCategory,
  CasePriority,
  CaseAuthorizationLevel,
  CaseStatusProfile,
  CaseStatus,
  CaseSystemStatus,
  CaseReason,
  CustomerDisputedAmount,
  CustomerDisputedCurrency,
  cast( '' as boolean ) AS IsActiveEntity,
  DraftCreationDateTime,
  DraftLastChangedDateTime
FROM R_DisputeCase
LEFT OUTER JOIN I_RootCause AS _RootCause ON DisputeCaseRootCause = _RootCause.DisputeCaseRootCause AND CaseType = _RootCause.CaseType  -- 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_UserContactCard AS _ProcessorContactCard ON CaseProcessor = _ProcessorContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _ResponsibleContactCard ON CaseResponsible = _ResponsibleContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_DisputeCaseDraft AS _DisputeCaseDraft ON DisputeCaseUUID = _DisputeCaseDraft.DisputeCaseUUID  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _DisputeCaseCoordinatorCard ON DisputeCaseCoordinator = _DisputeCaseCoordinatorCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_DisputeCaseExternalAppl AS _DisputeCaseExternalAppl ON DisputeCaseExternalApplication = _DisputeCaseExternalAppl.DisputeCaseExternalApplication  -- association [0..1]
LEFT OUTER JOIN I_Country AS _Country ON ContactPersonFaxCountry = _Country.Country  -- association [0..1]
LEFT OUTER JOIN I_Caseentity AS _CaseEntity ON CaseID = _CaseEntity.CaseUniqueID  -- association [0..1]
LEFT OUTER JOIN I_Casetypes AS _CaseTypes ON CaseType = _CaseTypes.CaseType  -- association [0..1]
LEFT OUTER JOIN I_CaseEscalationReason AS _Escalation ON CaseEscalationReason = _Escalation.CaseEscalationReason  -- association [0..1]
LEFT OUTER JOIN I_CaseCategory AS _CaseCategory ON CaseCategory = _CaseCategory.CaseCategory AND CaseType = _CaseCategory.CaseType  -- association [0..1]
LEFT OUTER JOIN I_CasePriority AS _Priority ON CasePriority = _Priority.CasePriority  -- association [0..1]
LEFT OUTER JOIN I_Caseauthorizationlevel AS _AuthLevel ON CaseAuthorizationLevel = _AuthLevel.CaseAuthorizationLevel  -- association [0..1]
LEFT OUTER JOIN I_CaseStatusProfile AS _StatProfile ON CaseStatusProfile = _StatProfile.CaseStatusProfile  -- association [0..1]
LEFT OUTER JOIN I_Caseindividualstatus AS _Individual ON CaseStatus = _Individual.CaseStatus AND CaseStatusProfile = _Individual.CaseStatusProfile  -- association [0..1]
LEFT OUTER JOIN I_CaseSystemStatus AS _CaseSystemStatus ON CaseSystemStatus = _CaseSystemStatus.CaseSystemStatus  -- association [0..1]
LEFT OUTER JOIN I_CaseReasons AS _Reasons ON CaseReason = _Reasons.CaseReason AND CaseType = _Reasons.CaseType  -- association [0..1]
LEFT OUTER JOIN I_DraftAdministrativeData AS _DraftAdministrativeData ON DraftAdministrativeDataUUID = _DraftAdministrativeData.DraftUUID AND _DraftAdministrativeData.DraftEntityType = 'R_DISPUTECASETP'  -- association [0..1]
-- UNION ALL with additional select branch(es): I_DisputeCaseDraft
;