P_PurReqnFacts2

DDL: P_PURREQNFACTS2 SQL: PPURREQNFACTS2 Type: view CONSUMPTION

Purchase Requisition Additional Data

P_PurReqnFacts2 is a Consumption CDS View that provides data about "Purchase Requisition Additional Data" in SAP S/4HANA. It has 5 associations to related views.

Associations (5)

CardinalityTargetAliasCondition
[1..1] P_PurReqnFacts1 _Facts1 $projection.PurchaseRequisition = _Facts1.PurchaseRequisition
[0..1] I_PurchasingDocContactCard _ContactCard (_ContactCard.ContactCardType = 'User' and _ContactCard.ContactCardID = $projection.CreatedByUser and _ContactCard.ContactCardRole = 'Creator')
[0..1] I_UserContactCard _UserContactCard (_UserContactCard.ContactCardType = 'User' and _UserContactCard.ContactCardID = $projection.CreatedByUser and _UserContactCard.ContactCardRole = 'Creator')
[1..1] I_BusinessUser _Employee _Employee.UserID = $projection.CreatedByUser
[1..1] I_BusinessUser _REmployee _REmployee.BPIdentificationNumber = $projection.PurReqnSSPRequestor

Annotations (8)

NameValueLevelField
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.sqlViewName PPURREQNFACTS2 view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Purchase Requisition Additional Data view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY PurchaseRequisition I_Purchaserequisitionitem PurchaseRequisition Requisition
PurchaseRequisitionItem I_Purchaserequisitionitem PurchaseRequisitionItem Requisn. item
PurchaseRequisitionType I_Purchaserequisitionitem PurchaseRequisitionType Order Type
Plant I_Purchaserequisitionitem Plant Valuation Area
PurchasingOrganization I_Purchaserequisitionitem PurchasingOrganization Purchasing Organization
PurchasingGroup I_Purchaserequisitionitem PurchasingGroup Purchasing Group
PurchaseRequisitionItemText I_Purchaserequisitionitem PurchaseRequisitionItemText Short Text
CreatedByUser I_Purchaserequisitionitem CreatedByUser User Name
PurReqCreationDate I_Purchaserequisitionitem PurReqCreationDate Requisn Date
PurReqnSSPRequestor I_Purchaserequisitionitem PurReqnSSPRequestor Requestor
CreatedByUserFullName _Employee PersonFullName Full Name
PurReqnRequestor _REmployee PersonFullName Full Name
PurReqnTotalAmountInDspCrcy _Facts1 PurReqnTotalAmountInDspCrcy
DisplayCurrency _Facts1 DisplayCurrency Display Currency
NumberOfItems _Facts1 NumberOfItems
_Facts1 _Facts1
_ContactCard _ContactCard
_UserContactCard _UserContactCard

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_PurReqnFacts2.
-- 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: PPURREQNFACTS2

CREATE VIEW P_PurReqnFacts2 AS
SELECT
  I_Purchaserequisitionitem.PurchaseRequisition AS PurchaseRequisition,
  I_Purchaserequisitionitem.PurchaseRequisitionItem AS PurchaseRequisitionItem,
  I_Purchaserequisitionitem.PurchaseRequisitionType AS PurchaseRequisitionType,
  I_Purchaserequisitionitem.Plant AS Plant,
  I_Purchaserequisitionitem.PurchasingOrganization AS PurchasingOrganization,
  I_Purchaserequisitionitem.PurchasingGroup AS PurchasingGroup,
  I_Purchaserequisitionitem.PurchaseRequisitionItemText AS PurchaseRequisitionItemText,
  I_Purchaserequisitionitem.CreatedByUser AS CreatedByUser,
  I_Purchaserequisitionitem.PurReqCreationDate AS PurReqCreationDate,
  I_Purchaserequisitionitem.PurReqnSSPRequestor AS PurReqnSSPRequestor,
  _Employee.PersonFullName AS CreatedByUserFullName,
  _REmployee.PersonFullName AS PurReqnRequestor,
  _Facts1.PurReqnTotalAmountInDspCrcy AS PurReqnTotalAmountInDspCrcy,
  _Facts1.DisplayCurrency AS DisplayCurrency,
  _Facts1.NumberOfItems AS NumberOfItems
LEFT OUTER JOIN P_PurReqnFacts1 AS _Facts1 ON PurchaseRequisition = _Facts1.PurchaseRequisition  -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocContactCard AS _ContactCard ON (_ContactCard.ContactCardType = 'User' AND _ContactCard.ContactCardID = CreatedByUser AND _ContactCard.ContactCardRole = 'Creator')  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON (_UserContactCard.ContactCardType = 'User' AND _UserContactCard.ContactCardID = CreatedByUser AND _UserContactCard.ContactCardRole = 'Creator')  -- association [0..1]
LEFT OUTER JOIN I_BusinessUser AS _Employee ON _Employee.UserID = CreatedByUser  -- association [1..1]
LEFT OUTER JOIN I_BusinessUser AS _REmployee ON _REmployee.BPIdentificationNumber = PurReqnSSPRequestor  -- association [1..1]
;