Language
Public
Disclaimer
This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.
Inline Declarations
Constructor Expressions
Grouping
Further News
s = |Hello,\n| &
|today is { sy-datum date = iso }\n| & String Templates
|now is { sy-uzeit time = iso }|.
Inline Declaration
... DATA(var) ...
... FIELD-SYMBOL(<fs>) ...
These new operators combine the declaration and (initial) value assignment of a variable / field symbol.
Allowed at write positions for which a type can be determined statically from the context.
This “inferred” type is given to the declared symbol.
ixml = cl_ixml=>create( ).
document = ixml->create_document( ).
streamfact = ixml->create_stream_factory( ).
stream = streamfact->create_istream_xstring( … ).
DATA(ixml) = cl_ixml=>create( ).
DATA(document) = ixml->create_document( ).
DATA(stream) = ixml->create_stream_factory(
)->create_istream_xstring( … ).
Syntax: tab[ … ]
wa = tab[ idx ].
READ TABLE tab INDEX idx INTO wa.
READ TABLE tab WITH TABLE KEY key wa = tab[ KEY key col1 = … col2 = … ].
COMPONENTS col1 = … col2 = …
INTO wa.
8 9
11 12
13 14
10
15 16 DATA(num) = tab[ 2 ]-col2[ 1 ][ 2 ]-col1.
17 18
In each iteration (table-driven or condition-driven), re-compute the result value (and helper variables).
Generalization of table comprehension from table to arbitrary result type
Table Comprehension
Reduction
REDUCE #( INIT r = …
FOR GROUPS g OF x IN tab GROUP BY groupkey(x)
NEXT r = … FOR m IN GROUP g ( … ) …
)
Obfuscation Performance
itab1[ 1 ]-a = itab2[ 1 ]-x.
lcl=>cm_ii( itab1[ 1 ]-b = itab2[ 1 ]-y.
lcl=>factory2( itab1[ 1 ]-c = itab2[ 1 ]-z.
f_in1 = lcl=>factory0( )->im_ii( i )
f_in2 = lcl=>cm_ii( 2 ** i ) - 3 +
itab[ 2 ]-s-xtab[ x = 'abc' ]
)->m_ii(
lcl=>factory1( f_in = itab[ a = 2
b = 4711 / 2
]-x
)->m_lif_i( lcl=>cm_ii( 5 ) )->im_ii( 6 )
)
).
Backported to
7.02!
JSON - JavaScript Object Notation, data format in text form for data exchange.
DATA(xml) = cl_abap_codepage=>convert_to(
`<object><str name="TEXT">JSON</str></object>` ).
DATA(xml_reader) = cl_sxml_string_reader=>create( xml ).
DATA(json_writer) = cl_sxml_string_writer=>create( type = if_sxml=>co_xt_json ).
xml_reader->next_node( ).
xml_reader->skip_node( json_writer ).
cl_demo_output=>display_json( json_writer->get_output( ) ).
DATA(json) = `{"TEXT":"JSON"}`.
CALL TRANSFORMATION id SOURCE XML json
RESULT XML DATA(xml).
cl_demo_output=>display_xml( xml ).
DATA(text) = `JSON`.
DATA(json_writer) = cl_sxml_string_writer=>create( type = if_sxml=>co_xt_json ).
CALL TRANSFORMATION id SOURCE text = text
RESULT XML json_writer.
cl_demo_output=>display_json( json_writer->get_output( ) ).
DATA(json) = `{"TEXT":"JSON"}`.
DATA text TYPE string.
CALL TRANSFORMATION id SOURCE XML json
RESULT text = text.
cl_demo_output=>display( text ).
A A
WebSocket Protocol
P P
C C
Enable message based communications between ABAP programs across the boundaries of application servers.
CAST if_amc_message_producer_text(
cl_amc_channel_manager=>create_message_producer(
i_application_id = 'DEMO_AMC'
i_channel_id = '/demo_text' )
)->send( i_message = ... ).
cl_amc_channel_manager=>create_message_consumer(
i_application_id = 'DEMO_AMC'
i_channel_id = '/demo_text'
)->start_message_delivery( i_receiver = receiver ).
WAIT FOR MESSAGING CHANNELS
UNTIL receiver->text_message IS NOT INITIAL
UP TO 60 SECONDS.
DATA(cond) = `country = 'DE' AND name = '` && name && `'`.
TRY.
SELECT * FROM scustom
INTO TABLE customers
WHERE (cond).
cl_demo_output=>display( customers ).
CATCH cx_sy_dynamic_osql_syntax.
cl_demo_output=>display( 'Wrong input' ).
ENDTRY.
F2
Classic ADT
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Public 53
Further Information
Contact information:
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an
SAP affiliate company.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark
information and notices.
Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its
affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing
herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or
release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future
developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for
any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-
looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place
undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.