P_DISPUTECASEDRAFT

CDS View

P_DISPUTECASEDRAFT is a CDS View in S/4HANA. It contains 61 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
R_CollsHeadOfficeDisputeCase view inner COMPOSITE Head Office Dispute Case
R_DisputeCaseDraftCollsSgmtTP view inner TRANSACTIONAL Dispute Case TP
R_DisputeCaseDraftTP view from TRANSACTIONAL Dispute Case with Draft

Fields (61)

KeyField CDS FieldsUsed in Views
KEY DisputeCaseUUID DisputeCaseUUID 1
_AuthLevel _AuthLevel 1
_CaseCategory _CaseCategory 1
_CaseSystemStatus _CaseSystemStatus 1
_CaseTypes _CaseTypes 1
_CompanyCode _CompanyCode 2
_Country _Country 1
_Customer _Customer 1
_DisputeCaseExternalAppl _DisputeCaseExternalAppl 1
_Escalation _Escalation 1
_Individual _Individual 1
_Priority _Priority 1
_Reasons _Reasons 1
_RootCause _RootCause 1
_StatProfile _StatProfile 1
CaseAuthorizationLevel CaseAuthorizationLevel 1
CaseCategory CaseCategory 1
CaseClosedBy CaseClosedBy 1
CaseClosedTime CaseClosedTime 1
CaseCreatedBy CaseCreatedBy 1
CaseCreatedOn CaseCreatedOn 1
CaseEscalationReason CaseEscalationReason 1
CaseExternalReference CaseExternalReference 1
CaseID CaseID 1
CaseLastChangedBy CaseLastChangedBy 1
CaseLastChangedOn CaseLastChangedOn 1
CasePlannedCloseDate CasePlannedCloseDate 1
CasePriority CasePriority 1
CaseProcessingDeadlineDate CaseProcessingDeadlineDate 1
CaseProcessor CaseProcessor 1
CaseReason CaseReason 1
CaseResponsible CaseResponsible 1
CaseStatus CaseStatus 1
CaseStatusProfile CaseStatusProfile 1
CaseSystemStatus CaseSystemStatus 1
CaseTitle CaseTitle 1
CaseType CaseType 1
CompanyCode CompanyCode 2
ContactPersonEmailAddress ContactPersonEmailAddress 1
ContactPersonFaxCountry ContactPersonFaxCountry 1
ContactPersonFaxNumber ContactPersonFaxNumber 1
ContactPersonName ContactPersonName 1
ContactPersonPhoneNumber ContactPersonPhoneNumber 1
CreditedAmount CreditedAmount 1
Customer Customer 1
CustomerDisputedAmount CustomerDisputedAmount 1
CustomerDisputedCurrency CustomerDisputedCurrency 1
DisputeCaseCoordinator DisputeCaseCoordinator 1
DisputeCaseCurrency DisputeCaseCurrency 1
DisputeCaseExternalApplication DisputeCaseExternalApplication 1
DisputeCaseRootCause DisputeCaseRootCause 1
DisputedAmount DisputedAmount 1
DraftCreationDateTime DraftCreationDateTime 1
DraftLastChangedDateTime DraftLastChangedDateTime 1
DraftUUID DraftUUID 1
HasActiveEntity HasActiveEntity 1
IsActiveEntity IsActiveEntity 1
ManuallyClearedAmount ManuallyClearedAmount 1
OriginalAmount OriginalAmount 1
PaidAmount PaidAmount 1
WriteOffAmount WriteOffAmount 1
@AbapCatalog: { sqlViewName: 'PDISPCASEDR',
                compiler: { compareFilter: true },
                preserveKey: true }
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
                  personalData:       { blocking: #BLOCKED_DATA_EXCLUDED },
                  privilegedAssociations: [ '_DraftAdministrativeData' ] }
@VDM: { viewType: #COMPOSITE,
        private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #A,
                             sizeCategory: #L,
                             dataClass: #TRANSACTIONAL },
                representativeKey: 'DisputeCaseUUID' }

