@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@VDM.usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ]
@Search.searchable: true
@ObjectModel: {
semanticKey: [ 'ProjectBillingRequestUUID' ],
representativeKey: 'ProjectBillingRequestUUID'
}
@ObjectModel.usageType: {
sizeCategory: #L,
dataClass: #TRANSACTIONAL,
serviceQuality: #C
}
@UI.headerInfo: {
typeName: 'Project Billing Request',
typeNamePlural: 'Project Billing Requests',
title: { label: 'Manage Project Billing Request' }
}
@EndUserText.label: 'Manage Project Billing Request'
@UI.presentationVariant: [{ requestAtLeast: ['ProjBillingDocRequestListText'] }]
@AccessControl.personalData.blocking: #REQUIRED
define root view entity C_ManageProjBillgRequestTP
provider contract transactional_query
as projection on R_ProjectBillingRequestTP as ProjectBillingRequestTP
association [0..*] to C_ProjectBillingWrkflwApprvr as _ProjectBillingWrkflwApprvr on $projection.ProjectBillingRequest = _ProjectBillingWrkflwApprvr.TechnicalWrkflwObject
association [1..1] to C_ProjBillgCustomerProjectDets as _ProjBillgCustomerProjectDets on $projection.Project = _ProjBillgCustomerProjectDets.Project
association [1..1] to C_ProjectBillingCustomerCard as _CustomerContactCard on $projection.Customer = _CustomerContactCard.Customer
{
@UI.lineItem: [ //{type: #FOR_ACTION, dataAction: 'CreateBillingDocumentRequest', label: 'Create Billing Document Request'},
{type: #FOR_ACTION, dataAction: 'WithdrawFromApproval', label: 'Reject'} ]
@UI.hidden: true
@EndUserText.label: 'Item ID'
@EndUserText.quickInfo: 'Item ID'
key ProjectBillingRequestUUID,
@UI.hidden: true
@EndUserText.label: 'Project ID'
@EndUserText.quickInfo: 'Project ID'
ProjectInternalID,
@EndUserText.label: 'Status'
@EndUserText.quickInfo: 'Status'
@UI.textArrangement: #TEXT_ONLY
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
@UI: { lineItem: [{position: 40, importance: #HIGH }], selectionField: [{ position: 40 }] }
@Consumption.valueHelpDefinition: [{ entity:{ name: 'C_ProjectBillingRequestStsVH', element: 'ProjectBillingRequestStatus' }}]
@ObjectModel.text.element: [ 'ProjectBillingReqStatusText' ]
ProjectBillingRequestStatus,
@UI.hidden: true
@EndUserText.label: 'Status'
@EndUserText.quickInfo: 'Status'
_ProjectBillingRequestStatus._ProjectBillingReqStatusText.ProjectBillingReqStatusText : localized,
@EndUserText.label: 'Approval Status'
@EndUserText.quickInfo: 'Approval Status'
@UI.textArrangement: #TEXT_ONLY
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
@UI: { lineItem: [{ criticality: 'UICT_ProjBillgReqStsCritlty', criticalityRepresentation: #WITHOUT_ICON }] } //position: 70, selectionField: [{ position: 60 }]
@Consumption.valueHelpDefinition: [{ entity:{ name: 'C_ProjBillgReqApprvlStatusVH', element: 'ProjBillgReqApprovalStatus' }}]
@ObjectModel.text.element: [ 'ProjBillgReqApprovalStatusText' ]
ProjBillgReqApprovalStatus,
@UI.hidden: true
@EndUserText.label: 'Approval Status'
@EndUserText.quickInfo: 'Approval Status'
_ProjBillgReqApprovalStatus._ProjBillgReqApprvlStatusText.ProjBillgReqApprovalStatusText : localized,
@UI.hidden: true
ProjectBillingRequestType,
@UI.hidden: true
@EndUserText.label: 'Sales Document'
@EndUserText.quickInfo: 'Sales Document'
SalesDocument,
@UI.hidden: true
ProjBillgReqLastChgdBy,
@UI.hidden: true
ProjBillgReqLastChgdAtDteTme,
@UI: { lineItem: [{ position: 60, importance: #HIGH }] }
@EndUserText.label: 'Created By'
@EndUserText.quickInfo: 'Created By'
@Consumption.valueHelpDefinition: [{ entity:{ name: 'C_UsrSrchHelp', element: 'UserID' }}]
@ObjectModel.text.element: [ 'FullName' ]
ProjBillgReqCreatedBy,
@UI.hidden: true
_UserContactCard.FullName,
@UI.hidden: true
ProjBillgReqCreatedAtDteTme,
@UI: { lineItem: [{ position: 50, importance: #HIGH }], selectionField: [{ position: 50 }] }
@EndUserText.label: 'Created On'
@EndUserText.quickInfo: 'Created On'
@Consumption.filter.hidden: false
@ObjectModel.filter.enabled: true
@Consumption.filter: { selectionType: #INTERVAL, multipleSelections: false }
ProjBillgReqCreatedAtDte,
@UI.hidden: true
_ProjectBillingRequestItem,
@EndUserText.label: 'Document Currency'
@EndUserText.quickInfo: 'Document Currency'
@Consumption.valueHelpDefinition: [{ entity:{ name: 'I_CurrencyStdVH', element: 'Currency' }}]
--_SalesOrder.TransactionCurrency as DocumentCurrency,
DocumentCurrency,
@UI: { lineItem: [{ position: 10, importance: #HIGH }], selectionField: [{ position: 10 }] }
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
// @Consumption.filter.selectionType: #INTERVAL
// @Consumption.filter.multipleSelections: false
@EndUserText.label: 'Project Billing Request'
@EndUserText.quickInfo: 'Project Billing Request'
ProjectBillingRequest, //Draft ID
@EndUserText.label: 'Billing Method'
@EndUserText.quickInfo: 'Billing Method'
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual BillingPlanUsageCategoryName : abap.char( 60 ),
@EndUserText.label: 'Project'
@EndUserText.quickInfo: 'Project'
@UI: { lineItem: [{ position: 20, importance: #HIGH }], selectionField: [{ position: 30 }] }
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
@ObjectModel.text.element: [ 'ProjectDescription' ]
@Consumption.valueHelpDefinition: [{ entity: { name: 'C_ProjBillgCustProjVH', element: 'Project' } }]
@ObjectModel: { foreignKey.association: '_ProjBillgCustomerProjectDets' }
@Consumption: { valueHelp: '_ProjBillgCustomerProjectDets' }
@Consumption.semanticObject: 'EngagementProject'
Project,
@EndUserText.label: 'Project'
@Semantics.text: true
@Consumption.filter.hidden: true
@UI.hidden: true
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
ProjectDescription,
@EndUserText.label: 'To Bill'
@EndUserText.quickInfo: 'To Bill'
@UI: { lineItem: [{ position: 90, importance: #HIGH }] }
@Semantics.amount.currencyCode: 'DocumentCurrency'
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual BillableRevenueAmtInDocCrcy : abap.curr( 23 , 2 ),
@EndUserText.label: 'To Write Off'
@EndUserText.quickInfo: 'To Write Off'
@Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual WrittenOffRevenueAmtInDocCrcy : abap.curr( 23 , 2 ),
@EndUserText.label: 'To Postpone'
@EndUserText.quickInfo: 'To Postpone'
@Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual PostponedRevenueAmtInDocCrcy : abap.curr( 23 , 2 ),
@EndUserText.label: 'Customer'
@EndUserText.quickInfo: 'Customer'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85 }
@UI: { lineItem: [{ position: 30, importance: #HIGH }] , selectionField: [{ position: 20 }] }
@Consumption.valueHelpDefinition: [ { entity: { name : 'D_CustomerCVH', element: 'Customer' } } ]
// { entity: { name : 'I_Customer_VH', element: 'Customer' },
// qualifier: 'CustMultiAddr1',
// label: 'Customers with Standard Address'},
// { entity: { name: 'C_BPCustomerMultiAddrVH', element: 'Customer' },
// qualifier: 'CustMultiAddr',
// label: 'Customers with Multiple Addresses' }
// enabled: 'BPCustMultiAddrIsActive' }
// ]
@ObjectModel: { foreignKey.association: '_CustomerContactCard' }
@Consumption: { valueHelp: '_CustomerContactCard' }
@Consumption.semanticObject: 'Customer'
@ObjectModel.text.element: ['CustomerName']
Customer as Customer,
@UI.hidden: true
@Consumption.filter.hidden: true
@EndUserText.label: 'Customer'
@EndUserText.quickInfo: 'Customer'
--_SalesOrder._SoldToParty.CustomerName as CustomerName,
_CustomerToBusinessPartner._Customer.CustomerName as CustomerName,
@UI.hidden: true
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.85}
_CustomerToBusinessPartner._Customer.OrganizationBPName1 as OrganizationBPName1,
@UI.hidden: true // needed to distinguish OA and DP PBRs
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual BillingPlanItemUsage : sdbp_item_usage,
@UI.hidden: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PBE_VIRTUALFIELDS'
virtual ProjBillingDocRequestListText : abap.char( 300 ),
// Project Popover on ObjectPage
@UI.hidden: true
ProjectStartDate as ProjectStartDate,
@UI.hidden: true
ProjectEndDate as ProjectEndDate,
@UI.hidden: true
ProfitCenter,
@UI.hidden: true
ControllingArea,
@Consumption.filter.hidden: true
_CustomerContactCard,
@Consumption.filter.hidden: true
_ProjBillgCustomerProjectDets,
@Consumption.filter.hidden: true
@UI.hidden: true
_ProjectBillingRequestStatus,
@Consumption.filter.hidden: true
@UI.hidden: true
UserID,
@EndUserText.label: 'Amount/Cost to Postpone'
@EndUserText.quickInfo: 'Amount/Cost to Postpone'
@Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual ToBePostponedAmtInProjectCrcy : abap.curr( 23 , 2 ),
@EndUserText.label: 'Amount/Cost to Write Off'
@EndUserText.quickInfo: 'Amount/Cost to Write Off'
@Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual ToBeWrittenOffAmtInProjectCrcy : abap.curr( 23 , 2 ),
@EndUserText.label: 'Amount/Cost to Bill'
@EndUserText.quickInfo: 'Amount/Cost to Bill'
@Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual ToBeBilledAmtInProjCurrency : abap.curr( 23 , 2 ),
@UI.hidden: true
@ObjectModel.virtualElementCalculatedBy:'ABAP:CL_PBE_VIRTUALFIELDS'
virtual UICT_ProjBillgReqStsCritlty : abap.int1,
// @UI.hidden: true
// @ObjectModel.virtualElementCalculatedBy:'ABAP:CL_BP_MULTI_ADDR_BF_CALC_EXIT'
// virtual BPCustMultiAddrIsActive : abap_boolean,
// @UI.lineItem: [{ value: '_ProjectBillingWrkflwApprvr.WorkflowTaskRecipient',
// label: 'Approver',
// position: 160,
// importance: #HIGH },
// { value: '_ProjectBillingWrkflwApprvr.WorkflowTaskResultComment',
// label: 'Comment',
// position: 170,
// importance: #HIGH }
// ]
_ProjectBillingWrkflwApprvr,
_EnterpriseProject,
_ProjectBillingReqItemTP : redirected to composition child C_ManageProjBillgRequestItemTP
}
where
ProjectBillingRequestStatus <> 'C'
and UserID = $session.user