P_MaterialDocumentExtract

DDL: P_MATERIALDOCUMENTEXTRACT SQL: PMATDOCEXT Type: view COMPOSITE

P_MaterialDocumentExtract is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (matdoc_extract) and exposes 13 fields.

Data Sources (1)

SourceAliasJoin Type
matdoc_extract matdoc_extract from

Annotations (10)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PMATDOCEXT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (13)

KeyFieldSource TableSource FieldDescription
StockIdentifyingMaterial matbf
Plant werks
StockIdfgStorageLocation lgort_sid
StockIdentifyingBatch charg_sid
SpecialStockIdfgSupplier lifnr_sid
SpecialStockIdfgSalesOrder mat_kdauf
SpecialStockIdfgSalesOrderItem mat_kdpos
SpecialStockIdfgWBSElement mat_pspnr
SpecialStockIdfgCustomer kunnr_sid
InventorySpecialStockType
InventoryStockType lbbsa_sid
SpecialStockIdfgStockOwner
withrecordsoftypeMDOC_CP
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PMATDOCEXT'

@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.private: true
@VDM.viewType: #COMPOSITE


define view P_MaterialDocumentExtract
  as select from matdoc_extract

{
  matbf             as StockIdentifyingMaterial,
  werks             as Plant,
  lgort_sid         as StockIdfgStorageLocation,
  charg_sid         as StockIdentifyingBatch,
  lifnr_sid         as SpecialStockIdfgSupplier,
  mat_kdauf         as SpecialStockIdfgSalesOrder,
  mat_kdpos         as SpecialStockIdfgSalesOrderItem,
  mat_pspnr         as SpecialStockIdfgWBSElement,
  kunnr_sid         as SpecialStockIdfgCustomer,
  cast(sobkz as nsdm_spcl_stock_type preserving type) as InventorySpecialStockType,
  lbbsa_sid         as InventoryStockType,
  cast(disub_owner_sid as nsdm_add_spcl_stock_supplier preserving type)   as SpecialStockIdfgStockOwner,

  -- with records of type MDOC_CP, AG_MDOC_CF etc there is no unique key except the technical GUID key, so we don't use any key fields at all

  @Semantics.unitOfMeasure: true
  meins             as MaterialBaseUnit,

  @DefaultAggregation:#NONE
  @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
  stock_qty_l1         as MatlStkChangeQtyInBaseUnit,

  bukrs             as CompanyCode

}

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"MATDOC_EXTRACT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/