C_ReturnsReferenceInvoiceVH

DDL: C_RETURNSREFERENCEINVOICEVH Type: view_entity CONSUMPTION Package: ODATA_SD_RETURN_V2

Customer Return Reference Invoice

C_ReturnsReferenceInvoiceVH is a Consumption CDS View that provides data about "Customer Return Reference Invoice" in SAP S/4HANA. It reads from 1 data source (I_BillingDocument) and exposes 17 fields with key field BillingDocument. It has 2 associations to related views. It is exposed through 1 OData service (UI_CUSTOMERRETURNMANAGE). Part of development package ODATA_SD_RETURN_V2.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocument BillingDocument from

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_OverallBillingStatusText _OverallBillingStatusText $projection.OverallBillingStatus = _OverallBillingStatusText.OverallBillingStatus
[0..1] C_SalesOrganizationVH _SalesOrganization $projection.SalesOrganization = _SalesOrganization.SalesOrganization

Annotations (11)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Customer Return Reference Invoice view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.representativeKey BillingDocument view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Search.searchable true view
Consumption.ranked true view

OData Services (1)

ServiceBindingVersionContractRelease
UI_CUSTOMERRETURNMANAGE UI_CUSTOMERRETURNMANAGE V4 C1 NOT_RELEASED

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument
BillingDocumentType I_BillingDocument BillingDocumentType
SoldToParty I_BillingDocument SoldToParty
SoldToPartyName
PayerParty I_BillingDocument PayerParty
PayerPartyName
PurchaseOrderByCustomer I_BillingDocument PurchaseOrderByCustomer
BillingDocumentDate I_BillingDocument BillingDocumentDate
OverallBillingStatus
OverallBillingStatusDesc
SalesOrganization I_BillingDocument SalesOrganization
DistributionChannel I_BillingDocument DistributionChannel
Division I_BillingDocument Division
_BillingDocumentType _BillingDocumentType
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_Division _Division
@VDM.viewType: #CONSUMPTION
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@EndUserText.label: 'Customer Return Reference Invoice'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
dataCategory: #VALUE_HELP,
representativeKey:'BillingDocument',
usageType:{
  serviceQuality: #C,
  sizeCategory: #L,
  dataClass: #TRANSACTIONAL
}
}
@Search.searchable: true
@Consumption.ranked: true
@UI.presentationVariant: [{
  sortOrder: [{
    by: 'BillingDocument',
    direction: #DESC
  }]
}]
define view entity C_ReturnsReferenceInvoiceVH   as select from I_BillingDocument as BillingDocument

  association [0..*] to I_OverallBillingStatusText as _OverallBillingStatusText on $projection.OverallBillingStatus = _OverallBillingStatusText.OverallBillingStatus
  association [0..1] to C_SalesOrganizationVH      as _SalesOrganization on $projection.SalesOrganization = _SalesOrganization.SalesOrganization
{
      @UI: {
        lineItem: [{ position: 10,  importance: #HIGH }],
        selectionField: [{ position: 10 }]
      }
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold: 0.9,
        ranking: #HIGH
      }
  key cast(BillingDocument.BillingDocument as vdm_invoice preserving type) as BillingDocument,

    
      @UI: {
        selectionField: [{ position: 20 }],
        textArrangement: #TEXT_FIRST,
        lineItem: [{ position: 20, importance: #HIGH }]
      }
      @ObjectModel.foreignKey.association: '_BillingDocumentType'  
      @Consumption.valueHelpDefinition: [{ 
        association: '_BillingDocumentType' 
      }]
      BillingDocument.BillingDocumentType,
      
      @UI.textArrangement: #TEXT_FIRST
      @Consumption: {
        valueHelpDefinition: [{ entity: { name: 'D_SlsDocSoldToPartyCVH',
        element: 'Customer' } }]
      }
      @ObjectModel.text.element: ['SoldToPartyName']
      BillingDocument.SoldToParty,
      @Semantics.text: true
      @UI.hidden: true
      cast (BillingDocument._SoldToParty.CustomerName as ad_namtext)         as SoldToPartyName,

      @UI: {
      lineItem: [{ position: 30,  importance: #HIGH }],
      selectionField: [{ position: 30 }],
      textArrangement: #TEXT_FIRST
      }
      @Consumption.valueHelpDefinition:[{
        entity: { name: 'C_CustomerSalesAreaVH',
                  element: 'Customer' },
        label: 'Payer'
      }]
      @ObjectModel.text.element: ['PayerPartyName']
      BillingDocument.PayerParty,

      @Semantics.text: true
      @UI.hidden: true
      BillingDocument._PayerParty.CustomerName as PayerPartyName,


      @UI: {
      selectionField: [{ position: 40 }],
      lineItem: [{ position: 40,  importance: #HIGH }]
      }
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold: 0.9,
        ranking: #MEDIUM
      }
      BillingDocument.PurchaseOrderByCustomer,
      @UI: {
        lineItem: [{ position: 50,  importance: #HIGH }],
        selectionField: [{ position: 50 }]
      }
      @Consumption.filter: {
        selectionType: #INTERVAL
      }
      BillingDocument.BillingDocumentDate,
      @UI: {
      lineItem: [{ position: 60,  importance: #HIGH }],
      selectionField: [{ position: 60 }],
      textArrangement: #TEXT_ONLY
      }
      @Consumption.valueHelpDefinition: [{
        entity: {
          name: 'I_OverallBillingStatus',
          element: 'OverallBillingStatus'
        }
      }]
      @ObjectModel.text.element: ['OverallBillingStatusDesc']
      cast(BillingDocument.OverallBillingStatus as billing_document_status preserving type ) as OverallBillingStatus,


      @UI.hidden: true
      @Semantics.text: true
      _OverallBillingStatusText[1: Language=$session.system_language].OverallBillingStatusDesc,

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      @Consumption.valueHelpDefinition: [{ 
        association: '_SalesOrganization' 
      }]
      @UI.textArrangement: #TEXT_FIRST
      BillingDocument.SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      @UI.textArrangement: #TEXT_FIRST
      @Consumption.valueHelpDefinition: [{ 
        association: '_DistributionChannel' 
      }]
      BillingDocument.DistributionChannel,
      @UI.textArrangement: #TEXT_FIRST
      @ObjectModel.foreignKey.association: '_Division'
      @Consumption.valueHelpDefinition: [{ 
        association: '_Division' 
      }]
      BillingDocument.Division,

     //association

      _BillingDocumentType,
      _SalesOrganization,
      _DistributionChannel,
      _Division

}
where
      BillingDocument.SDDocumentCategory     = 'M'