I still remember, when one of my team lead did a review of my first deliverable in ALV report; it was over in 1 minute. He came and clicked something and showed the inconsistencies in my report. Asked me to fix them and call him back for the review. I was so surprised. I gave my whole hearted effort for more than a week for the development and someone found issues in it within 1 minute. Huh!!!
Those were the days where we had leads like him who taught us how to fish. My lead wanted me to learn that trick for life. He wanted me to get the issue resolved and ask him, how he figured it out? I did as per his plan. He was happy to share that pressing SHIFT + RIGHT DOUBLE CLICK on an area in the ALV Grid Control in which no table rows are displayed (scroll right or bottom to find the container space) would do the trick.
Execute your report. Scroll down or right to find some empty space in the container. The areas marked with stars above are your place to keep your cursor. Simultaneously press SHIFT and Double Click your right mouse button. Check, the inconsistencies. You would be surprised how intelligent this simple consistency check is. It would catch many issues which we would definitely miss if we were to scan the code manually.
Many times, developer feel that if the report is displayed successfully, they are good. If your report is just to display, you might be fine. But, if you have some action in your report such as drill down or transaction call or any other action. Your report might dump in some scenario at run time. One of our report used to dump in production system for only some particular unknown cases and we were not able to replicate it. SHIFT + DOUBLE CLICK did the trick. It pin-pointed the issue which we thought was good to ignore.
The above report output looks good. But see the inconsistency. It looks minor but it is not correct. The field name is ‘MATNR’ but developer has wrongly named it in the field catalog as ‘MATERIAL’. Correct the field catalog and your consistency check passes.
See another example of the inconsistency report.
Friends, this is a simple trick and has been mentioned in every other ABAP forum. But still, when you come for a review, you find your young guns having issues in their reports. We learn by sharing. Pass this simple information to your young friends and I am sure, they would appreciate it.
Updated April 7th 2016: Another easy alternative to check the consistency of an ALV output. Thanks to Naimesh for his post.
On the ALV output report, type “&SOS” at the command area on top.
Hope you liked this post. Do you have any other tricks which you would like to share with us? Please feel free to email us at email@example.com or leave it in our comment section.
If you want to get updates about our new tweaks and tricks, please subscribe.
If you liked it, please share it. Thank you very much for your time!!