cancel
Showing results for 
Search instead for 
Did you mean: 

Selection Condition Thru Formulas in ratio

0 Kudos

Hi there,

In BEX, is it possible to use two different selections within a ratio formula, and choose which one is used depending on dimension values?

For example:

If my dimension 0PLANT value = "0001", the formulas would call the selection "Sales ($)"; but if 0PLANT value = "D001", it would show 'Transfered units'.

Thanks

E.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

As I was answering, I think I got it...

former_member586947
Contributor

Hi,

Good that you have got the solution and my comments gave you some lead. Hope you have implemented the if, else logic in Sales or Transfers formula.

Regards,

Satya.

0 Kudos

Hi Satya

Thanks for your help; just to precise my problematic:

My question is if, within a Bex query, I can insert two choices of Selections in a column formula in order to show one or the other depending on what my dimension 0PLANT will show. In the analysis view (see images below), I would like the 0PLANT value 'D001' (in green) to show the selection 'transfers' instead of sales. The reason being that I want to see how many of this Material is exiting the warehouse to the 8 different Plants; but in the same column, I want to see the sales on the same material for all the other PLANTS.

I understand the logic of your suggestion, but I don't know on which level to apply this 'if/else' code. I'm trying to figure out if I can do this in a Bex query somehow... I hope this will be clearer 😉

former_member586947
Contributor
0 Kudos

Hi,

I didn't understand the requirement completely, can you elaborate more.

You can create selections based on dimension values.

Just to give you a lead on how to get the desired selection keyfigure based on the plant, try the below method.

If you are accepting a user input for plant, then create your desired selections (sales and transferred units) with plant restriction and use the customer exit variables to restrict the plants.

Now implement the logic as below for sales selection and transferred units selection.

When <variable for plant in sales selection>
I_step 2.
Read i_t_var_range into loc_range where vnam = < plant given in user input>.
If loc_range-low = '001.
" Update variable value to plant
Else.
" Update some dummy value to plant which will give the null value for the sales selection
Endif.
Endcase.
When <variable on plant in transferred units slection>.
Read Table i_t_var_range into loc_range where vnam = <plant given in the user input>.
If loc_range -low = 'ID001'.
" Update variable value to plant
Else.
" Update dummy value to plant to result null value.
Endif.
Endcase.

Regards,

Satya.