@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@VDM.viewType: #CONSUMPTION
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@ObjectModel: {
semanticKey: ['PhysicalInventoryDocument', 'FiscalYear'],
usageType: {
sizeCategory: #XL,
serviceQuality: #C,
dataClass: #TRANSACTIONAL
}
}
@Consumption.semanticObject: 'PhysicalInventoryDocument'
define root view entity C_PhysInvtryDocManageCountTP
provider contract transactional_query
as projection on R_PhysicalInventoryDocumentTP
{
key PhysicalInventoryDocument,
key FiscalYear,
@ObjectModel:{ foreignKey: { association: '_InventoryTransactionType' },
text.element: ['InventoryTransactionTypeText'] }
InventoryTransactionType,
@Semantics.text:true
_InventoryTransactionType._Text.InventoryTransactionTypeText as InventoryTransactionTypeText : localized,
@ObjectModel: { foreignKey: { association: '_Plant' },
text.element: ['PlantName']}
Plant,
@Semantics.text:true
_Plant.PlantName as PlantName,
@ObjectModel: { foreignKey: { association: '_StorageLocation' },
text.element: ['StorageLocationName'] }
StorageLocation,
@Semantics.text:true
_StorageLocation.StorageLocationName as StorageLocationName,
@ObjectModel: { foreignKey: {association: '_InventorySpecialStockType' },
text.element: ['InventorySpecialStockTypeName'] }
InventorySpecialStockType,
@Semantics.text:true
_InventorySpecialStockType._Text.InventorySpecialStockTypeName as InventorySpecialStockTypeName : localized,
@Consumption.filter.selectionType: #INTERVAL
DocumentDate,
@Consumption.filter.selectionType: #INTERVAL
PhysInventoryPlannedCountDate,
@Consumption.filter.selectionType: #INTERVAL
cast( PhysicalInventoryLastCountDate as pi_countdate preserving type ) as PhysicalInventoryLastCountDate,
@Consumption.filter.selectionType: #INTERVAL
PostingDate,
PostingFiscalPeriod,
@ObjectModel: { text.element: ['UserDescription'] }
@Semantics.user.createdBy: true
CreatedByUserName,
@Semantics.text:true
_CreatedByUser.UserDescription as UserDescription,
PostingIsBlockedForPhysInvtry,
@ObjectModel: { foreignKey: {association: '_PhysInvtryCountSts' },
text.element: ['PhysicalInventoryCountStsTxt'] }
PhysicalInventoryCountStatus,
@Semantics.text:true
_PhysInvtryCountSts._Text.PhysicalInventoryCountStsTxt as PhysicalInventoryCountStsTxt : localized,
@ObjectModel: { foreignKey: {association: '_PhysInvtryPostSts' },
text.element: ['PhysInvtryAdjmtPostgStsTxt'] }
PhysInvtryAdjustmentPostingSts,
@Semantics.text:true
_PhysInvtryPostSts._Text.PhysInvtryAdjmtPostgStsTxt as PhysInvtryAdjmtPostgStsTxt : localized,
PhysInventoryReferenceNumber,
@ObjectModel: { foreignKey: {association: '_PhysInvtryDeletionSts' },
text.element: ['PhysInvtryDeletionStatusText'] }
PhysInvtryDeletionStatus,
@Semantics.text:true
_PhysInvtryDeletionSts._Text.PhysInvtryDeletionStatusText as PhysInvtryDeletionStatusText : localized,
PhysInvtryDocHasQtySnapshot,
@ObjectModel: { foreignKey: {association: '_PhysInvtryGroupType' },
text.element: ['PhysicalInventoryGroupTypeName'],
filter.enabled: false }
PhysicalInventoryGroupType,
@Semantics.text:true
_PhysInvtryGroupType._Text.PhysicalInventoryGroupTypeName as PhysicalInventoryGroupTypeName : localized,
PhysicalInventoryGroup,
PhysicalInventoryNumber,
PhysicalInventoryDocumentDesc,
@Semantics.systemDateTime.localInstanceLastChangedAt: true
@ObjectModel: { filter.enabled: false }
LastChangeDateTime,
SalesPriceValuationIsActive,
@ObjectModel: { filter.enabled: false }
@UI.hidden: true
CountingVarianceInPercent,
/* Virtual Fields */
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_PhysInvtryDocFiscalYear : abap.char( 16 ),
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_PhysInvtryReferenceNumber : boole_d,
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_PhysInvtryNumber : boole_d,
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_PhysInvtryDocumentDesc : boole_d,
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_PlannedCountDate : sit_de_row_criticality,
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_InventorySpecialStockType : boole_d,
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual UICT_HideStorageLocation : boole_d,
@Semantics.booleanIndicator:true
@ObjectModel: { virtualElement: true,
virtualElementCalculatedBy: 'ABAP:PI_MANAGE_HEADER_CALC_EXIT' }
@UI.hidden: true
virtual IsChangeDocumentsEnabled : boole_d,
/* Associations */
_PhysicalInventoryDocumentItem : redirected to composition child C_PhysInvtryDocItemMngCountTP,
// _CreatedByUser,
_InventorySpecialStockType,
_InventoryTransactionType,
_PhysInvtryCountSts,
_PhysInvtryDeletionSts,
_PhysInvtryDocFiscalYear,
_PhysInvtryDocItem,
_PhysInvtryGroupType,
_PhysInvtryPostSts,
_Plant,
_StorageLocation
}