on 09-13-2017 8:04 PM
All,
We have been struggling to find a graphical solution for a conditional join using case statements (currently we use script based calculation views, as in my example below). As SAP does not recommend using script based calculation views for performance reasons, and to potentially simplify our current models, I am in search for a graphical solution for this conditional join. Here is the script which pertains to the join:
WHERE.....
and (a."JOIN_OPTION1" = (casewhen a."JOIN_OPTION1" = 'X' then a."JOIN_OPTION1" else b."REFERENCE_NUMBER"end))
and (a."JOIN_OPTION2" = (casewhen a."JOIN_OPTION2" = 'X' then a."JOIN_OPTION2"else b."CUSTOMER"end))
and (a."JOIN_OPTION3" = (casewhen a."JOIN_OPTION3" = 'X' then a."JOIN_OPTION3"else (ifnull(aj."TOTAL_BUDGET", b."SPENDING")) end))
and (a."JOIN_OPTION4" = (casewhen a."JOIN_OPTION4" = 'X' then a."JOIN_OPTION4"else b."COST"end))
Using "JOIN_OPTION1" as an example, there are 2 options which can occur
For our particular business logic both of these scenarios need to be accounted for. I am unable to screen share. I really appreciate any and all feedback if there is a graphical solution! Thanks in advance.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.