Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CR2013 - Use dynamic fieldname in formula

Hi experts,

I would like to know if it's possible to use a dynamic fieldname in a formula.

Example :

I have a query with many fields :

- ID

- Flag (can be 1, 2 or 3)

- Amount1

- Amount2

- Amount3


- Amount100

If Flag = 1, I need to take Amount1, If 2, Amount 2, ...

So I use a case statment :

select {Flag}

     case "1":


     case "2":


     case "3":



     case "100":




Instead, what I would like to do is something like :

{Amount & {Flag}} to remove the case statement.

I'm not sure to be clear.

Thank you in advance.



Former Member
Not what you were looking for? View more on this topic or Ask a question