P_EBWIP_WIPQtyDocument

DDL: P_EBWIP_WIPQTYDOCUMENT Type: view_entity COMPOSITE Package: ODATA_CO_RT_WIP_REPORTING

Event-Based WIP - WIP Quantity Document

P_EBWIP_WIPQtyDocument is a Composite CDS View that provides data about "Event-Based WIP - WIP Quantity Document" in SAP S/4HANA. It reads from 3 data sources (R_EvtBsdMfgWIPDocument, I_FiscalYearPeriodForCmpnyCode, I_ProductCostCtrlgOrder) and exposes 10 fields with key field ControllingDocument. It has 1 association to related views. Part of development package ODATA_CO_RT_WIP_REPORTING.

Data Sources (3)

SourceAliasJoin Type
R_EvtBsdMfgWIPDocument Document from
I_FiscalYearPeriodForCmpnyCode FiscalYearPeriodForCompanyCode inner
I_ProductCostCtrlgOrder OrderMaster inner

Parameters (2)

NameTypeDefault
P_KeyDate fins_fperiod_enddate
P_OrderID fis_order_number

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_UserContactCard _CreatedByUserContactCard $projection.CreatedByUser = _CreatedByUserContactCard.ContactCardID

Annotations (4)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY ControllingDocument R_EvtBsdMfgWIPDocument ControllingDocument
ObjectInternalID R_EvtBsdMfgWIPDocument ObjectInternalID
OrderID R_EvtBsdMfgWIPDocument OrderID
OrderItem R_EvtBsdMfgWIPDocument OrderItem
FiscalYear R_EvtBsdMfgWIPDocument FiscalYear
FiscalPeriod R_EvtBsdMfgWIPDocument FiscalPeriod
FiscalYearPeriod
PostingDate R_EvtBsdMfgWIPDocument PostingDate
CreatedByUser R_EvtBsdMfgWIPDocument CreatedByUser
_CreatedByUserContactCard _CreatedByUserContactCard
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true

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

define view entity P_EBWIP_WIPQtyDocument
  with parameters
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate : fins_fperiod_enddate,
    P_OrderID : fis_order_number
  as select from R_EvtBsdMfgWIPDocument         as Document
    inner join   I_ProductCostCtrlgOrder        as OrderMaster                    on OrderMaster.OrderID = Document.OrderID
    inner join   I_FiscalYearPeriodForCmpnyCode as FiscalYearPeriodForCompanyCode on  FiscalYearPeriodForCompanyCode.CompanyCode           = OrderMaster.CompanyCode
                                                                                  and FiscalYearPeriodForCompanyCode.FiscalYear            = Document.FiscalYear
                                                                                  and FiscalYearPeriodForCompanyCode.FiscalPeriod          = Document.FiscalPeriod
                                                                                  and FiscalYearPeriodForCompanyCode.FiscalPeriodStartDate <= $parameters.P_KeyDate

  association [0..1] to I_UserContactCard as _CreatedByUserContactCard on $projection.CreatedByUser = _CreatedByUserContactCard.ContactCardID
{
  key Document.ControllingDocument,
      Document.ObjectInternalID,
      Document.OrderID,
      Document.OrderItem,
      @Semantics.fiscal.year: true
      Document.FiscalYear,
      @Semantics.fiscal.period: true
      Document.FiscalPeriod,
      @Semantics.fiscal.yearPeriod: true
      cast(FiscalYearPeriodForCompanyCode.FiscalYearPeriod as fins_fyearperiod) as FiscalYearPeriod,
      Document.PostingDate,
      @Semantics.user.createdBy: true
      Document.CreatedByUser,
      
      _CreatedByUserContactCard
}
where
      Document.OrderID = $parameters.P_OrderID
  and Document.IsValid = 'X'