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.
@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 filtergroupdefineview C_InvoiceListWorklist
asselectfrom 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 viewassociation [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 isnot annotated asdefault search element
// (reason: it is a calculated field which isnot supported by HANA for a contains search)
// Thus OrganizationBPName1 and OrganizationBPName2 are included in our consumption view// and are defined asdefault 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
}