P_PCCORDERACTUALOUTPUTQUANTITY

CDS View

Manufacturing order actual output quantity

P_PCCORDERACTUALOUTPUTQUANTITY is a CDS View in S/4HANA. Manufacturing order actual output quantity. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
P_COMFGOrderTargetCube view inner COMPOSITE
P_MfgOrdTargetCost1V2 view inner COMPOSITE
P_PCCTgtCstForMTOCstEst view from CONSUMPTION Target cost for MTO order based on cost estimate
P_PCCTgtCstForMTSOrder view from CONSUMPTION Target cost for MTS Order
@AbapCatalog.sqlViewName: 'PPCCACTLQTY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private:true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Manufacturing order actual output quantity'
define view P_PCCOrderActualOutputQuantity
  with parameters
    P_FromFiscalYearPeriod : fis_jahrper,
    P_ToFiscalYearPeriod   : fis_jahrper
  as select from I_JournalEntryItem
  inner join             I_Ledger                     as _Ledger        on  I_JournalEntryItem.Ledger = _Ledger.Ledger
                                                                        and _Ledger.IsLeadingLedger     = 'X'
{

  key ControllingObject,
  key OrderID,
  key OrderItem,
  key _Ledger.Ledger,

      CompanyCode,
      Plant,
      Material,
      InventoryValuationType,
      InventorySpclStkSalesDocument as SalesOrder,
      InventorySpclStkSalesDocItm   as SalesOrderItem,
      
      @DefaultAggregation: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
      sum(case when ValuationQuantity is not initial
      then ValuationQuantity
      else Quantity end)                 as ActualOutputQuantity,
      @Semantics.unitOfMeasure:true
      BaseUnit,
      max(PostingDate)              as PostingDate
}
where
  (
        AccountAssignmentType        = 'OR'
    or  AccountAssignmentType        = 'OP'
  )
  and   OriginCtrlgDebitCreditCode   = 'L'
  and   TransactionTypeDetermination = 'GBB'
  and   BusinessTransactionCategory <> 'TBCS'
  and   Material                     is not null
  and(
        FiscalYearPeriod             >= $parameters.P_FromFiscalYearPeriod
    and FiscalYearPeriod             <= $parameters.P_ToFiscalYearPeriod
  )
group by
  ControllingObject,
  OrderID,
  OrderItem,
  _Ledger.Ledger,
  CompanyCode,
  Plant,
  Material,
  InventoryValuationType,
  InventorySpclStkSalesDocument,
  InventorySpclStkSalesDocItm,
  BaseUnit
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRYITEM",
"I_LEDGER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/