C_ReturnsReferenceInvoice
Customer Return Reference Invoice
C_ReturnsReferenceInvoice is a Consumption CDS View that provides data about "Customer Return Reference Invoice" in SAP S/4HANA. It reads from 1 data source (I_BillingDocumentBasic) and exposes 11 fields with key field BillingDocument. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocumentBasic | ReferenceDocument | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_BillingDocument | _BillingDocument | $projection.BillingDocument = _BillingDocument.BillingDocument |
| [0..*] | C_ReturnsReferenceInvoiceItem | _ReferenceDocumentItem | $projection.BillingDocument = _ReferenceDocumentItem.ReferenceDocument |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Customer Return Reference Invoice | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view | |
| ObjectModel.representativeKey | BillingDocument | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.modelingPattern | #NONE | view | |
| Search.searchable | true | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillingDocument | |||
| BillingDocumentType | I_BillingDocumentBasic | BillingDocumentType | ||
| SoldToParty | SoldToParty | |||
| CustomerName | ||||
| TotalNetAmount | TotalNetAmount | |||
| TransactionCurrency | TransactionCurrency | |||
| _BillingDocument | _BillingDocument | |||
| SalesOrganization | I_BillingDocumentBasic | SalesOrganization | ||
| DistributionChannel | I_BillingDocumentBasic | DistributionChannel | ||
| Division | I_BillingDocumentBasic | Division | ||
| _ReferenceDocumentItem | _ReferenceDocumentItem |
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Customer Return Reference Invoice'
@Metadata:
{
ignorePropagatedAnnotations: true,
allowExtensions: true
}
@ObjectModel: {
representativeKey: 'BillingDocument',
usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL
},
supportedCapabilities: [ #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE ],
modelingPattern: #NONE
}
@Search.searchable: true
define view entity C_ReturnsReferenceInvoice as select from I_BillingDocumentBasic as ReferenceDocument
association [0..1] to I_BillingDocument as _BillingDocument on $projection.BillingDocument = _BillingDocument.BillingDocument
association [0..*] to C_ReturnsReferenceInvoiceItem as _ReferenceDocumentItem on $projection.BillingDocument = _ReferenceDocumentItem.ReferenceDocument
{
@UI.fieldGroup: [{qualifier: 'ReferenceDocInfor1', position: 10, importance: #HIGH}]
@Search.defaultSearchElement: true
key cast(ReferenceDocument.BillingDocument as vdm_invoice preserving type ) as BillingDocument,
ReferenceDocument.BillingDocumentType,
//Solt-To Party
@ObjectModel.text.element: [ 'CustomerName' ]
@UI.textArrangement: #TEXT_FIRST
@UI.fieldGroup: [{qualifier: 'ReferenceDocInfor2', position: 10, importance: #HIGH}]
SoldToParty,
@UI.hidden: true
_BillingDocument._SoldToParty.CustomerName,
//Total Amount
@Semantics.amount.currencyCode: 'TransactionCurrency'
@UI.fieldGroup: [{qualifier: 'ReferenceDocInfor3', position: 10, importance: #HIGH}]
TotalNetAmount,
TransactionCurrency,
//ACL
@Consumption.hidden:true
_BillingDocument,
@Consumption.hidden:true
ReferenceDocument.SalesOrganization,
@Consumption.hidden:true
ReferenceDocument.DistributionChannel,
@Consumption.hidden:true
ReferenceDocument.Division,
// Association
_ReferenceDocumentItem
}
where
ReferenceDocument.SDDocumentCategory = 'M'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENT",
"I_BILLINGDOCUMENTBASIC",
"I_CUSTOMER"
],
"ASSOCIATED":
[
"C_RETURNSREFERENCEINVOICEITEM",
"I_BILLINGDOCUMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA