C_SerialNumberObjPage

DDL: C_SERIALNUMBEROBJPAGE SQL: CSERNOOP Type: view CONSUMPTION

Serial Number Object Page

C_SerialNumberObjPage is a Consumption CDS View that provides data about "Serial Number Object Page" in SAP S/4HANA. It reads from 1 data source (I_Equipment) and exposes 29 fields with key field Equipment. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_Equipment _Equipment from

Associations (3)

CardinalityTargetAliasCondition
[0..*] C_SerialNmbrHistory _SerialNumberHistory $projection.Equipment = _SerialNumberHistory.Equipment
[0..1] I_InventoryStockType _InventoryStockType $projection.inventorystocktype = _InventoryStockType.InventoryStockType
[0..1] I_InventorySpecialStockType _InventorySpecialStockType $projection.inventoryspecialstocktype = _InventorySpecialStockType.InventorySpecialStockType

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName CSERNOOP view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Serial Number Object Page view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MASTER view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
UI.headerInfo.typeName Serial Number view
UI.headerInfo.typeNamePlural Serial Numbers view
UI.headerInfo.title.label Serial Number view
UI.headerInfo.title.value SerialNumber view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY Equipment I_Equipment Equipment
SerialNumber I_Equipment SerialNumber
Material I_Equipment Material
SupplierWarrantyEndDate
CustomerWarrantyEndDate
Plant
StorageLocation
Batch I_Equipment Batch
InventoryStockType
InventorySpecialStockType
SalesOrder
SalesOrderItem
Supplier
Customer
WBSElementInternalID
SpecialStockIdfgStockOwner
SalesOrganization
DistributionChannel
Division
SalesOffice
SalesGroup
_SerialNumberHistory _SerialNumberHistory
_Material _Material
_Plant
_StorageLocation
_InventoryStockType _InventoryStockType
_InventorySpecialStockType _InventorySpecialStockType
_Supplier
_Customer
@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
}