P_PL_SAFTTransferToStock

DDL: P_PL_SAFTTRANSFERTOSTOCK SQL: PPLSAFTTRS2STK Type: view COMPOSITE

P_PL_SAFTTransferToStock is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_PurchaseOrderHistoryBasic, I_MaterialDocumentRecord) and exposes 8 fields with key field PurchaseOrder.

Data Sources (2)

SourceAliasJoin Type
I_PurchaseOrderHistoryBasic h from
I_MaterialDocumentRecord m inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTTRS2STK view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrderHistoryBasic PurchaseOrder
PurchaseOrderItem
PostingDate
ControllingArea I_MaterialDocumentRecord ControllingArea
Plant I_MaterialDocumentRecord Plant
StorageLocation I_MaterialDocumentRecord StorageLocation
_Plant I_MaterialDocumentRecord _Plant
_StorageLocation I_MaterialDocumentRecord _StorageLocation
@AbapCatalog.sqlViewName: 'PPLSAFTTRS2STK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PL_SAFTTransferToStock
  as select from I_PurchaseOrderHistoryBasic as h
    inner join   I_MaterialDocumentRecord    as m on  h.PurchasingHistoryDocumentYear = m.MaterialDocumentYear
                                                  and h.PurchasingHistoryDocument     = m.MaterialDocument
                                                  and h.PurchasingHistoryDocumentItem = m.MaterialDocumentItem
{
  key h.PurchaseOrder,
      min(h.PurchaseOrderItem) as PurchaseOrderItem,
      min(m.PostingDate)       as PostingDate,
      m.ControllingArea,
      m.Plant,
      m.StorageLocation,
      m._Plant,
      m._StorageLocation

}
where
  m.GoodsMovementType = '641'
group by
  h.PurchaseOrder,
  m.ControllingArea,
  m.Plant,
  m.StorageLocation
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALDOCUMENTRECORD",
"I_PURCHASEORDERHISTORYBASIC"
],
"ASSOCIATED":
[
"I_PLANT",
"I_STORAGELOCATION"
],
"BASE":
[
"I_MATERIALDOCUMENTRECORD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/