P_EBWIP_ProductionCost2

DDL: P_EBWIP_PRODUCTIONCOST2 SQL: PEBWIPPRODC2 Type: view COMPOSITE

P_EBWIP_ProductionCost2 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_LedgerCompanyCodeCrcyRoles, P_EBWIP_ProductionCost1) and exposes 3 fields with key fields CompanyCode, OrderID, OrderItem.

Data Sources (2)

SourceAliasJoin Type
I_LedgerCompanyCodeCrcyRoles _LedgerCompanyCodeCrcyRole inner
P_EBWIP_ProductionCost1 P_EBWIP_ProductionCost1 from

Parameters (3)

NameTypeDefault
P_KeyDate datum
P_Ledger fins_ledger
P_CurrencyRole fis_curtp

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PEBWIPPRODC2 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode _ProductionCost CompanyCode
KEY OrderID OrderID
KEY OrderItem OrderItem
@AbapCatalog.sqlViewName: 'PEBWIPPRODC2'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

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

define view P_EBWIP_ProductionCost2
  with parameters
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate      : datum,
    P_Ledger       : fins_ledger,
    P_CurrencyRole : fis_curtp
  as select from P_EBWIP_ProductionCost1( P_KeyDate : :P_KeyDate,
                                          P_Ledger  : :P_Ledger ) as _ProductionCost
    inner join   I_LedgerCompanyCodeCrcyRoles                     as _LedgerCompanyCodeCrcyRole on  _LedgerCompanyCodeCrcyRole.CompanyCode = _ProductionCost.CompanyCode
                                                                                                and _LedgerCompanyCodeCrcyRole.Ledger      = :P_Ledger
{
  key _ProductionCost.CompanyCode,
  key OrderID,
  key OrderItem,

      // Produced Amount from ACDOCA by Currency Role

      cast(
        case :P_CurrencyRole
           when CompanyCodeCurrencyRole  then AmountInCompanyCodeCurrency
           when GlobalCurrencyRole       then AmountInGlobalCurrency
           when FreeDefinedCurrency1Role then AmountInFreeDefinedCurrency1
           when FreeDefinedCurrency2Role then AmountInFreeDefinedCurrency2
           when FreeDefinedCurrency3Role then AmountInFreeDefinedCurrency3
           when FreeDefinedCurrency4Role then AmountInFreeDefinedCurrency4
           when FreeDefinedCurrency5Role then AmountInFreeDefinedCurrency5
           when FreeDefinedCurrency6Role then AmountInFreeDefinedCurrency6
           when FreeDefinedCurrency7Role then AmountInFreeDefinedCurrency7
           when FreeDefinedCurrency8Role then AmountInFreeDefinedCurrency8
         else 0
      end as farp_amount_display_crcy) as AmountInDisplayCurrency
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LEDGERCOMPANYCODECRCYROLES",
"P_EBWIP_PRODUCTIONCOST1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/