@AbapCatalog.sqlViewName: 'CSERVICEITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Service Document Item'
@Search.searchable: true
@UI.headerInfo: {
typeName: 'Service Confirmation Item',
typeNamePlural: 'Service Confirmation Items',
title: {
type: #STANDARD,
label: 'Item',
value: 'ServiceDocumentItem'
},
description: {
type: #STANDARD,
value: 'ServiceDocumentItemDescription'
}
}
@VDM: {
viewType: #CONSUMPTION
}
@ObjectModel: {
semanticKey: [ 'ServiceDocument', 'ServiceDocumentItem' ],
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
}
}
/****************************************************************************************/
// This view is deprecated.
/***************************************************************************************/
@VDM.lifecycle.status: #DEPRECATED
define view C_ServiceDocumentItem
as select from I_ServiceDocumentItemEnhcd as ServiceDocumentItem
association [0..1] to E_ServiceDocumentItem as _ServiceDocItemExt on $projection.ServiceObjectType = _ServiceDocItemExt.ServiceCategory
and $projection.ServiceDocument = _ServiceDocItemExt.ServiceOrderItem
and $projection.ServiceDocumentItem = _ServiceDocItemExt.ServiceLineExternalID
association [0..1] to P_ServiceDocumentRefObject as _ServiceDocItemMainRefObj on $projection.ServiceObjectType = _ServiceDocItemMainRefObj.ServiceObjectType
and $projection.ServiceDocument = _ServiceDocItemMainRefObj.ServiceDocument
and $projection.ServiceDocumentItem = _ServiceDocItemMainRefObj.ServiceDocumentItem
association [0..*] to C_SrvcDocItemTransHistory as _ServiceDocItemTransHistory on $projection.ServiceObjectType = _ServiceDocItemTransHistory.ServiceObjectType
and $projection.ServiceDocument = _ServiceDocItemTransHistory.ServiceDocument
and $projection.ServiceDocumentItem = _ServiceDocItemTransHistory.ServiceDocumentItem
association [1..*] to C_SrvcConfItmObjPgPricingDets as _ServiceConfItmPriceDets on $projection.ServiceObjectType = _ServiceConfItmPriceDets.ServiceObjectType
and $projection.ServiceDocument = _ServiceConfItmPriceDets.ServiceDocument
and $projection.ServiceDocumentItem = _ServiceConfItmPriceDets.ServiceDocumentItem
association [0..*] to C_SrvcDocItemPartner as _PartiesInvolved on $projection.ServiceObjectType = _PartiesInvolved.CustMgmtObjectType
and $projection.ServiceDocument = _PartiesInvolved.CustMgmtDocument
and $projection.ServiceDocumentItem = _PartiesInvolved.CustMgmtDocumentItem
association [0..1] to I_ServiceDocumentItem as _ServiceDocumentItem on $projection.ParentServiceDocumentItemUUID = _ServiceDocumentItem.ServiceDocumentItemUUID
{
@UI.facet: [
{
label: 'Item Details',
id: 'ItemDetails',
type: #COLLECTION,
position: 10
},
{
label: 'General Data',
id: 'GeneralDataItem',
parentId: 'ItemDetails',
type: #FIELDGROUP_REFERENCE,
position: 10,
targetQualifier: 'General Data',
hidden: true
},
{
label: 'Dates',
id: 'ItemDates',
parentId: 'ItemDetails',
type: #FIELDGROUP_REFERENCE,
position: 20,
targetQualifier: 'Dates'
},
{
label: 'Reference Objects',
id: 'ReferenceObjects',
parentId: 'ItemDetails',
type: #FIELDGROUP_REFERENCE,
position: 30,
targetQualifier: 'Refernce Objects'
},
{
label: 'Notes',
id: 'NotesItem',
type: #COLLECTION,
position: 20
},
{
id: 'NotesDetails',
parentId: 'NotesItem',
type: #FIELDGROUP_REFERENCE,
targetQualifier: 'NotesDetails'
},
{
label: 'Billing',
id: 'ItemBilling',
type: #COLLECTION,
position: 30
},
{
id: 'PayerDetails',
parentId: 'ItemBilling',
type: #FIELDGROUP_REFERENCE,
position: 10,
targetQualifier: 'PayerDetails'
},
{
id: 'PayerDetails1',
parentId: 'ItemBilling',
type: #FIELDGROUP_REFERENCE,
position: 20,
targetQualifier: 'PayerDetails1'
},
{
label: 'Price Details',
id: 'PriceDetails',
type: #LINEITEM_REFERENCE,
position: 40,
targetElement: '_ServiceConfItmPriceDets'
},
{
label: 'Parties Involved',
id: 'PartiesInvolved',
type: #LINEITEM_REFERENCE,
position: 50,
targetElement: '_PartiesInvolved'
},
{
label: 'Transaction History',
id: 'ItemTransactionHistory',
type: #LINEITEM_REFERENCE,
position: 60,
// isMap: true,
// isSummary: true,
// isPartOfPreview: true,
targetElement: '_ServiceDocItemTransHistory'
}
]
@UI.hidden: true
key ServiceDocumentItem.ServiceObjectType,
@UI.hidden: true
key ServiceDocumentItem.ServiceDocument,
@UI.hidden: true
key ServiceDocumentItem.ServiceDocumentType,
@UI.lineItem.position:10
@Search.defaultSearchElement: true
@Search.ranking: #HIGH
@EndUserText.label: 'Item Number'
key ServiceDocumentItem.ServiceDocumentItem,
@UI.hidden: true
ServiceDocumentItemUUID,
// @UI.lineItem.position:20
// @Search.defaultSearchElement: true
// @EndUserText.label: 'Higher Level Item'
// ServiceDocumentItem._ParentServiceDocItem.ServiceDocumentItem as ParentServiceDocumentItem,
@UI.lineItem.position:20
@Search.defaultSearchElement: true
@EndUserText.label: 'Product ID'
@Consumption.semanticObject: 'Material'
@UI.dataPoint:{description:'Product ID',title: 'Product ID'}
ServiceDocumentItem.OriginallyRequestedProduct,
@UI.lineItem.position:150
// @Search: {defaultSearchElement: true , ranking: #HIGH, fuzzinessThreshold: 0.8 } // ATC issue: CONTAINS predicates on expression
@EndUserText.label: 'Higher-Level Item'
case _ServiceDocumentItem.ServiceDocumentItem
when '000000' then ''
else _ServiceDocumentItem.ServiceDocumentItem
end as ParentServiceDocumentItem,
@UI.lineItem.position:160
// @UI.dataPoint:{description:'Parent Product ID',title: 'Parent Product ID'}
@Search.defaultSearchElement: true
@EndUserText.label: 'Higher-Level Product ID'
@Consumption.semanticObject: 'Material'
_ServiceDocumentItem.OriginallyRequestedProduct as CustMgmtParentItemProduct, //ParentProduct,
@UI.lineItem.position:170
@Search: {defaultSearchElement: true , ranking: #HIGH }
@EndUserText.label: 'Higher-Level Product'
_ServiceDocumentItem.ServiceDocumentItemDescription as CustMgmtParentItemProductName, //ParentProductDescription,
//for equipment and functional location navigation
//@UI.hidden: true
@UI.lineItem.position:100
case _ServiceDocItemMainRefObj.TechObjIsEquipOrFuncnlLoc
when 'EAMS_FL' then cast (_ServiceDocItemMainRefObj.FunctionalLocation as eams_tec_obj)
when 'EAMS_EQUI' then cast (_ServiceDocItemMainRefObj.Equipment as eams_tec_obj)
end as TechnicalObject,
//for equipment and functional location navigation
//@UI.hidden: true
@UI.lineItem.position:110
@EndUserText.label: 'Equipment/Functional Location'
_ServiceDocItemMainRefObj.TechObjIsEquipOrFuncnlLoc,
@UI.fieldGroup: {qualifier: 'Refernce Objects', position:10, importance: #HIGH, label: 'Equipment ID'}
@UI.textArrangement: #TEXT_FIRST
@ObjectModel.text.element: ['EquipmentName']
@Consumption.semanticObject: 'MaintenanceObject'
_ServiceDocItemMainRefObj.Equipment,
@UI.hidden: true
_ServiceDocItemMainRefObj._Equipment._EquipmentText[1: Language=$session.system_language].EquipmentName,
@UI.fieldGroup: {qualifier: 'Refernce Objects', position:20, importance: #HIGH, label: 'Functional Location'}
@UI.textArrangement: #TEXT_FIRST
@ObjectModel.text.element: ['FunctionalLocationName']
@Consumption.semanticObject: 'MaintenanceObject'
_ServiceDocItemMainRefObj.FunctionalLocation,
@UI.hidden: true
_ServiceDocItemMainRefObj._FunctionalLocation._FunctionalLocationText[1:Language = $session.system_language].FunctionalLocationName,
// @UI.lineItem.position:40
@EndUserText.label: 'Unit'
@Semantics.unitOfMeasure: true
@UI.lineItem.hidden: true
ServiceDocumentItem.ServiceDocItemQuantityUnit,
@UI.lineItem.position:50
@EndUserText.label: 'Product'
ServiceDocumentItemDescription,
@UI.lineItem.position:60
@Search.defaultSearchElement: true
@EndUserText.label: 'Item Category'
@UI.textArrangement: #TEXT_ONLY
@UI.dataPoint:{description:'Item Category',title: 'Item Category'}
ServiceDocumentItem.ServiceDocItemCategory,
@UI.lineItem.position:70
@Search.defaultSearchElement: true
@EndUserText.label: 'Gross Value'
@Semantics.amount.currencyCode: 'TransactionCurrency'
//@UI.dataPoint:{description:'Gross Value',title: 'Gross Value'}
@UI.fieldGroup: [{qualifier: 'serviceConfItmFormFacet', position: 10, importance: #HIGH}]
ServiceDocumentItem.ServiceDocItemGrossAmount,
@UI.lineItem.position:30
@Search.defaultSearchElement: true
@EndUserText.label: 'Quantity'
//@UI.dataPoint:{description:'Quantity',title: 'Quantity'}
@UI.fieldGroup: [{qualifier: 'serviceConfItmFormFacet', position: 20, importance: #HIGH}]
@Semantics.quantity.unitOfMeasure: 'ServiceDocItemQuantityUnit'
ServiceDocumentItem.ServiceDocumentItemQuantity,
//@UI.hidden:true
@Semantics.currencyCode: true
ServiceDocumentItem.TransactionCurrency,
@UI.lineItem.hidden: true
@EndUserText.label: 'Actual Duration'
@UI.fieldGroup: [{qualifier: 'serviceConfItmFormFacet', position: 30, importance: #HIGH}]
@Semantics.quantity.unitOfMeasure: 'ActualServiceDurationUnit'
ActualServiceDuration,
@EndUserText.label: 'Unit'
@Semantics.unitOfMeasure: true
@UI.lineItem.hidden: true
ActualServiceDurationUnit,
// Controls the visibility of the ActualServiceDuration
@UI.hidden: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
cast(3 as abap.int4) as UxFcActualServiceDuration,
@UI.lineItem:{position:80, criticality: 'ServiceConfErrorStsCriticality', criticalityRepresentation: #WITHOUT_ICON }
@Search.defaultSearchElement: true
@EndUserText.label: 'Status'
@UI.textArrangement: #TEXT_ONLY
@UI.dataPoint:{description:'Status',title: 'Status', criticality:'ServiceConfErrorStsCriticality'}
ServiceDocumentItem.ServiceDocumentItemStatus,
// @UI.lineItem.position:90
// //@Search.defaultSearchElement: true
// @EndUserText.label: 'Over Time'
// //@Semantics.amount.currencyCode: 'TransactionCurrency'
// @UI.dataPoint:{description:'ZOver Time',title: 'Over Time'}
// ServiceDocumentItem._FixedPrice.ConditionAmount,
@UI.hidden: true
case ServiceDocumentItem.ServiceDocumentItemStatus
when 'A' then 0
when 'B' then 1
when 'C' then 3
when 'D' then 2
end as ServiceConfErrorStsCriticality,
@UI.hidden: true
ServiceDocumentItem.BillingPriceSourceName,
@UI.dataPoint:{description:'Source Of Procurement Price', title:'Source Of Procurement Price'}
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
@EndUserText.label: 'Source Of Procurement Price'
@UI.lineItem.hidden: true
//@UI.fieldGroup: [{qualifier: 'serviceConfItmSrcPriceFacet', position: 10, importance: #HIGH, label: 'Price Source'}]
ServiceDocumentItem.DocumentDescription,
@UI.hidden: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
cast( '' as crmt_boolean ) as MaterialComponentIsSparePart,
@Search.defaultSearchElement: true
@EndUserText.label: 'Accounting Indicator'
ServiceDocumentItem.BillableControl,
@UI.hidden: true
ParentServiceDocumentItemUUID,
// @UI.fieldGroup: {qualifier: 'General Data', position: 10, importance: #HIGH, label: 'Employee Responsible'}
// @Consumption.semanticObject: 'Customer'
// @UI.textArrangement: #TEXT_ONLY
@EndUserText.label: 'Executing Employee Responsible'
ResponsibleEmployee,
@UI.fieldGroup: {qualifier: 'General Data', position: 10, importance: #HIGH, label: 'Sold-To Party'}
//@Consumption.semanticObject: 'Customer'
@UI.textArrangement: #TEXT_ONLY
@Consumption.valueHelp:'_SoldToParty'
SoldToParty,
@UI.fieldGroup: {qualifier: 'General Data', position: 20, importance: #HIGH, label: 'Service Employee'}
@UI.textArrangement: #TEXT_ONLY
ServiceEmployee,
@EndUserText.label:'Overtime Category'
@UI.fieldGroup: {groupLabel: 'General Data', qualifier: 'General Data', position: 40, importance: #HIGH, label: 'Overtime Category'}
@UI.textArrangement: #TEXT_ONLY
@ObjectModel.foreignKey.association: '_ServiceDocOvertimeCat'
TimeSheetOvertimeCategory,
// Controls the visibility of the TimeSheetOvertimeCategory
@UI.hidden: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
cast(3 as abap.int4) as UxFcTimeSheetOvertimeCategory,
@EndUserText.label: 'Start of Work'
@UI.fieldGroup: {groupLabel: 'General Data', qualifier: 'General Data', position: 50, importance: #HIGH}
ActualServiceStartDateTime,
// Controls the visibility of the ActualServiceStartDateTime
@UI.hidden: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
cast(3 as abap.int4) as UxFcActualServiceStartDateTime,
// @UI.fieldGroup: {qualifier: 'Dates', position: 10, importance: #HIGH, label: 'Requested Start'}
@EndUserText.label: 'Requested Service Start Date'
RequestedServiceStartDateTime,
// @UI.fieldGroup: {qualifier: 'Dates', position: 20, importance: #HIGH, label: 'Requested End'}
@EndUserText.label: 'Requested Service End Date'
RequestedServiceEndDateTime,
@UI.fieldGroup: {qualifier: 'Dates', position: 20, importance: #HIGH, label: 'Billing Date'}
BillingDateTime,
@UI.fieldGroup: {qualifier: 'Dates', position: 30, importance: #HIGH, label: 'Billing Document Created On'}
@EndUserText.label: 'Billing Document Created On'
@UI.lineItem.hidden: true
BillingDocCreationDateTime,
@UI: {fieldGroup: {qualifier: 'PayerDetails1', position: 10, importance: #HIGH, label: 'Billing Status'}}
@UI.textArrangement: #TEXT_ONLY
ServiceDocItemBillingStatus,
@UI: {fieldGroup: {qualifier: 'PayerDetails', position: 30, importance: #HIGH, label: 'Payment Terms'}}
@UI.textArrangement: #TEXT_ONLY
PaymentTerms,
@UI: {fieldGroup: {qualifier: 'PayerDetails', position: 10, importance: #HIGH, label: 'Payer'}}
//@Consumption.semanticObject: 'Customer'
@UI.textArrangement: #TEXT_ONLY
PayerParty,
@UI: {fieldGroup: {qualifier: 'PayerDetails', position: 20, importance: #HIGH, label: 'Bill-To Party'}}
//@Consumption.semanticObject: 'Customer'
@UI.textArrangement: #TEXT_ONLY
BillToParty,
// @UI: {fieldGroup: {qualifier: 'PayerDetails1', position: 20, importance: #HIGH, label: 'Billing Block Reason'}}
// BillingBlockReason,
// @Search.defaultSearchElement: true
// @EndUserText.label: 'Price Source'
// @UI.dataPoint:{description:'Price Source',title: 'Price Source'}
// @UI.fieldGroup: [{qualifier: 'serviceConfItmFormFacet', position: 90, importance: #HIGH}]
// ServiceDocumentItem.PriceSource,
//
//Associations
@UI.hidden: true
_ParentServiceDocItem,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_ServiceDocItemCategory,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_SrvcDocItmLifecycleStatus'
_ServiceDocItemStatus,
_SrvcDocItmLifecycleStatus,
@Consumption.filter.hidden: true
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_ServiceDocItemTransHistory,
@UI.hidden: true
@Consumption.filter.hidden: true
SalesOrganization,
@UI.hidden: true
@Consumption.filter.hidden: true
DistributionChannel,
@UI.hidden: true
@Consumption.filter.hidden: true
Division,
@UI.hidden: true
@Consumption.filter.hidden: true
SalesOffice,
@UI.hidden: true
@Consumption.filter.hidden: true
SalesGroup,
@Consumption.filter.hidden: true
@UI.hidden: true
SalesOrganizationOrgUnitID,
@Consumption.filter.hidden: true
@UI.hidden: true
SalesOfficeOrgUnitID,
@Consumption.filter.hidden: true
@UI.hidden: true
SalesGroupOrgUnitID,
@Consumption.filter.hidden: true
@UI.hidden: true
ServiceOrganization,
@Consumption.filter.hidden: true
@UI.hidden: true
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_SalesOrganizationOrgUnit_2'
_SalesOrganizationOrgUnit,
@Consumption.filter.hidden: true
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_SalesOfficeOrgUnit_2'
_SalesOfficeOrgUnit,
@Consumption.filter.hidden: true
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_SalesGroupOrgUnit_2'
_SalesGroupOrgUnit,
@Consumption.filter.hidden: true
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_ServiceOrganizationOrgUnit_2'
_ServiceOrganizationOrgUnit,
@Consumption.filter.hidden: true
_SalesOrganizationOrgUnit_2,
@Consumption.filter.hidden: true
_SalesOfficeOrgUnit_2,
@Consumption.filter.hidden: true
_SalesGroupOrgUnit_2,
@Consumption.filter.hidden: true
_ServiceOrganizationOrgUnit_2,
//Item STAT_CANCELLED
@EndUserText.label: 'Cancelled'
@EndUserText.quickInfo: 'Cancelled'
case ServiceDocumentItemIsRejected
when 'X'then cast( 'X' as crmt_boolean )
when ' ' then cast( '' as crmt_boolean )
end as ServiceDocumentItemIsRejected,
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVITEM_EXIT'
@UI.multiLineText: true
@UI: {fieldGroup: {qualifier: 'NotesDetails', importance: #HIGH,label: 'Notes'}} //, , position: 10,label: ' ' }}
@UI.lineItem.hidden: true
_ServiceDocItemNote.ServiceOrderNoteText,
_SoldToParty,
_PayerParty,
_BillToParty,
_ServiceEmployee,
_ServiceDocItemBillingStatus,
_PaymentTerms,
_ServiceConfItmPriceDets,
_ServiceDocOvertimeCat,
_ServiceDocumentItem,
@Consumption.filter.hidden: true
_PartiesInvolved,
_ServiceDocItemNote
}
//where ServiceDocumentItem._ServiceDocItemRefObj.SrvcRefObjIsMainObject = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EQUIPMENT",
"I_EQUIPMENTTEXT",
"I_FUNCTIONALLOCATION",
"I_FUNCTIONALLOCATIONTEXT",
"I_SERVICEDOCITEMNOTE",
"I_SERVICEDOCUMENTITEM",
"I_SERVICEDOCUMENTITEMENHCD",
"P_SERVICEDOCUMENTREFOBJECT"
],
"ASSOCIATED":
[
"C_SRVCCONFITMOBJPGPRICINGDETS",
"C_SRVCDOCITEMPARTNER",
"C_SRVCDOCITEMTRANSHISTORY",
"E_SERVICEDOCUMENTITEM",
"I_BUSINESSPARTNER",
"I_PAYMENTTERMS",
"I_SALESORGANIZATIONUNIT",
"I_SERVICEDOCBILLINGSTATUS",
"I_SERVICEDOCITEMCATEGORY",
"I_SERVICEDOCITEMNOTE",
"I_SERVICEDOCUMENTITEM",
"I_SERVICEDOCUMENTITEMENHCD",
"I_SERVICEDOCUMENTSTATUS",
"I_SRVCDOCLIFECYCLESTATUS",
"I_SRVCMGMTORGANIZATIONUNIT",
"I_TIMESHEETOVERTIMECAT",
"P_SERVICEDOCUMENTREFOBJECT"
],
"BASE":
[
"I_SERVICEDOCUMENTITEMENHCD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/