Skip to content

Commit

Permalink
Normalize Posting period and Moving averga price fields for ecc and s4
Browse files Browse the repository at this point in the history
Make field names ECC/S4 agnostic
  • Loading branch information
Lsubatin authored Apr 2, 2023
2 parents 5f0c704 + b069d0f commit ff842e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions views/materials_valuation_v2.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ view: materials_valuation_v2 {
sql: ${TABLE}.PriceUnit_PEINH ;;
}

dimension: posting_period_lfmon {
dimension: posting_period {
type: string
sql: ${TABLE}.PostingPeriod_LFMON ;;
sql: ${TABLE}.PostingPeriod ;;
}

dimension: fiscal_year {
Expand All @@ -47,7 +47,7 @@ view: materials_valuation_v2 {
dimension: month_year {
type: string
hidden: no
sql: concat(${fiscal_year},"/",${posting_period_lfmon}) ;;
sql: concat(${fiscal_year},"/",${posting_period}) ;;
}

dimension: price_control_indicator_vprsv {
Expand All @@ -65,9 +65,9 @@ view: materials_valuation_v2 {
sql: ${TABLE}.ValueOfTotalValuatedStock_SALK3 ;;
}

dimension: moving_average_price_verpr {
dimension: moving_average_price {
type: number
sql: ${TABLE}.MovingAveragePrice_VERPR ;;
sql: ${TABLE}.MovingAveragePrice ;;
}

dimension: currency_key_waers {
Expand All @@ -82,12 +82,12 @@ view: materials_valuation_v2 {
valuation_type_bwtar,
valuation_area_bwkey,
price_unit_peinh,
posting_period_lfmon,
posting_period,
fiscal_year,
price_control_indicator_vprsv,
standard_cost_stprs,
value_of_total_valuated_stock_salk3,
moving_average_price_verpr,
moving_average_price,
currency_key_waers
]
}
Expand Down
2 changes: 1 addition & 1 deletion views/vendor_performance.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ view: vendor_performance {
WHEN ${material_type} = 'FERT' OR ${material_type} = 'HALB'
THEN COALESCE(${materials_valuation_v2.standard_cost_stprs}, ${Purchase_Price1})
WHEN ${material_type} = 'ROH' OR ${material_type} = 'HIBE'
THEN COALESCE(${materials_valuation_v2.moving_average_price_verpr}, ${Purchase_Price1})
THEN COALESCE(${materials_valuation_v2.moving_average_price}, ${Purchase_Price1})
END ;;
}

Expand Down

0 comments on commit ff842e8

Please sign in to comment.