Skip to content

Instantly share code, notes, and snippets.

@js1972
Created July 4, 2014 02:19
Show Gist options
  • Save js1972/10c4a92fe124d8af7ace to your computer and use it in GitHub Desktop.
Save js1972/10c4a92fe124d8af7ace to your computer and use it in GitHub Desktop.
Using the new DATA() operator to declare a new variable in-line and the new NEW() operator for instantiating an object. These are available from ABAP 7.40. In this example we are creating a new string object, then de-referencing when we need to use it in the method call. We are also creating a new lcl_text_reader object and immediately calling t…
data(delivery_value) = new string( delivery ).
data(text) = new lcl_text_reader( )->get_as_string(
id = '0002'
name = delivery_value->*
object = 'VBBK'
).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment