@AbapCatalog.sqlViewName : 'CSERNOOP'
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY // never expose this view directly, only via associations
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.privilegedAssociations: [ '_SerialNumberHistory' ]
@EndUserText.label : 'Serial Number Object Page'
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MASTER
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@UI.headerInfo:{
typeName: 'Serial Number',
typeNamePlural: 'Serial Numbers',
title: { label: 'Serial Number',
value: 'SerialNumber' }
// description: {
// label: 'Material',
// value: 'MaterialNumberTitle' }
}
//@ObjectModel: {
// semanticKey: ['SerialNumber']
//}
@ObjectModel: { semanticKey: ['Equipment'] }
define view C_SerialNumberObjPage
// @Consumption.hidden : true
// @Environment.systemField : #SYSTEM_LANGUAGE
// P_Language : sylangu
as select from I_Equipment as _Equipment
// left outer join bgmkobj as _CustomerWarranty on _CustomerWarranty.j_objnr = MaintObjectInternalID
// and _CustomerWarranty.gaart = '1'
// left outer join bgmkobj as _SupplierWarranty on _SupplierWarranty.j_objnr = MaintObjectInternalID
// and _SupplierWarranty.gaart = '2'
association [0..*] to C_SerialNmbrHistory as _SerialNumberHistory on $projection.Equipment = _SerialNumberHistory.Equipment
association [0..1] to I_InventoryStockType as _InventoryStockType on $projection.inventorystocktype = _InventoryStockType.InventoryStockType
association [0..1] to I_InventorySpecialStockType as _InventorySpecialStockType on $projection.inventoryspecialstocktype = _InventorySpecialStockType.InventorySpecialStockType
// association [0..1] to Zma_Serial_Warranty as _Warranty on $projection.Equipment = _Warranty.Equipment
{
key _Equipment.Equipment,
// @UI: { hidden: true }
// ltrim(SerialNumber, '0') as SerialNumberTitle,
@UI: { lineItem: { position: 5,
importance: #HIGH } ,
selectionField: { position: 5 }
}
_Equipment.SerialNumber,
@UI: { lineItem: { position: 4,
importance: #HIGH } ,
selectionField: { position: 4 },
fieldGroup: { qualifier: 'HeaderFacet',
groupLabel: 'Header Data',
position: 10,
importance: #HIGH } }
_Equipment.Material,
@UI: { fieldGroup: { qualifier: 'HeaderFacet',
groupLabel: 'Header Data',
position: 20,
importance: #HIGH } }
// _Warranty.SupplierWarrantyEndDate,
@Semantics.businessDate.to: true
cast ( cast ( '20161231' as dats) as sn_supplier_warranty_end_date preserving type) as SupplierWarrantyEndDate,
@UI: { fieldGroup: { qualifier: 'HeaderFacet',
groupLabel: 'Header Data',
position: 30,
importance: #HIGH } }
// _Warranty.CustomerWarrantyEndDate,
@Semantics.businessDate.from : true
cast ( cast ( '20161231' as dats) as sn_customer_warranty_end_date preserving type) as CustomerWarrantyEndDate,
// Stock data
@UI: { lineItem: { position: 3,
importance: #HIGH } ,
selectionField: { position: 3 },
identification: { position: 20,
importance: #LOW } }
@UI.textArrangement: #TEXT_ONLY
@ObjectModel.foreignKey.association : '_Plant'
_Equipment._SerialNumberStockSegment.Plant,
@UI: { lineItem: { position: 3,
importance: #HIGH } ,
selectionField: { position: 3 },
identification: { position: 30,
importance: #LOW } }
_Equipment._SerialNumberStockSegment.StorageLocation,
// _Equipment._SerialNumberStockSegment.Batch as StockBatch,
//Stock Batch will be identical to MasterBatch; in case of goods issue, Stock Batch will be cleared - use only _EquipmentBatch = MasterBatch
@UI: {
identification: { position: 40,
importance: #LOW } }
_Equipment.Batch as Batch, //MasterBatch,
@UI: { lineItem: { position: 1,
importance: #HIGH } ,
selectionField: { position: 1 },
identification: { position: 10,
importance: #LOW } }
@ObjectModel.foreignKey.association : '_GoodsMovementType'
_Equipment._SerialNumberStockSegment.InventoryStockType,
@ObjectModel.foreignKey.association : '_InventorySpecialStockType'
_Equipment._SerialNumberStockSegment.InventorySpecialStockType,
@UI: { fieldGroup: { qualifier: 'ClassificationFacet',
position: 10,
importance: #MEDIUM } }
_Equipment._SerialNumberStockSegment.SalesOrder,
_Equipment._SerialNumberStockSegment.SalesOrderItem,
_Equipment._SerialNumberStockSegment.Supplier,
_Equipment._SerialNumberStockSegment.Customer,
_Equipment._SerialNumberStockSegment.WBSElementInternalID,
_Equipment._SerialNumberStockSegment.StockOwner as SpecialStockIdfgStockOwner,
// Sales and Distribution
@UI: { fieldGroup: { qualifier: 'SalesAndDistributionFacetLabel',
position: 10,
importance: #HIGH } }
_Equipment._EquipmentTimeSeg[left outer where ValidityEndDate = '99991231']._LocationAccountAssignment.SalesOrganization,
@UI: { fieldGroup: { qualifier: 'SalesAndDistributionFacetLabel',
position: 20,
importance: #HIGH } }
_Equipment._EquipmentTimeSeg[left outer where ValidityEndDate = '99991231']._LocationAccountAssignment.DistributionChannel,
@UI: { fieldGroup: { qualifier: 'SalesAndDistributionFacetLabel',
position: 30,
importance: #HIGH } }
_Equipment._EquipmentTimeSeg[left outer where ValidityEndDate = '99991231']._LocationAccountAssignment.Division,
@UI: { fieldGroup: { qualifier: 'SalesAndDistributionFacetLabel',
position: 40,
importance: #HIGH } }
_Equipment._EquipmentTimeSeg[left outer where ValidityEndDate = '99991231']._LocationAccountAssignment.SalesOffice,
@UI: { fieldGroup: { qualifier: 'SalesAndDistributionFacetLabel',
position: 50,
importance: #HIGH } }
_Equipment._EquipmentTimeSeg[left outer where ValidityEndDate = '99991231']._LocationAccountAssignment.SalesGroup,
//Associations
@ObjectModel.association .type: #TO_COMPOSITION_CHILD
@ObjectModel.association .privileged
_SerialNumberHistory,
@Consumption.filter .hidden: true
_Material,
_Equipment._SerialNumberStockSegment._Plant,
_Equipment._SerialNumberStockSegment._StorageLocation,
_InventoryStockType,
_InventorySpecialStockType,
_Equipment._SerialNumberStockSegment._Supplier,
_Equipment._SerialNumberStockSegment._Customer
}
Depth:
1
2
3
4
5
All
Reload
C_SerialNumberObjPage view