@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
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_BILLINGDOCUMENTTYPE",
"I_BILLINGDOCUMENTTYPETEXT",
"I_CUSTOMER",
"I_INVOICELIST",
"I_INVOICELISTREMUNERATION"
],
"ASSOCIATED":
[
"C_INVOICELISTITEMOBJPG",
"I_ACCOUNTINGTRANSFERSTATUS",
"I_BILLINGDOCUMENTBASIC",
"I_BILLINGDOCUMENTTYPE",
"I_COMPANYCODE",
"I_CURRENCY",
"I_CUSTOMER",
"I_INVOICELISTREMUNERATION",
"I_SALESORGANIZATION"
],
"BASE":
[
"I_INVOICELIST"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_InvoiceListWorklist view