@AbapCatalog.sqlViewName: 'CCAINVOVWBLLRQ'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Abrechnungsauftragkopf'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel:{
usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #MIXED
},
semanticKey: ['CABillgReqDocument']
}
@UI:{
headerInfo:{
typeName: 'Abrechnungsauftrag',
typeNamePlural: 'Abrechnungsaufträge'
},
presentationVariant.sortOrder: { by: 'CABillgReqCreationDateTime', direction: #DESC }
}
define view C_CAInvcgOvwBillgReq
as select from I_CABillgReqDocHeader as _CABillgReqDocHeader
association [0..1] to I_ContractAccountPartner as _ContractAccountPartner on $projection.ContractAccount = _ContractAccountPartner.ContractAccount
and $projection.BusinessPartner = _ContractAccountPartner.BusinessPartner
{
//billreqno
// @UI.lineItem: { position: 20, importance: #HIGH}
@UI.lineItem: { position: 10, importance: #HIGH, semanticObjectAction: 'display'}
@Consumption.semanticObject: 'CABillgReqDocument'
key _CABillgReqDocHeader.CABillgReqDocument,
// billreqstatus
@UI.lineItem: { position: 10, importance: #HIGH}
// @ObjectModel.foreignKey.association: '_CABillgReqStatus'
@ObjectModel.text.element: 'CABillgReqStatusText'
_CABillgReqDocHeader.CABillgReqStatus,
@UI.hidden: true
_CABillgReqStatus._CABillgReqStatusText[1: Language=$session.system_language].CABillgReqStatusText,
// billreqcat
@UI.lineItem: { position: 30, importance: #HIGH}
@ObjectModel.text.element: 'CABillgReqCategoryText'
_CABillgReqDocHeader.CABillgReqCategory,
@UI.hidden: true
_CABillgReqCategory._CABillgReqCategoryText[1: Language=$session.system_language].CABillgReqCategoryText,
// billreqtype
@UI.lineItem: { position: 40, importance: #HIGH}
@ObjectModel.text.element: 'CABillgReqTypeText'
_CABillgReqDocHeader.CABillgReqType,
@UI.hidden: true
_CABillgReqType._CABillgReqTypeText[1: Language=$session.system_language].CABillgReqTypeText,
// billreqrsn
@UI.lineItem: { position: 50, importance: #HIGH}
@ObjectModel.text.element: 'CABillgReqReasonText'
_CABillgReqDocHeader.CABillgReqReason,
@UI.hidden: true
_CABillgReqReason._CABillgReqReasonText[1: Language=$session.system_language].CABillgReqReasonText,
// billreq_total_amt
@UI.lineItem: { position: 60, importance: #HIGH}
_CABillgReqDocHeader.CABillgReqTotalAmount,
// billreq_total_curr
// @UI.lineItem: { position: 80, importance: #HIGH}
_CABillgReqDocHeader.CABillgReqTotalAmountCurrency,
// crname
@UI.lineItem: { position: 70, importance: #HIGH}
_CABillgReqDocHeader.CABillgReqCreationUser,
// crdate
@Consumption.hidden: true
//@UI.lineItem: { position: 80, importance: #HIGH}
_CABillgReqDocHeader.CABillgReqCreationDate,
// crtime
@Consumption.hidden: true
_CABillgReqDocHeader.CABillgReqCreationTime,
//combined field of crdate and crtime
@UI.lineItem: { position: 80, importance: #HIGH}
@Consumption.filter.selectionType: #INTERVAL
@ObjectModel.filter.transformedBy: 'ABAP:CL_CINV_SADL_FILTER_DATETIME'
cast(dats_tims_to_tstmp(_CABillgReqDocHeader.CABillgReqCreationDate, _CABillgReqDocHeader.CABillgReqCreationTime,
abap_system_timezone($session.client, 'NULL'),
$session.client, 'NULL') as crtimestamp_kk) as CABillgReqCreationDateTime,
// Hidden fields
// billreq_descr
_CABillgReqDocHeader.CABillgReqDescription,
// applk
_CABillgReqDocHeader.CAApplicationArea,
// vkont
@Consumption.semanticObject: 'ContractAccount'
_CABillgReqDocHeader.ContractAccount,
// gpart
@Consumption.semanticObject: 'CAContractPartner'
_CABillgReqDocHeader.BusinessPartner,
// inv_ref
_CABillgReqDocHeader.CAInvoicingDocument,
// chname
_CABillgReqDocHeader.CABillgReqChangeUser,
// chdate
@Consumption.hidden: true
_CABillgReqDocHeader.CABillgReqChangeDate,
// chtime
@Consumption.hidden: true
_CABillgReqDocHeader.CABillgReqChangeTime,
//combined field of CHDATE and CHTIME
@Consumption.filter.selectionType: #INTERVAL
@ObjectModel.filter.transformedBy: 'ABAP:CL_CINV_SADL_FILTER_DATETIME'
cast(dats_tims_to_tstmp(_CABillgReqDocHeader.CABillgReqChangeDate, _CABillgReqDocHeader.CABillgReqChangeTime,
abap_system_timezone($session.client, 'NULL'),
$session.client, 'NULL') as changetimestamp_kk) as CABillgReqChangeDateTime,
//cfc_exists
_CABillgReqDocHeader.CAClrfctnExist,
// reference
_CABillgReqDocHeader.CABillgReqReference,
// billreq_recnum
_CABillgReqDocHeader.CABillgReqNumberOfItems,
// log_system
_CABillgReqDocHeader.LogicalSystem,
// bitlist_id
_CABillgReqDocHeader.CABllbleItmListId,
// loedt
_CABillgReqDocHeader.CADeletionDate,
// completion_date
_CABillgReqDocHeader.CABillgReqCompletionDate,
// Make association public
// _CABillgReqStatus,
// _CABillgReqCategory,
// _CABillgReqType,
// _CABillgReqReason,
@Consumption.hidden: true
_ContractAccountHeader,
_ContractAccountPartner
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CABILLGREQCATEGORY",
"I_CABILLGREQCATEGORYTEXT",
"I_CABILLGREQDOCHEADER",
"I_CABILLGREQREASON",
"I_CABILLGREQREASONTEXT",
"I_CABILLGREQSTATUS",
"I_CABILLGREQSTATUSTEXT",
"I_CABILLGREQTYPE",
"I_CABILLGREQTYPETEXT"
],
"ASSOCIATED":
[
"I_CONTRACTACCOUNTHEADER",
"I_CONTRACTACCOUNTPARTNER"
],
"BASE":
[
"I_CABILLGREQDOCHEADER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/