define view P_DisputeCaseDraft
  as select from R_DisputeCase

  // VDM Associations

  // Root Cause Code

  association [0..1] to I_RootCause               as _RootCause                  on  $projection.DisputeCaseRootCause = _RootCause.DisputeCaseRootCause
                                                                                 and $projection.CaseType             = _RootCause.CaseType

  // Created by Contact Card

  association [0..1] to I_UserContactCard         as _CreatedByContactCard       on  $projection.CaseCreatedBy = _CreatedByContactCard.ContactCardID

  // Changed by Contact Card

  association [0..1] to I_UserContactCard         as _ChangedByContactCard       on  $projection.CaseLastChangedBy = _ChangedByContactCard.ContactCardID

  // Closed by Contact Card

  association [0..1] to I_UserContactCard         as _ClosedByContactCard        on  $projection.CaseClosedBy = _ClosedByContactCard.ContactCardID

  // Processor Contact Card

  association [0..1] to I_UserContactCard         as _ProcessorContactCard       on  $projection.CaseProcessor = _ProcessorContactCard.ContactCardID

  // Person Responsible Contact Card

  association [0..1] to I_UserContactCard         as _ResponsibleContactCard     on  $projection.CaseResponsible = _ResponsibleContactCard.ContactCardID

  // Draft

  association [0..1] to I_DisputeCaseDraft        as _DisputeCaseDraft           on  $projection.DisputeCaseUUID = _DisputeCaseDraft.DisputeCaseUUID

  // Dispute Case Coordinator

  association [0..1] to I_UserContactCard         as _DisputeCaseCoordinatorCard on  $projection.DisputeCaseCoordinator = _DisputeCaseCoordinatorCard.ContactCardID

  // Customer

  association [0..1] to I_Customer                as _Customer                   on  $projection.Customer = _Customer.Customer

  // Company Code

  association [0..1] to I_CompanyCode             as _CompanyCode                on  $projection.CompanyCode = _CompanyCode.CompanyCode

  // External Application

  association [0..1] to I_DisputeCaseExternalAppl as _DisputeCaseExternalAppl    on  $projection.DisputeCaseExternalApplication = _DisputeCaseExternalAppl.DisputeCaseExternalApplication

  // Country

  association [0..1] to I_Country                 as _Country                    on  $projection.ContactPersonFaxCountry = _Country.Country

  // Case Entity

  association [0..1] to I_Caseentity              as _CaseEntity                 on  $projection.CaseID = _CaseEntity.CaseUniqueID

  // Case Types

  association [0..1] to I_Casetypes               as _CaseTypes                  on  $projection.CaseType = _CaseTypes.CaseType

  // Case Escalation Reason

  association [0..1] to I_CaseEscalationReason    as _Escalation                 on  $projection.CaseEscalationReason = _Escalation.CaseEscalationReason

  // Case Category

  association [0..1] to I_CaseCategory            as _CaseCategory               on  $projection.CaseCategory = _CaseCategory.CaseCategory
                                                                                 and $projection.CaseType     = _CaseCategory.CaseType

  // Case Priority

  association [0..1] to I_CasePriority            as _Priority                   on  $projection.CasePriority = _Priority.CasePriority

  // Case Authorization Level

  association [0..1] to I_Caseauthorizationlevel  as _AuthLevel                  on  $projection.CaseAuthorizationLevel = _AuthLevel.CaseAuthorizationLevel

  // Status Profile

  association [0..1] to I_CaseStatusProfile       as _StatProfile                on  $projection.CaseStatusProfile = _StatProfile.CaseStatusProfile

  // Case Status

  association [0..1] to I_Caseindividualstatus    as _Individual                 on  $projection.CaseStatus        = _Individual.CaseStatus
                                                                                 and $projection.CaseStatusProfile = _Individual.CaseStatusProfile

  // System Status

  association [0..1] to I_CaseSystemStatus        as _CaseSystemStatus           on  $projection.CaseSystemStatus = _CaseSystemStatus.CaseSystemStatus

  // Case Reason

  association [0..1] to I_CaseReasons             as _Reasons                    on  $projection.CaseReason = _Reasons.CaseReason
                                                                                 and $projection.CaseType   = _Reasons.CaseType

  // Draft Admin Table

  association [0..1] to I_DraftAdministrativeData as _DraftAdministrativeData    on  $projection.DraftAdministrativeDataUUID  = _DraftAdministrativeData.DraftUUID
                                                                                 and _DraftAdministrativeData.DraftEntityType = 'R_DISPUTECASETP'

