I_BillingDocEnhancedFields

DDL: I_BILLINGDOCENHANCEDFIELDS Type: view COMPOSITE

Billing Document Enhanced Fields

I_BillingDocEnhancedFields is a Composite CDS View that provides data about "Billing Document Enhanced Fields" in SAP S/4HANA. It reads from 1 data source (I_BillingDocument) and exposes 6 fields with key field BillingDocument.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocument BillingDocument from

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Billing Document Enhanced Fields view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ISDBILDOCENHFLD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #COMPOSITE view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument I_BillingDocument BillingDocument
TransactionCurrency I_BillingDocument TransactionCurrency
TotalGrossAmount
BillToParty _BillToPartner Customer Bill-to Party
_BillToParty _BillToParty
_BillingDocument _BillingDocument
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Billing Document Enhanced Fields'
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog: {
  sqlViewName: 'ISDBILDOCENHFLD',
  compiler.compareFilter: true,
  preserveKey: true
}
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #L
   }
}
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@VDM.viewType: #COMPOSITE

define view I_BillingDocEnhancedFields as select from I_BillingDocument as BillingDocument 
   
  association[1..1] to I_BillingDocument        as _BillingDocument          on  $projection.BillingDocument  = _BillingDocument.BillingDocument
  association[0..1] to I_Customer               as _BillToParty              on  $projection.BillToParty      = _BillToParty.Customer
  association[0..1] to I_BillingDocumentPartner as _BillToPartner            on  $projection.BillingDocument  = _BillToPartner.BillingDocument and 
                                                                                 PartnerFunction = 'RE'
  
{

  key BillingDocument.BillingDocument,
  
  @Semantics.currencyCode:true
  BillingDocument.TransactionCurrency as TransactionCurrency,
  
  @DefaultAggregation: #NONE
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  cast( BillingDocument.TotalTaxAmount + BillingDocument.TotalNetAmount as sdci_odata_total_amount ) as TotalGrossAmount,
  
  @ObjectModel.foreignKey.association: '_BillToParty'
  @EndUserText.label: 'Bill-to Party'
  _BillToPartner.Customer as BillToParty,
  // CAST not allowed since the field is used as search relevant field in the Enterprise Search => Label is defined as EndUserText.label annotation   

  //cast( _BillToPartner.Customer as kunre preserving type ) as BillToParty,  

  
  _BillToParty,
  _BillingDocument
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENT",
"I_BILLINGDOCUMENTPARTNER"
],
"ASSOCIATED":
[
"I_BILLINGDOCUMENT",
"I_BILLINGDOCUMENTPARTNER",
"I_CUSTOMER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/