I_CAPostingReason

DDL: I_CAPOSTINGREASON Type: view_entity COMPOSITE

Document Posting Reason

I_CAPostingReason (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Contract Accounting Posting Reason · Contract Accounting

I_CAPostingReason is a Composite CDS View that provides data about "Document Posting Reason" in SAP S/4HANA. It reads from 4 data sources (I_CAAdjustmentRequestReason, I_CAReversalReason, I_CATransferReason, I_CAWriteOffReason) and exposes 13 fields with key fields CADocumentOriginCode, CAPostingReason, CAPostingReason, CAPostingReason, CAPostingReason. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Configuration Data
Purpose
This CDS view retrieves posting reasons indicating a reason for the posting of a Contract Accounting document. Depending on the document origin the posting reason is the reversal reason, write-off reason, transfer reason or adjustment request reason. Example Wrong Posting (in case of a reversal), Insignificance (in case of a write-off), Transfer of Incorrectly Posted Payment on Account This CDS view provides the data to answer the business question: Which posting reason values are available in the system? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Configuration You define write-off reasons in the Define Write-Off Reasons Customizing activity. You define transfer reasons in the Define Transfer Reasons Customizing activity. You define reversal reasons in the Define Reason for Reversal Customizing activity.

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessContract Accounting
Application ComponentFI-CA
CapabilitiesAssociation Target for Defining CDS Entities, Data Source in SQL Select, Data Source for Defining CDS Entities
PackageContract Accounting for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view retrieves posting reasons indicating a reason for the posting of a Contract Accounting document. Depending on the document origin the posting reason is the reversal reason, write-off reason, transfer reason or adjustment request reason.</p> Example <p>Wrong Posting (in case of a reversal), Insignificance (in case of a write-off), Transfer of Incorrectly Posted Payment on Account</p> <p>This CDS view provides the data to answer the business question: Which posting reason values are available in the system?</p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (4)

SourceAliasJoin Type
I_CAAdjustmentRequestReason AdjustmentRequestReason union
I_CAReversalReason ReversalReason union
I_CATransferReason TransferReason union
I_CAWriteOffReason WriteOffReason from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_CADocumentOriginCode _DocOriginCode $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
[0..*] I_CAPostingReasonText _Text $projection.CAPostingReason = _Text.CAPostingReason

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Document Posting Reason view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view
ObjectModel.representativeKey CAPostingReason view
ObjectModel.sapObjectNodeType.name ContrAcctgPostingReason view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
VDM.viewType #COMPOSITE view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY CADocumentOriginCode DocOriginCode CADocumentOriginCode Document Origin Key
KEY CAPostingReason Posting Reason (For Write-Offs And Transfer Postings)
_DocOriginCode _DocOriginCode
CADocumentOriginCode Document Origin Key
KEY CAPostingReason Posting Reason (For Write-Offs And Transfer Postings)
_DocOriginCode _DocOriginCode
CADocumentOriginCode Document Origin Key
KEY CAPostingReason Posting Reason (For Write-Offs And Transfer Postings)
_DocOriginCode _DocOriginCode
CADocumentOriginCode Document Origin Key
KEY CAPostingReason Posting Reason (For Write-Offs And Transfer Postings)
_DocOriginCode _DocOriginCode
_Text _Text

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 I_CAPostingReason.
-- 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 I_CAPostingReason AS
SELECT
  DocOriginCode.CADocumentOriginCode AS CADocumentOriginCode,
  cast( WriteOffReason.CAWriteOffReason as bugrd_kk preserving type ) AS CAPostingReason
FROM I_CAWriteOffReason AS WriteOffReason
LEFT OUTER JOIN I_CADocumentOriginCode AS _DocOriginCode ON CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode  -- association [1..1]
LEFT OUTER JOIN I_CAPostingReasonText AS _Text ON CAPostingReason = _Text.CAPostingReason  -- association [0..*]
-- UNION with additional select branch(es): I_CATransferReason, I_CAAdjustmentRequestReason, I_CAReversalReason
;