{

      // VDM Fields

  key DisputeCaseUUID,
      _DisputeCaseDraft.DraftUUID                   as DraftUUID,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then DisputeCaseCoordinator
        else _DisputeCaseDraft.DisputeCaseCoordinator
      end                                           as DisputeCaseCoordinator,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then DisputeCaseRootCause
        else _DisputeCaseDraft.DisputeCaseRootCause
      end                                           as DisputeCaseRootCause,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseProcessingDeadlineDate
        else _DisputeCaseDraft.CaseProcessingDeadlineDate
      end                                           as CaseProcessingDeadlineDate,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then OriginalAmount
        else _DisputeCaseDraft.OriginalAmount
      end                                           as OriginalAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then DisputedAmount
        else _DisputeCaseDraft.DisputedAmount
      end                                           as DisputedAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then PaidAmount
        else _DisputeCaseDraft.PaidAmount
      end                                           as PaidAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CreditedAmount
        else _DisputeCaseDraft.CreditedAmount
      end                                           as CreditedAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then WriteOffAmount
        else _DisputeCaseDraft.WriteOffAmount
      end                                           as WriteOffAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ManuallyClearedAmount
        else _DisputeCaseDraft.ManuallyClearedAmount
      end                                           as ManuallyClearedAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then DisputeCaseCurrency
        else _DisputeCaseDraft.DisputeCaseCurrency
      end                                           as DisputeCaseCurrency,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPersonName
        else _DisputeCaseDraft.ContactPersonName
      end                                           as ContactPersonName,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPersonEmailAddress
        else _DisputeCaseDraft.ContactPersonEmailAddress
      end                                           as ContactPersonEmailAddress,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPersonPhoneNumber
        else _DisputeCaseDraft.ContactPersonPhoneNumber
      end                                           as ContactPersonPhoneNumber,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPersonFaxNumber
        else _DisputeCaseDraft.ContactPersonFaxNumber
      end                                           as ContactPersonFaxNumber,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPersonFaxCountry
        else _DisputeCaseDraft.ContactPersonFaxCountry
      end                                           as ContactPersonFaxCountry,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then ContactPerson
        else _DisputeCaseDraft.ContactPerson
      end                                           as ContactPerson,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then Customer
        else _DisputeCaseDraft.Customer
      end                                           as Customer,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CompanyCode
        else _DisputeCaseDraft.CompanyCode
      end                                           as CompanyCode,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then DisputeCaseExternalApplication
        else _DisputeCaseDraft.DisputeCaseExternalApplication
      end                                           as DisputeCaseExternalApplication,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseType
        else _DisputeCaseDraft.CaseType
      end                                           as CaseType,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseID
        else _DisputeCaseDraft.CaseID
      end                                           as CaseID,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseExternalReference
        else _DisputeCaseDraft.CaseExternalReference
      end                                           as CaseExternalReference,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseCreatedBy
        else _DisputeCaseDraft.CaseCreatedBy
      end                                           as CaseCreatedBy,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseCreatedOn
        else _DisputeCaseDraft.CaseCreatedOn
      end                                           as CaseCreatedOn,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseLastChangedBy
        else _DisputeCaseDraft.CaseLastChangedBy
      end                                           as CaseLastChangedBy,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseLastChangedOn
        else _DisputeCaseDraft.CaseLastChangedOn
      end                                           as CaseLastChangedOn,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseClosedBy
        else _DisputeCaseDraft.CaseClosedBy
      end                                           as CaseClosedBy,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseClosedTime
        else _DisputeCaseDraft.CaseClosedTime
      end                                           as CaseClosedTime,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CasePlannedCloseDate
        else _DisputeCaseDraft.CasePlannedCloseDate
      end                                           as CasePlannedCloseDate,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseProcessor
        else _DisputeCaseDraft.CaseProcessor
      end                                           as CaseProcessor,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseResponsible
        else _DisputeCaseDraft.CaseResponsible
      end                                           as CaseResponsible,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseTitle
        else _DisputeCaseDraft.CaseTitle
      end                                           as CaseTitle,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseEscalationReason
        else _DisputeCaseDraft.CaseEscalationReason
      end                                           as CaseEscalationReason,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseCategory
        else _DisputeCaseDraft.CaseCategory
      end                                           as CaseCategory,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CasePriority
        else _DisputeCaseDraft.CasePriority
      end                                           as CasePriority,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseAuthorizationLevel
        else _DisputeCaseDraft.CaseAuthorizationLevel
      end                                           as CaseAuthorizationLevel,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseStatusProfile
        else _DisputeCaseDraft.CaseStatusProfile
      end                                           as CaseStatusProfile,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseStatus
        else _DisputeCaseDraft.CaseStatus
      end                                           as CaseStatus,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseSystemStatus
        else _DisputeCaseDraft.CaseSystemStatus
      end                                           as CaseSystemStatus,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CaseReason
        else _DisputeCaseDraft.CaseReason
      end                                           as CaseReason,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CustomerDisputedAmount
        else _DisputeCaseDraft.CustomerDisputedAmount
      end                                           as CustomerDisputedAmount,

      case
        when _DisputeCaseDraft.DraftUUID is null
            then CustomerDisputedCurrency
        else _DisputeCaseDraft.CustomerDisputedCurrency
      end                                           as CustomerDisputedCurrency,

      cast( case
        when _DisputeCaseDraft.DraftUUID is null
            then 'X'
        else ''
      end as boolean )                              as IsActiveEntity,

      cast ( 'X'as boolean )                        as HasActiveEntity,

      cast( case
        when _DisputeCaseDraft.DraftUUID is null
            then 0
        else _DisputeCaseDraft.DraftCreationDateTime
      end as sdraft_created_at )                    as DraftCreationDateTime,

      cast( case
      when _DisputeCaseDraft.DraftUUID is null
          then 0
      else _DisputeCaseDraft.DraftLastChangedDateTime
      end as sdraft_last_changed_at )               as DraftLastChangedDateTime,

      _DisputeCaseDraft.DraftAdministrativeDataUUID as DraftAdministrativeDataUUID,

      // Exposed Associations

      _AuthLevel,
      _CaseSystemStatus,
      _CaseTypes,
      _CaseCategory,
      _ChangedByContactCard,
      _ClosedByContactCard,
      _CompanyCode,
      _Country,
      _CreatedByContactCard,
      _Customer,
      _DisputeCaseCoordinatorCard,
      _DisputeCaseExternalAppl,
      _Escalation,
      _Individual,
      _Priority,
      _ProcessorContactCard,
      _Reasons,
      _ResponsibleContactCard,
      _RootCause,
      _StatProfile,
      _DraftAdministrativeData

}

