C_ServiceOrderTypeVH is a Consumption CDS View that provides data about "Service Order Type" in SAP S/4HANA. It reads from 2 data sources (I_ServiceDocumentType, P_SrvcTransactionType) and exposes 5 fields with key field ServiceOrderType. Part of development package CRMS4_ANALYTICS_SERVICE_ORDER.
@AbapCatalog.sqlViewName: 'CSERVORDTYPEVH'
@VDM.viewType: #CONSUMPTION@AbapCatalog.compiler.compareFilter: true@AccessControl.authorizationCheck: #CHECK@Search.searchable: true@EndUserText.label: 'Service Order Type'
@ObjectModel.usageType.serviceQuality: #D@ObjectModel.usageType.sizeCategory : #S@ObjectModel.resultSet.sizeCategory: #XS@ObjectModel.usageType.dataClass: #CUSTOMIZING@ObjectModel.dataCategory: #VALUE_HELP@ObjectModel.supportedCapabilities: [#VALUE_HELP_PROVIDER]@ClientHandling.algorithm: #SESSION_VARIABLE@AbapCatalog.preserveKey:true@UI.headerInfo:{
typeName: 'Service Order Type',
typeNamePlural: 'Service Order Types'
}@Consumption.ranked:true//This viewis used for default values in Launchpad
defineview C_ServiceOrderTypeVH
asselectdistinctfrom I_ServiceOrderTypeVH as OrderType
innerjoin I_ServiceDocumentType on I_ServiceDocumentType.ServiceDocumentType = OrderType.ServiceDocumentType
and I_ServiceDocumentType.ServiceDocumentTemplateType != 'D'
// Commented out this code because this code is picking the solution order// Customer not able to create order using Quick Create because they were not using the Solution Order//innerjoin I_SrvcTransactionCopyControl on I_SrvcTransactionCopyControl.SrvcTargetTransactionType = OrderType.ServiceDocumentType
//To Remove In House Repair Orders from Service order value help. Check : Predecessor for Repair Order shouldnt be Object Type BUS2000256
// and I_SrvcTransactionCopyControl.ServiceDocPredecessorObjType != 'BUS2000256'
// and I_SrvcTransactionCopyControl.ServiceDocPredecessorObjType != 'BUS2000116'
//To Remove In House Repair Orders from Service order value help.
innerjoin P_SrvcTransactionType on P_SrvcTransactionType.ServiceDocumentType = OrderType.ServiceDocumentType
and P_SrvcTransactionType.RefInHouseRepairIsExisting isnull
{
@Search: { defaultSearchElement: true, ranking: #HIGH }@EndUserText.label : 'Service Order type'
@ObjectModel.text.element: ['ServiceOrderTypeName']@UI.textArrangement: #TEXT_FIRST@Consumption.filter.hidden: truekeycast( OrderType.ServiceDocumentType as crms4_srvo_process_type preserving type ) as ServiceOrderType,
@Search: { defaultSearchElement: true, ranking: #LOW }@Consumption.filter.hidden: true
OrderType.ServiceObjectType,
@Semantics.text: true@Search: { defaultSearchElement: true, ranking: #LOW }@Consumption.filter.hidden: true
_ServiceDocumentTypeText[1:Language=$session.system_language].ServiceDocumentTypeName as ServiceOrderTypeName,
@Search: { defaultSearchElement: true, ranking: #LOW }@Consumption.filter.hidden: true
_ServiceDocumentTypeText[1:Language=$session.system_language].ServiceDocumentTypeShortName as ServiceOrderTypeShortName,
@Consumption.filter.hidden: true
_ServiceDocumentTypeText
}