Skip to content

Instantly share code, notes, and snippets.

@js1972
Created July 11, 2014 02:29
Show Gist options
  • Save js1972/ecf19797b8ec4d9c9f69 to your computer and use it in GitHub Desktop.
Save js1972/ecf19797b8ec4d9c9f69 to your computer and use it in GitHub Desktop.
Reading data from an internal table in ABAP 7.40. We can now read table rows using array syntax. The only think to note is that an exception is thrown if the record is not found. You can even directly access fields after the array operator.
try.
data(forwarding_agent_details) = me->partners_tab[ parvw = c_forwarding_agent_partner ].
r_result-content = forwarding_agent_details-lifnr.
catch cx_sy_itab_line_not_found.
"Do nothing if not found
endtry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment