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
PurchaseRequisitionItem I_Purchaserequisitionitem PurchaseRequisitionItem
PurchaseRequisitionType I_Purchaserequisitionitem PurchaseRequisitionType
Plant I_Purchaserequisitionitem Plant
PurchasingOrganization I_Purchaserequisitionitem PurchasingOrganization
PurchasingGroup I_Purchaserequisitionitem PurchasingGroup
PurchaseRequisitionItemText I_Purchaserequisitionitem PurchaseRequisitionItemText
CreatedByUser I_Purchaserequisitionitem CreatedByUser
PurReqCreationDate I_Purchaserequisitionitem PurReqCreationDate
PurReqnSSPRequestor I_Purchaserequisitionitem PurReqnSSPRequestor
CreatedByUserFullName _Employee PersonFullName
PurReqnRequestor _REmployee PersonFullName
PurReqnTotalAmountInDspCrcy _Facts1 PurReqnTotalAmountInDspCrcy
DisplayCurrency _Facts1 DisplayCurrency
NumberOfItems _Facts1 NumberOfItems
_Facts1 _Facts1
_ContactCard _ContactCard
_UserContactCard _UserContactCard
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.sqlViewName: 'PPURREQNFACTS2'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Purchase Requisition Additional Data'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_PurReqnFacts2 as select distinct from I_Purchaserequisitionitem
association [1..1] to P_PurReqnFacts1 as _Facts1 on $projection.PurchaseRequisition = _Facts1.PurchaseRequisition
association [0..1] to I_PurchasingDocContactCard as _ContactCard on
//            (_ContactCard.ContactCardType = 'User'                      and _ContactCard.ContactCardID = $projection.CreatedByUser      and _ContactCard.ContactCardRole = 'Purchaser')

            (_ContactCard.ContactCardType = 'User'                      and _ContactCard.ContactCardID = $projection.CreatedByUser     and _ContactCard.ContactCardRole = 'Creator')
//      or    (_ContactCard.ContactCardType = 'Address'                   and _ContactCard.ContactCardID = $projection.AddressId          and _ContactCard.ContactCardRole = 'Supplier')

//      or    (_ContactCard.ContactCardType = 'Supplier'                  and _ContactCard.ContactCardID = $projection.Supplier           and _ContactCard.ContactCardRole = 'Supplier')

//      or    (_ContactCard.ContactCardType = 'Supplier'                  and _ContactCard.ContactCardID = $projection.SupplyingSupplier  and _ContactCard.ContactCardRole = 'Goods Supplier')

//      or    (_ContactCard.ContactCardType = 'Supplier'                  and _ContactCard.ContactCardID = $projection.InvoicingParty     and _ContactCard.ContactCardRole = 'Invoicing Party')

//      or    (_ContactCard.ContactCardType = 'SupplierContact'           and _ContactCard.ContactCardID = $projection.Supplier)

//      or    (_ContactCard.ContactCardType = 'PurchasingDocument'        and _ContactCard.ContactCardID = $projection.PurchaseOrder)

association [0..1] to I_UserContactCard as _UserContactCard on
            (_UserContactCard.ContactCardType = 'User' and _UserContactCard.ContactCardID = $projection.CreatedByUser      and _UserContactCard.ContactCardRole = 'Creator')
association [1..1] to I_BusinessUser as _Employee on _Employee.UserID = $projection.CreatedByUser
association [1..1] to I_BusinessUser as _REmployee on _REmployee.BPIdentificationNumber = $projection.PurReqnSSPRequestor

{
    //Dummy Change 4

    key I_Purchaserequisitionitem.PurchaseRequisition,
    I_Purchaserequisitionitem.PurchaseRequisitionItem,
    I_Purchaserequisitionitem.PurchaseRequisitionType,
    I_Purchaserequisitionitem.Plant,
    I_Purchaserequisitionitem.PurchasingOrganization,
    I_Purchaserequisitionitem.PurchasingGroup,
    I_Purchaserequisitionitem.PurchaseRequisitionItemText,
    I_Purchaserequisitionitem.CreatedByUser,
    I_Purchaserequisitionitem.PurReqCreationDate,
    I_Purchaserequisitionitem.PurReqnSSPRequestor,
    _Employee.PersonFullName as CreatedByUserFullName,
    _REmployee.PersonFullName as PurReqnRequestor,
    _Facts1.PurReqnTotalAmountInDspCrcy,
    _Facts1.DisplayCurrency,
    _Facts1.NumberOfItems,
    _Facts1,
    _ContactCard,
    _UserContactCard
} where I_Purchaserequisitionitem.PurchaseRequisitionItem = _Facts1.PurchaseRequisitionItem
    and I_Purchaserequisitionitem.IsDeleted != 'X'