04-02-2020 12:57 PM
Hi
I have custom report which is generated using SAP query which display an ALV in the output.Now my requirement is to show only those rows in ALV output whose three fields(lets say A,B,C are not equal to zero).IF A , B, C are equal to Zero that particular row in ALV should not be shown in ALV.
IF any one of the field is not equal to zero,that particular row should be shown in ALV output.In short we need to perform "AND" operation.
I dont see any code in INFOSET.
Thanks
04-02-2020 1:57 PM
04-02-2020 2:56 PM
04-02-2020 2:57 PM
04-02-2020 2:00 PM
Your first statement is contradicting the other two:
I assume you want to get rid of those rows, where A, B and C are all 0?
04-02-2020 9:53 PM
I would not try adapting the code from a generated program. Even if it might be done, I imagine that it will soon become very difficult to maintain and support. It might be even more efficient to rewrite it from scratch compared to reusing this generated code.
While it is possible to add free coding in the infoset, I would prefer to avoid it if possible for the same reason - troubleshooting queries with complex logic is challenging for the support team.
Instead, I would just create a local field (Z) with very simple logic to check the values of A, B and C and set a specific value to Z. AND, OR statements are supported for local fields.
And then I would create a filter in the ALV output based on Z.
Of course, this makes sense only if you do not need to work with lots of data, otherwise it is probably better to remove the entries with free coding in the infoset.
Just my 2 cents, I am not a developer.