P_EBOC_MaterialCostEstimate2
P_EBOC_MaterialCostEstimate2 is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_LedgerCompanyCodeCrcyRoles, I_MfgOrdPlngCat, P_EBOC_MaterialCostEstimate1) and exposes 33 fields with key fields CompanyCode, PlanningCategory, CostElement, BusinessTransactionCategory, ControllingDebitCreditCode.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_LedgerCompanyCodeCrcyRoles | _LedgerCompanyCodeCrcyRole | inner |
| I_MfgOrdPlngCat | _MfgOrdPlngCat | inner |
| P_EBOC_MaterialCostEstimate1 | P_EBOC_MaterialCostEstimate1 | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_Ledger | fins_ledger | |
| P_CurrencyRole | fac_crcyrole |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PEBOCMATCOSTEST2 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (33)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | _CostEstimate | CompanyCode | |
| KEY | PlanningCategory | _CostEstimate | PlanningCategory | |
| KEY | CostElement | CostElement | ||
| KEY | BusinessTransactionCategory | BusinessTransactionCategory | ||
| KEY | ControllingDebitCreditCode | ControllingDebitCreditCode | ||
| KEY | AccountAssignmentType | AccountAssignmentType | ||
| KEY | PartnerAccountAssignmentType | PartnerAccountAssignmentType | ||
| KEY | PartnerCostCenter | PartnerCostCenter | ||
| KEY | PartnerCostCtrActivityType | PartnerCostCtrActivityType | ||
| KEY | PartnerOrder | PartnerOrder | ||
| KEY | CostSourceUnit | CostSourceUnit | ||
| KEY | ProducedProduct | ProducedProduct | ||
| KEY | Material | Material | ||
| KEY | WorkCenterInternalID | WorkCenterInternalID | ||
| KEY | OrderOperation | OrderOperation | ||
| KEY | ControllingArea | ControllingArea | ||
| KEY | Plant | Plant | ||
| KEY | CostingLotSize | CostingLotSize | ||
| KEY | LotSizeUnit | LotSizeUnit | ||
| KEY | CostEstimateValidityStartDate | CostEstimateValidityStartDate | ||
| KEY | CostEstimateValidityEndDate | CostEstimateValidityEndDate | ||
| KEY | SalesOrder | SalesOrder | ||
| KEY | SalesOrderItem | SalesOrderItem | ||
| KEY | IsLotSizeIndependent | IsLotSizeIndependent | ||
| KEY | CostOriginGroup | _CostEstimate | CostOriginGroup | |
| KEY | OriginCostCenter | OriginCostCenter | ||
| KEY | OriginCostCtrActivityType | OriginCostCtrActivityType | ||
| KEY | PlnCatIsForSalesOrderCostEst | PlnCatIsForSalesOrderCostEst | ||
| KEY | PlngCatIsForOrdReltdPlnCost | PlngCatIsForOrdReltdPlnCost | ||
| KEY | PlngCatIsForMatlCostEstPlnCost | PlngCatIsForMatlCostEstPlnCost | ||
| dec148asCostRateFixedAmount | ||||
| TotalQuantity | TotalQuantity | |||
| FixedQuantity | FixedQuantity |
@AbapCatalog.sqlViewName: 'PEBOCMATCOSTEST2'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_EBOC_MaterialCostEstimate2
with parameters
P_Ledger : fins_ledger,
P_CurrencyRole : fac_crcyrole
as select from P_EBOC_MaterialCostEstimate1( P_Ledger: :P_Ledger ) as _CostEstimate
inner join I_LedgerCompanyCodeCrcyRoles as _LedgerCompanyCodeCrcyRole on _LedgerCompanyCodeCrcyRole.CompanyCode = _CostEstimate.CompanyCode
and _LedgerCompanyCodeCrcyRole.Ledger = :P_Ledger
inner join I_MfgOrdPlngCat as _MfgOrdPlngCat on _MfgOrdPlngCat.PlanningCategory = _CostEstimate.PlanningCategory
{
key _CostEstimate.CompanyCode,
key _CostEstimate.PlanningCategory,
key CostElement,
key BusinessTransactionCategory,
key ControllingDebitCreditCode,
key AccountAssignmentType,
key PartnerAccountAssignmentType,
key PartnerCostCenter,
key PartnerCostCtrActivityType,
key PartnerOrder,
key CostSourceUnit,
key ProducedProduct,
key Material,
key WorkCenterInternalID,
key OrderOperation,
key ControllingArea,
key Plant,
key CostingLotSize,
key LotSizeUnit,
key CostEstimateValidityStartDate,
key CostEstimateValidityEndDate,
key SalesOrder,
key SalesOrderItem,
key IsLotSizeIndependent,
key _CostEstimate.CostOriginGroup,
key OriginCostCenter,
key OriginCostCtrActivityType,
key PlnCatIsForSalesOrderCostEst,
key PlngCatIsForOrdReltdPlnCost,
key PlngCatIsForMatlCostEstPlnCost,
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,
// Cost Rate for Fixed Amount
cast(
case
when AmountInGlobalCurrency <> 0
then division(FixedAmountInGlobalCurrency, AmountInGlobalCurrency, 8)
else 0
end as abap.dec(14, 8)
) as CostRateFixedAmount,
//Quantity
TotalQuantity,
FixedQuantity
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LEDGERCOMPANYCODECRCYROLES",
"I_MFGORDPLNGCAT",
"P_EBOC_MATERIALCOSTESTIMATE1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA