2013 Aug 14 9:19 AM
Hi,
I'm creating a query report in transaction SQ01, and I have a couple of local fields to include. One of these fields is to be a text field that groups employees according to their age.
There are 5 groups in total: <25y, 25-34y, 35-44y, 45-54y and 55-64y.
Some other local fields have even more possible results.
However, in the complex calculation screen, it seems I can only define 3 conditions + 1 otherwise.
The + and - buttons only increase the amount of input lines for a certain selected condition or formula, but I don't know how to add additional conditions, if this is actually possible. Although when I look at the generated code, there's no reason why it shouldn't be...
Does anyone know the solution to this? And if it's not possible, what would be a possible workaround? I can't really add the field to the infoset, because it's value is calculated from the date entered in the selection-screen. Unless I can use LDB fields in an infoset somehow?
Thanks!!
2013 Aug 14 1:17 PM
how about doing this calculation in infoset itself (SQ02)? i have done few complex calculation in SQ02 by using local variables/fields. in fact to me...SQ01 is just to design your output i.e., representation of data that you have already prepared in SQ02.
2013 Aug 14 1:17 PM
how about doing this calculation in infoset itself (SQ02)? i have done few complex calculation in SQ02 by using local variables/fields. in fact to me...SQ01 is just to design your output i.e., representation of data that you have already prepared in SQ02.
2013 Aug 14 1:56 PM
Well, no, you can also add local fields to the query that are derived from queried data.
For me, it makes little sense to add such a field to the infoset.
I finally found it, by the way. In the popup of the complex calculations, when you set the cursor on 'Condition' or 'Formula' (the text itself, not the textbox next to it!) and then click the '+', a new condition is added.
You really have to know this, the SAP documentation never mentions this functionality of the +/- buttons!! I lost 2 days on this, but I'm very happy that I can continue now
2013 Aug 14 4:15 PM
2023 Sep 07 1:30 AM
I know this is a 10 year old question, but in case somebody - like me - is looking for an answer:
In order to add additional condition in the query local field it is important to place the cursor not on the line, but on the word "Condition". Cheers. Anna
2023 Sep 07 12:37 PM
hi ANNA
This is very strange, your advice is absolutely correct
thank you very much.
TNX
2023 Sep 07 5:58 PM
Glad it helps. 🙂 Spent an hour yesterday trying to get it working.
2023 Sep 08 7:24 PM
Thank you. I recommend also posting both a question and an answer, with more details, screenshots to bring even more clarification; you may even copy/paste the text of the author if it's relevant to you -- I guess there's no copyright infringement 😄
NB: it's what I'm starting to do within the forum (provided that there's no good question/answer yet) --idea promoted by Stack Overflow.