union all select from I_DisputeCaseDraft

// Draft Admin Table

association [0..1] to I_DraftAdministrativeData as _DraftAdministrativeData on  $projection.DraftAdministrativeDataUUID  = _DraftAdministrativeData.DraftUUID
                                                                            and _DraftAdministrativeData.DraftEntityType = 'R_DISPUTECASETP'

{
      // VDM Fields

  key DisputeCaseUUID,
      DraftUUID,
      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,
      HasActiveEntity,
      DraftCreationDateTime,
      DraftLastChangedDateTime,
      DraftAdministrativeDataUUID,

      // Exposed Associations

      _AuthLevel,
      _CaseSystemStatus,
      _CaseTypes,
      _CaseCategory,
      _ChangedByContactCard,
      _ClosedByContactCard,
      _CompanyCode,
      _Country,
      _CreatedByContactCard,
      _Customer,
      _DisputeCaseCoordinatorCard,
      _DisputeCaseExternalAppl,
      _Escalation,
      _Individual,
      _Priority,
      _ProcessorContactCard,
      _Reasons,
      _ResponsibleContactCard,
      _RootCause,
      _StatProfile,
      _DraftAdministrativeData

}
where
      HasActiveEntity                             <> 'X'
  and _DraftAdministrativeData.DraftIsCreatedByMe =  'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DISPUTECASEDRAFT",
"I_DRAFTADMINISTRATIVEDATA",
"R_DISPUTECASE"
],
"ASSOCIATED":
[
"I_CASEAUTHORIZATIONLEVEL",
"I_CASECATEGORY",
"I_CASEENTITY",
"I_CASEESCALATIONREASON",
"I_CASEINDIVIDUALSTATUS",
"I_CASEPRIORITY",
"I_CASEREASONS",
"I_CASESTATUSPROFILE",
"I_CASESYSTEMSTATUS",
"I_CASETYPES",
"I_COMPANYCODE",
"I_COUNTRY",
"I_CUSTOMER",
"I_DISPUTECASEDRAFT",
"I_DISPUTECASEEXTERNALAPPL",
"I_DRAFTADMINISTRATIVEDATA",
"I_ROOTCAUSE",
"I_USERCONTACTCARD"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/