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.
@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: #COMPOSITEdefineviewentity I_CAPostingReasonText
asselectfrom 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,
keycast( WriteOffReasonText.CAWriteOffReason as bugrd_kk preserving type ) as CAPostingReason,
@Semantics.language: true@ObjectModel.foreignKey.association: '_Language'
key WriteOffReasonText.Language,
@Semantics.textcast( WriteOffReasonText.CAWriteOffReasonName as potxt_kk preserving type ) as CAPostingReasonName,
_DocOriginCode,
_Language
}
unionselectfrom 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,
keycast( TransferReasonText.CATransferReason as bugrd_kk preserving type ) as CAPostingReason,
key TransferReasonText.Language,
cast( TransferReasonText.CATransferReasonName as potxt_kk preserving type ) as CAPostingReasonName,
_DocOriginCode,
_Language
}
unionselectfrom 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,
keycast( AdjustmentRequestReasonText.CAAdjustmentRequestReason as bugrd_kk preserving type ) as CAPostingReason,
key AdjustmentRequestReasonText.Language,
cast( AdjustmentRequestReasonText.CAAdjustmentRequestReasonName as potxt_kk preserving type ) as CAPostingReasonName,
_DocOriginCode,
_Language
}
unionselectfrom 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,
keycast( 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":""
}
}*/