@EndUserText.label: 'Query view for Service management filter'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog:{
sqlViewName: 'CSERVMGTGLBFLTR',
compiler.compareFilter: true,
preserveKey:true
}
@VDM: {
viewType: #CONSUMPTION,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XXL
}
// dataCategory: #VALUE_HELP
}
define view C_ServiceMgmtOvPgGlobalFltr
with parameters
P_DisplayCurrency : displaycurrency
as select from I_ServiceDocumentEnhcd
association [0..1] to C_Dischannelvaluehelp as _DistributionChannel on $projection.SalesOrganization = _DistributionChannel.SalesOrganization
and $projection.DistributionChannel = _DistributionChannel.DistributionChannel
association [0..1] to C_OrgDivisionValueHelp as _OrganizationDivision on $projection.SalesOrganization = _OrganizationDivision.SalesOrganization
and $projection.DistributionChannel = _OrganizationDivision.DistributionChannel
and $projection.Division = _OrganizationDivision.Division
association [0..1] to C_SalesOfficeValueHelp as _SalesOffice on $projection.SalesOrganization = _SalesOffice.SalesOrganization
and $projection.DistributionChannel = _SalesOffice.DistributionChannel
and $projection.Division = _SalesOffice.OrganizationDivision
and $projection.SalesOffice = _SalesOffice.SalesOffice
association [0..1] to C_SalesGroupValueHelp as _SalesGroup on $projection.SalesOffice = _SalesGroup.SalesOffice
and $projection.SalesGroup = _SalesGroup.SalesGroup
association [0..1] to E_ServiceDocument as _ServiceDocumentExt on $projection.ServiceObjectType = _ServiceDocumentExt.ServiceCategory
and $projection.ServiceDocument = _ServiceDocumentExt.ServiceOrder
association [0..1] to C_DischannelOrgUnitVH as _OrgUnitDistributionChannel on $projection.SalesOrganizationOrgUnitID = _OrgUnitDistributionChannel.OrganizationalUnit
and $projection.OrgUnitDistributionChannel = _OrgUnitDistributionChannel.OrgUnitDistributionChannel
association [0..1] to C_SalesOrgDivisionVH as _SalesOrganizationDivision on $projection.SalesOrganizationOrgUnitID = _SalesOrganizationDivision.OrganizationalUnit
and $projection.OrgUnitDistributionChannel = _SalesOrganizationDivision.DistributionChannel
and $projection.OrgUnitDivision = _SalesOrganizationDivision.OrgUnitDivision
association [0..1] to C_SalesOfficeOrgUnitVH as _SalesOfficeOrgUnit on $projection.SalesOrganizationOrgUnitID = _SalesOfficeOrgUnit.OrganizationalUnit
and $projection.OrgUnitDistributionChannel = _SalesOfficeOrgUnit.DistributionChannel
and $projection.OrgUnitDivision = _SalesOfficeOrgUnit.Division
and $projection.SalesOfficeOrgUnitID = _SalesOfficeOrgUnit.SalesOfficeOrgUnitID
association [0..1] to C_SalesGroupOrgUnitVH as _SalesGroupOrgUnit on $projection.SalesOfficeOrgUnitID = _SalesGroupOrgUnit.SalesOfficeOrgUnitID
and $projection.SalesGroupOrgUnitID = _SalesGroupOrgUnit.SalesGroupOrgUnitID
{
@Consumption.filter.hidden: true
@ObjectModel.foreignKey.association: '_ServiceObjType'
key ServiceObjectType,
// @UI.hidden: true
@Consumption.filter.hidden: true
key ServiceDocument,
@UI.selectionField.position: 80
@UI.textArrangement: #TEXT_FIRST
@EndUserText.label: 'Service Order Type'
@EndUserText.quickInfo: 'Service Order Type'
// @Consumption.labelElement: 'ServiceDocumentTypeName'
@ObjectModel.foreignKey.association: '_ServiceDocumentType'
@Consumption.valueHelpDefinition: [{ entity: {name: 'C_ServiceOrderTypeVH',
element: 'ServiceOrderType' }}]
ServiceDocumentType as ServiceOrderType,
@Consumption.filter.hidden: true
_ServiceDocumentType,
@UI.selectionField.position: 10
// @Consumption.valueHelpDefinition: [{ entity: {name: 'C_SalesOrgAndOrgUnitVH',
// element: 'SalesOrganization' }}]
SalesOrganization,
@Consumption.filter.hidden: true
_SalesOrganization,
@UI.selectionField.position: 11
@Consumption.valueHelpDefinition: [{ entity: {name: 'C_SalesOrgUnitVH',
element: 'OrganizationalUnit' }}]
SalesOrganizationOrgUnitID,
@Consumption.filter.hidden: true
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_SalesOrganizationOrgUnit_2'
_SalesOrganizationOrgUnit,
@UI.selectionField.position: 20
@Consumption.valueHelp: '_DistributionChannel'
DistributionChannel,
@Consumption.filter.hidden: true
_DistributionChannel,
@UI.selectionField.position: 30
@Consumption.valueHelp: '_OrganizationDivision'
@ObjectModel.foreignKey.association: '_Division'
Division,
@Consumption.filter.hidden: true
_Division,
@Consumption.filter.hidden: true
_OrganizationDivision,
@UI.selectionField.position: 40
@Consumption.valueHelp: '_SalesOffice'
SalesOffice,
@Consumption.filter.hidden: true
_SalesOffice,
@UI.selectionField.position: 50
@Consumption.valueHelp: '_SalesGroup'
SalesGroup,
@Consumption.filter.hidden: true
// @UI.hidden: true
_SalesGroup,
//
@UI.selectionField.position: 51
// @Consumption.valueHelpDefinition: [{ entity: {name: 'C_SalesOfficeOrgUnitVH',
// element: 'SalesOfficeOrgUnitID' }}]
@ObjectModel: {foreignKey.association: '_SalesOfficeOrgUnit_2'}
SalesOfficeOrgUnitID,
@UI.selectionField.position: 51
// @Consumption.valueHelpDefinition: [{ entity: {name: 'C_SalesGroupOrgUnitVH',
// element: 'SalesGroupOrgUnitID' }}]
@ObjectModel: {foreignKey.association: '_SalesGroupOrgUnit_2'}
SalesGroupOrgUnitID,
@UI.selectionField.position: 70
// @Consumption.valueHelpDefinition: [{ entity: {name: 'C_DischannelOrgUnitVH',
// element: 'DistributionChannel' }}]
@ObjectModel: {foreignKey.association: '_OrgUnitDistributionChannel'}
DistributionChannel as OrgUnitDistributionChannel,
//
//
//
@UI.selectionField.position: 70
// @Consumption.valueHelpDefinition: [{ entity: {name: 'C_SalesOrgDivisionVH',
// element: 'Division' }}]
//
@ObjectModel: {foreignKey.association: '_SalesOrganizationDivision'}
Division as OrgUnitDivision,
@UI.hidden:true
ServiceOrganization,
@UI.hidden:true
@ObjectModel.foreignKey.association: '_RespEmployee'
@API.element.releaseState: #DEPRECATED
@API.element.successor: 'RespEmployeeBusinessPartnerId'
ResponsibleEmployee,
@UI: { fieldGroup:[{groupLabel: 'Additional Filters', qualifier:'GeneralData'}]}
@EndUserText.label: 'Service Team'
@EndUserText.quickInfo: 'Service Team'
@Consumption.valueHelpDefinition: [{ entity: {name:'I_SrvcDocRespyMgmtSrvcTeamVH', element: 'RespyMgmtServiceTeamName' }}]
_ServiceTeamHeader.TeamName as TeamName,
@UI.hidden:true
RespyMgmtServiceTeam,
@UI: { fieldGroup:[{groupLabel: 'Additional Filters', qualifier:'GeneralData'}]}
@EndUserText.label: 'Responsible Employee'
@EndUserText.quickInfo: 'Responsible Employee'
//@ObjectModel.foreignKey.association: '_RespEmployee'
@Consumption.valueHelpDefinition: [{ entity: {name: 'C_SrvcDocBusinessPartnerVH', element: 'BusinessPartner' }}]
ResponsibleEmployee as RespEmployeeBusinessPartnerId,
@UI: { fieldGroup:[{groupLabel: 'Additional Filters', qualifier:'GeneralData'}]}
@EndUserText.label: 'Contact Person'
@EndUserText.quickInfo: 'Contact Person'
@ObjectModel.foreignKey.association: '_ContactPerson'
@Consumption.valueHelpDefinition: [{ entity: {name: 'I_SrvcMgmtContactPersonVH', element: 'ContactPersonBusinessPartnerId' }}]
ContactPerson as ContactPersonBusinessPartnerId,
@UI: { fieldGroup:[{groupLabel: 'Additional Filters', qualifier:'GeneralData'}]}
@EndUserText.label: 'Solution Order'
@EndUserText.quickInfo: 'Solution Order'
@Consumption.valueHelpDefinition: [{ entity: {name: 'C_BusinessSolutionOrderStdVH', element: 'BusinessSolutionOrder' } }]
RefBusinessSolutionOrder,
@UI.selectionField.position: 90
@UI.textArrangement: #TEXT_FIRST
@EndUserText.label: 'Sold-To Party'
@EndUserText.quickInfo: 'Sold-To Party'
@ObjectModel.foreignKey.association: '_SoldToParty'
@Consumption.valueHelpDefinition: [{ entity: {name: 'C_ServiceDocumentSoldToPartyVH', element: 'BusinessPartner' } }]
SoldToParty,
@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,
_SalesOrganizationOrgUnit_2,
_SalesOfficeOrgUnit_2,
_SalesGroupOrgUnit_2,
@Consumption.filter.hidden: true
_SalesOrganizationDivision,
@Consumption.filter.hidden: true
_OrgUnitDistributionChannel,
_ServiceObjType,
_RespEmployee,
_ContactPerson,
_SoldToParty,
_ServiceTeamHeader
}
where
ServiceDocumentIsQuotation != 'X'
and SrvcDocIsMaintServiceOrder != 'X'
and ServiceDocumentTemplateType is initial
and RefInHouseRepairIsExisting is initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_RESPYMGMTTEAMHEADERDETAIL",
"I_SERVICEDOCUMENTENHCD"
],
"ASSOCIATED":
[
"C_DISCHANNELORGUNITVH",
"C_DISCHANNELVALUEHELP",
"C_ORGDIVISIONVALUEHELP",
"C_SALESGROUPORGUNITVH",
"C_SALESGROUPVALUEHELP",
"C_SALESOFFICEORGUNITVH",
"C_SALESOFFICEVALUEHELP",
"C_SALESORGDIVISIONVH",
"E_SERVICEDOCUMENT",
"I_BUSINESSPARTNER",
"I_CUSTMGMTBUSOBJTYPE",
"I_DIVISION",
"I_RESPYMGMTTEAMHEADERDETAIL",
"I_SALESORGANIZATION",
"I_SALESORGANIZATIONUNIT",
"I_SERVICEDOCUMENTTYPE",
"I_SRVCMGMTORGANIZATIONUNIT"
],
"BASE":
[
"I_SERVICEDOCUMENTENHCD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/