@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PMAPPEDPIITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_MappedPhysInvtryItem as select from P_PhysInvtryDocItem {
key PhysicalInventoryDocument,
key FiscalYear,
key PhysicalInventoryDocumentItem,
Material,
Plant,
StorageLocation,
Batch,
InventorySpecialStockType,
cast(case when PhysicalInventoryStockType = '1' then '01'
when PhysicalInventoryStockType = '2' then '02'
when PhysicalInventoryStockType = '4' then '07'
when PhysicalInventoryStockType = '' then ( case when IsValueOnlyMaterial = 'X' then '01' else '' end )
else '' end as nsdm_lbbsa ) as InventoryStockType,
SalesOrder,
SalesOrderItem,
ScheduleLine,
Supplier,
Customer,
StockOwner,
WBSElementInternalID,
MaterialBaseUnit,
PhysicalInventoryLastCountDate,
Quantity,
BookQtyBfrCountInMatlBaseUnit,
DifferenceQuantityInBaseUnit,
DifferenceAmountInCoCodeCrcy,
PhysicalInventoryItemIsCounted,
PhysInvtryDifferenceIsPosted,
PhysInvtryItemIsRecounted,
PhysInvtryItemIsDeleted
} where PhysicalInventoryStockType <> '3'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_PHYSINVTRYDOCITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/