I_CAPostingReasonText

DDL: I_CAPOSTINGREASONTEXT Type: view_entity COMPOSITE

Document Posting Reason - Text

I_CAPostingReasonText is a Composite CDS View that provides data about "Document Posting Reason - Text" in SAP S/4HANA. It reads from 4 data sources (I_CAAdjustmentRequestReasonT, I_CAReversalReasonText, I_CATransferReasonText, I_CAWriteOffReasonText) and exposes 21 fields with key fields CADocumentOriginCode, CAPostingReason, Language, CAPostingReason, Language. It has 2 associations to related views.

Data Sources (4)

SourceAliasJoin Type
I_CAAdjustmentRequestReasonT AdjustmentRequestReasonText union
I_CAReversalReasonText ReversalReasonText union
I_CATransferReasonText TransferReasonText union
I_CAWriteOffReasonText WriteOffReasonText from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_CADocumentOriginCode _DocOriginCode $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
[0..1] I_Language _Language $projection.Language = _Language.Language

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Document Posting Reason - Text view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.dataCategory #TEXT view
ObjectModel.modelingPattern #LANGUAGE_DEPENDENT_TEXT view
ObjectModel.representativeKey CAPostingReason view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
VDM.viewType #COMPOSITE view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CADocumentOriginCode DocOriginCode CADocumentOriginCode
KEY CAPostingReason
KEY Language I_CAWriteOffReasonText Language
CAPostingReasonName
_DocOriginCode _DocOriginCode
CADocumentOriginCode
KEY CAPostingReason
KEY Language I_CATransferReasonText Language
CAPostingReasonName
_DocOriginCode _DocOriginCode
CADocumentOriginCode
KEY CAPostingReason
KEY Language I_CAAdjustmentRequestReasonT Language
CAPostingReasonName
_DocOriginCode _DocOriginCode
CADocumentOriginCode
KEY CAPostingReason
KEY Language I_CAReversalReasonText Language
CAPostingReasonName
_DocOriginCode _DocOriginCode
_Language _Language
@AccessControl.authorizationCheck: #MANDATORY

@EndUserText.label: 'Document Posting Reason - Text'

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel: { dataCategory: #TEXT,
                modelingPattern: #LANGUAGE_DEPENDENT_TEXT,
                representativeKey: 'CAPostingReason',
                supportedCapabilities: [ #CDS_MODELING_ASSOCIATION_TARGET,
                                         #CDS_MODELING_DATA_SOURCE,
                                         #LANGUAGE_DEPENDENT_TEXT,
                                         #SQL_DATA_SOURCE ],
                usageType: { dataClass: #CUSTOMIZING,
                             serviceQuality: #C,
                             sizeCategory: #S } }

@VDM.viewType: #COMPOSITE

define view entity I_CAPostingReasonText
  as select from I_CAWriteOffReasonText as WriteOffReasonText
    join         I_CADocumentOriginCode as DocOriginCode on DocOriginCode.CADocumentOriginCode = '16'
                                                         or DocOriginCode.CADocumentOriginCode = '17'
                                                         or DocOriginCode.CADocumentOriginCode = '53'
                                                         or DocOriginCode.CADocumentOriginCode = '74'
                                                         or DocOriginCode.CADocumentOriginCode = '2W'
  association [1..1] to I_CADocumentOriginCode as _DocOriginCode on $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
  association [0..1] to I_Language             as _Language      on $projection.Language = _Language.Language
{
      @ObjectModel.foreignKey.association: '_DocOriginCode'
  key DocOriginCode.CADocumentOriginCode,
  key cast( WriteOffReasonText.CAWriteOffReason as bugrd_kk preserving type )     as CAPostingReason,
      @Semantics.language: true
      @ObjectModel.foreignKey.association: '_Language'
  key WriteOffReasonText.Language,
      @Semantics.text
      cast( WriteOffReasonText.CAWriteOffReasonName as potxt_kk preserving type ) as CAPostingReasonName,

      _DocOriginCode,
      _Language
}

union select from I_CATransferReasonText as TransferReasonText
  join            I_CADocumentOriginCode as DocOriginCode on DocOriginCode.CADocumentOriginCode = '34'
                                                          or DocOriginCode.CADocumentOriginCode = '54'
  association [1..1] to I_CADocumentOriginCode as _DocOriginCode on $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
  association [0..1] to I_Language             as _Language      on $projection.Language = _Language.Language
{
  key DocOriginCode.CADocumentOriginCode,
  key cast( TransferReasonText.CATransferReason as bugrd_kk preserving type )     as CAPostingReason,
  key TransferReasonText.Language,
      cast( TransferReasonText.CATransferReasonName as potxt_kk preserving type ) as CAPostingReasonName,

      _DocOriginCode,
      _Language
}

union select from I_CAAdjustmentRequestReasonT as AdjustmentRequestReasonText
  join            I_CADocumentOriginCode       as DocOriginCode on DocOriginCode.CADocumentOriginCode = 'A1'
                                                                or DocOriginCode.CADocumentOriginCode = 'A2'
  association [1..1] to I_CADocumentOriginCode as _DocOriginCode on $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
  association [0..1] to I_Language             as _Language      on $projection.Language = _Language.Language
{
  key DocOriginCode.CADocumentOriginCode,
  key cast( AdjustmentRequestReasonText.CAAdjustmentRequestReason as bugrd_kk preserving type )     as CAPostingReason,
  key AdjustmentRequestReasonText.Language,
      cast( AdjustmentRequestReasonText.CAAdjustmentRequestReasonName as potxt_kk preserving type ) as CAPostingReasonName,

      _DocOriginCode,
      _Language
}

union select from I_CAReversalReasonText as ReversalReasonText
  join            I_CADocumentOriginCode as DocOriginCode on DocOriginCode.CADocumentOriginCode = '02'
                                                          or DocOriginCode.CADocumentOriginCode = '1S'
                                                          or DocOriginCode.CADocumentOriginCode = '49'
                                                          or DocOriginCode.CADocumentOriginCode = '4S'
                                                          or DocOriginCode.CADocumentOriginCode = 'S7'
                                                          or DocOriginCode.CADocumentOriginCode = 'S9'
                                                          or DocOriginCode.CADocumentOriginCode = '71'
                                                          or DocOriginCode.CADocumentOriginCode = '78'
  association [1..1] to I_CADocumentOriginCode as _DocOriginCode on $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
  association [0..1] to I_Language             as _Language      on $projection.Language = _Language.Language
{
  key DocOriginCode.CADocumentOriginCode,
  key cast( ReversalReasonText.CAReversalReason as bugrd_kk preserving type ) as CAPostingReason,
  key ReversalReasonText.Language,
      cast( ReversalReasonText.CAReversalReasonText as potxt_kk )             as CAPostingReasonName,

      _DocOriginCode,
      _Language
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CAADJUSTMENTREQUESTREASONT",
"I_CADOCUMENTORIGINCODE",
"I_CAREVERSALREASONTEXT",
"I_CATRANSFERREASONTEXT",
"I_CAWRITEOFFREASONTEXT"
],
"ASSOCIATED":
[
"I_CADOCUMENTORIGINCODE",
"I_LANGUAGE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/