I'm new to BW and am taking over maintenance of some existing BW code. I have one data load where there is hard-coded ABAP logic in an Update Rule, in the form of a large CASE structure that does a translation based on the incoming values. Similar to the following
"conversion for 2014
CASE COMM_STRUCTURE-/bic/zinfield
WHEN '1'.
RESULT = 'MELANIE'.
WHEN '2'.
RESULT = 'ERRICK'.
WHEN OTHERS.
RESULT = 'KAREN'.
ENDCASE.
I am now faced with updating this logic for the new year, where the business wants the conversion above to be in effect for last year's records, but for there to be a new conversion mapping for this year's records, such as
"conversion for 2015
CASE COMM_STRUCTURE-/bic/zinfield
WHEN '1'.
RESULT = 'KIRON'.
WHEN '2'.
RESULT = 'MIHKEL'.
WHEN '3'.
RESULT = 'LENA'.
WHEN OTHERS.
RESULT = 'MAHTAB'.
ENDCASE.
I don't know why this logic was hard-coded in the first place. The mapping for each year will be maintained in a custom Z table in an R/3 system. If I was writing ABAP code on that R/3 system, I would just SELECT against that table to do the conversion.
What I'd like to know is what would be considered the best practice for doing this conversion in BW?
My first instinct is to create a Z table in the BW system that is a copy of the R/3 table, populate it with the same data, and use a SELECT against it in the update rule. That table would change very rarely, so the maintenance burden for keeping that BW table in sync with R/3 is much lower than the maintenance burden from the hard coding. But I imagine there are better ways to accomplish the same thing, without defining a new Z table in BW. The BW system that I am on uses very few Z tables, so I assume they are a last resort.
Do the gurus out there have any recommendations for how to replace this hard coding? Preferably without defining a hierarchy characteristic - I am new to BW, and defining a time-dependent hierarchy characteristic seems a little sophisticated for my first work in BW....
Thanks
Gord