C_InvoiceListWorklist

DDL: C_INVOICELISTWORKLIST Type: view CONSUMPTION

Invoice List

C_InvoiceListWorklist is a Consumption CDS View that provides data about "Invoice List" in SAP S/4HANA. It reads from 1 data source (I_InvoiceList) and exposes 26 fields with key field InvoiceList. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_InvoiceList InvoiceList from

Associations (3)

CardinalityTargetAliasCondition
[0..*] C_InvoiceListItemObjPg _Item $projection.InvoiceList = _Item.InvoiceList
[0..1] I_BillingDocumentType _BillingDocumentType $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
[0..1] I_InvoiceListRemuneration _InvoiceListRemuneration $projection.InvoiceList = _InvoiceListRemuneration.InvoiceList

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CINVLISTWL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view
ObjectModel.compositionRoot true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
Search.searchable true view
EndUserText.label Invoice List view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY InvoiceList I_InvoiceList InvoiceList
PayerParty I_InvoiceList PayerParty
PayerPartyName
PayerPartyAdditionalName
BillingDocumentDate I_InvoiceList BillingDocumentDate
TotalNetAmount I_InvoiceList TotalNetAmount
TotalTaxAmount I_InvoiceList TotalTaxAmount
TransactionCurrency I_InvoiceList TransactionCurrency
CompanyCode I_InvoiceList CompanyCode
SalesOrganization I_InvoiceList SalesOrganization
DocumentReferenceID I_InvoiceList DocumentReferenceID
CancelledBillingDocument I_InvoiceList CancelledBillingDocument
AccountingTransferStatus I_InvoiceList AccountingTransferStatus
BillingDocumentType
TotalRemunerationNetAmount _InvoiceListRemuneration TotalRemunerationNetAmount
TotalRemunerationTaxAmount _InvoiceListRemuneration TotalRemunerationTaxAmount
TotalGrossAmount
BillingDocumentTypeName
_PayerParty I_InvoiceList _PayerParty
_BillingDocumentType _BillingDocumentType
_Item _Item
_SalesOrganization I_InvoiceList _SalesOrganization
_CompanyCode I_InvoiceList _CompanyCode
_TransactionCurrency I_InvoiceList _TransactionCurrency
_AccountingTransferStatus I_InvoiceList _AccountingTransferStatus
_CancelledBillingDocumentBasic I_InvoiceList _CancelledBillingDocumentBasic
@AbapCatalog: { 
  sqlViewName: 'CINVLISTWL',
  compiler.compareFilter: true,
  preserveKey: true
}
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION

@Metadata.allowExtensions: true

@ObjectModel: {
  compositionRoot: true,
  semanticKey:     ['InvoiceList'],
  usageType: { 
    serviceQuality: #C, 
    sizeCategory: #L,
    dataClass: #MIXED
   }    
}

@Search.searchable: true

@EndUserText.label: 'Invoice List' // Required for the name of the filter group

define view C_InvoiceListWorklist
  as select from I_InvoiceList as InvoiceList

  // Items are required for the CoPilot Quick View

  // Three options exist:

  // (1) new worklist specific CDS view for the items with corresponding QuickView annotations

  // (2) refer to the existing CoPilot enabled item object page CDS view (HACK) <---- selected option 

  // (3) don't show the items in the quick view   

  association [0..*] to C_InvoiceListItemObjPg     as _Item            on $projection.InvoiceList = _Item.InvoiceList
  
  
  association [0..1] to I_BillingDocumentType     as _BillingDocumentType      on $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
  association [0..1] to I_InvoiceListRemuneration as _InvoiceListRemuneration  on $projection.InvoiceList = _InvoiceListRemuneration.InvoiceList    
{
      @Search:            { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
  key InvoiceList.InvoiceList,

      @Search:            { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.95 }
    
      InvoiceList.PayerParty,
      
      
            
      // Workaround: 

      // CustomerName in I_Customer is not annotated as default search element

      // (reason: it is a calculated field which is not supported by HANA for a contains search)

      // Thus OrganizationBPName1 and OrganizationBPName2 are included in our consumption view

      // and are defined as default search elements (beside the PayerParty itself)  

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      InvoiceList._PayerParty.OrganizationBPName1 as PayerPartyName,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      InvoiceList._PayerParty.OrganizationBPName2 as PayerPartyAdditionalName,      
      
      @Semantics.businessDate.at: true
      InvoiceList.BillingDocumentDate, 
      
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      InvoiceList.TotalNetAmount,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      InvoiceList.TotalTaxAmount,      
      InvoiceList.TransactionCurrency,

      InvoiceList.CompanyCode,
      InvoiceList.SalesOrganization,
      InvoiceList.DocumentReferenceID,       
      InvoiceList.CancelledBillingDocument,
      
      InvoiceList.AccountingTransferStatus,
      
      // Label in the UI: Billing Type => cast to fkart

      @ObjectModel.foreignKey.association: '_BillingDocumentType'        
      cast (InvoiceList.BillingDocumentType as fkart) as BillingDocumentType,
      
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      _InvoiceListRemuneration.TotalRemunerationNetAmount,
      
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      _InvoiceListRemuneration.TotalRemunerationTaxAmount,
      
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      cast( TotalTaxAmount + TotalNetAmount + _InvoiceListRemuneration.TotalRemunerationNetAmount + _InvoiceListRemuneration.TotalRemunerationTaxAmount  as sum_rl) as TotalGrossAmount,      

      InvoiceList._BillingDocumentType._Text[1: Language = $session.system_language ].BillingDocumentTypeName                                                       as BillingDocumentTypeName,
      
      @Search.defaultSearchElement: false
      InvoiceList._PayerParty,
      @Search.defaultSearchElement: false
      _BillingDocumentType,
      _Item,
      @Search.defaultSearchElement: false
      InvoiceList._SalesOrganization,
      @Search.defaultSearchElement: false
      InvoiceList._CompanyCode,
      @Search.defaultSearchElement: false
      InvoiceList._TransactionCurrency,
      @Search.defaultSearchElement: false
      InvoiceList._AccountingTransferStatus,
      @Search.defaultSearchElement: false
      InvoiceList._CancelledBillingDocumentBasic
      
}