P_PhysInvtryDocItmCreateTP

DDL: P_PHYSINVTRYDOCITMCREATETP SQL: PPICREATEITMTP Type: view CONSUMPTION

P_PhysInvtryDocItmCreateTP is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_PhysInvtryDocHeader, P_PhysInvtryDocItem) and exposes 34 fields with key fields PhysicalInventoryDocument, FiscalYear, PhysicalInventoryDocumentItem. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_PhysInvtryDocHeader header inner
P_PhysInvtryDocItem item from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_WBSElementByInternalKey _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID and $projection.WBSElementInternalID <> '00000000'

Annotations (14)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PPICREATEITMTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled false view
ObjectModel.deleteEnabled false view
ObjectModel.transactionalProcessingEnabled true view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY PhysicalInventoryDocument P_PhysInvtryDocItem PhysicalInventoryDocument Physical Inventory Document
KEY FiscalYear P_PhysInvtryDocItem FiscalYear G/L Fiscal Year
KEY PhysicalInventoryDocumentItem P_PhysInvtryDocItem PhysicalInventoryDocumentItem Physical Inventory Document Item
Plant P_PhysInvtryDocItem Plant Valuation Area
StorageLocation I_PhysInvtryDocHeader StorageLocation StorageLocation
InventorySpecialStockType I_PhysInvtryDocHeader InventorySpecialStockType Special Stock Type
PhysicalInventoryType I_PhysInvtryDocHeader PhysicalInventoryType
InventoryTransactionType I_PhysInvtryDocHeader InventoryTransactionType Trans. Ev. Type
PhysicalInventoryGroupType I_PhysInvtryDocHeader PhysicalInventoryGroupType Grouping Type
PhysicalInventoryGroup I_PhysInvtryDocHeader PhysicalInventoryGroup Grpg Crit.
PhysicalInventoryNumber I_PhysInvtryDocHeader PhysicalInventoryNumber Physical Inventory Number
PhysInventoryReferenceNumber I_PhysInvtryDocHeader PhysInventoryReferenceNumber Physical Inventory Reference
PhysicalInventoryDocumentDesc
PostingIsBlockedForPhysInvtry
PhysInvtryDocHasQtySnapshot
DocumentDate I_PhysInvtryDocHeader DocumentDate Journal Entry Date
PhysInventoryPlannedCountDate I_PhysInvtryDocHeader PhysInventoryPlannedCountDate Plan.Count date
Material P_PhysInvtryDocItem Material Vehicle Model
Batch P_PhysInvtryDocItem Batch Lot No.
RealProductBatch P_PhysInvtryDocItem RealProductBatch
ValuationType P_PhysInvtryDocItem ValuationType Valuation Type
PhysicalInventoryStockType P_PhysInvtryDocItem PhysicalInventoryStockType Stock Type
SalesOrder P_PhysInvtryDocItem SalesOrder SD Document
SalesOrderItem P_PhysInvtryDocItem SalesOrderItem Sales Order Item
Supplier P_PhysInvtryDocItem Supplier Supplier
Customer P_PhysInvtryDocItem Customer Sold-to Party
StockOwner P_PhysInvtryDocItem StockOwner Owner of stock
WBSElementInternalID P_PhysInvtryDocItem WBSElementInternalID WBS Internal ID
WBSElement _WBSElement WBSElement WBS Internal ID
WBSDescription _WBSElement WBSDescription WBS Element Name
_Supplier P_PhysInvtryDocItem _Supplier
_SupplierCompanyByPlant P_PhysInvtryDocItem _SupplierCompanyByPlant
_Customer P_PhysInvtryDocItem _Customer
_CustomerCompanyByPlant P_PhysInvtryDocItem _CustomerCompanyByPlant

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_PhysInvtryDocItmCreateTP.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PPICREATEITMTP

CREATE VIEW P_PhysInvtryDocItmCreateTP AS
SELECT
  item.PhysicalInventoryDocument AS PhysicalInventoryDocument,
  item.FiscalYear AS FiscalYear,
  item.PhysicalInventoryDocumentItem AS PhysicalInventoryDocumentItem,
  item.Plant AS Plant,
  header.StorageLocation AS StorageLocation,
  header.InventorySpecialStockType AS InventorySpecialStockType,
  header.PhysicalInventoryType AS PhysicalInventoryType,
  header.InventoryTransactionType AS InventoryTransactionType,
  header.PhysicalInventoryGroupType AS PhysicalInventoryGroupType,
  header.PhysicalInventoryGroup AS PhysicalInventoryGroup,
  header.PhysicalInventoryNumber AS PhysicalInventoryNumber,
  header.PhysInventoryReferenceNumber AS PhysInventoryReferenceNumber,
  cast(header.PhysicalInventoryDocumentDesc as pi_document_description preserving type) AS PhysicalInventoryDocumentDesc,
  cast(header.PostingIsBlockedForPhysInvtry as pi_set_posting_block preserving type) AS PostingIsBlockedForPhysInvtry,
  cast(header.PhysInvtryDocHasQtySnapshot as pi_freeze_book_inventory preserving type) AS PhysInvtryDocHasQtySnapshot,
  header.DocumentDate AS DocumentDate,
  header.PhysInventoryPlannedCountDate AS PhysInventoryPlannedCountDate,
  item.Material AS Material,
  item.Batch AS Batch,
  item.RealProductBatch AS RealProductBatch,
  item.ValuationType AS ValuationType,
  item.PhysicalInventoryStockType AS PhysicalInventoryStockType,
  item.SalesOrder AS SalesOrder,
  item.SalesOrderItem AS SalesOrderItem,
  item.Supplier AS Supplier,
  item.Customer AS Customer,
  item.StockOwner AS StockOwner,
  item.WBSElementInternalID AS WBSElementInternalID,
  _WBSElement.WBSElement AS WBSElement,
  _WBSElement.WBSDescription AS WBSDescription,
  item._Supplier AS _Supplier,
  item._SupplierCompanyByPlant AS _SupplierCompanyByPlant,
  item._Customer AS _Customer,
  item._CustomerCompanyByPlant AS _CustomerCompanyByPlant
FROM P_PhysInvtryDocItem AS item
INNER JOIN I_PhysInvtryDocHeader AS header ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_WBSElementByInternalKey AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID AND WBSElementInternalID <> '00000000'  -- association [0..1]
;