Hi All,
Since my current project has an upgraded version of SAP, I can't stop getting my hands dirty in the new version of ABAP.
It was while writing use-cases for my own reference that I stumbled upon a common scenario of APPENDING data to an internal table having READ statement within a LOOP.
Below is my code snippet where I showed the old way of appending data and a new one. I've replaced LOOP with FOR expression and IF condition with COND operator.
I need help from experts on how can we control the data coming from MVKE table in new syntax. There's a class exception CX_SY_ITAB_LINE_NOT_FOUND for table expression, however, is there any way we can use it with FOR expression? When I execute the second method, it results in a short dump when no material is found.
Old Way->
New Way->
Thanks!