Académique Documents
Professionnel Documents
Culture Documents
Internal Tables
MOVE-CORRESPONDING for Internal Tables
You can use MOVE-CORRESPONDING not only for structures but also for internal tables now. Components
of the same name are are assigned row by row. New additions EXPANDING NESTED TABLES and KEEPING
TARGET LINES allow to resolve tabular components of structures and to append lines instead of overwriting
existing lines.
Example
MOVE-CORRESPONDING itab1 TO itab2 EXPANDING NESTED TABLES
KEEPING TARGET LINES.
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=abapmove-corresponding.htm
Example
LET expression in a table construction using the VALUE operator.
cl_demo_output=>new( )->write(
VALUE text( LET it = `be` IN
( |To { it } is to do|
)
( |To { it }, or not to { it }| )
( |To do is to { it }|
)
( |Do { it } do { it } do|
) ) )->display( ).
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=abaplet.htm
CORRESPONDING Operator
The new constructor operator CORRESPONDING allows to execute a "MOVE-CORRESPONDING" for
structures or internal tables at operand positions. Besides assigning components of the same name you can
define your own mapping rules.
Example
struct2 = CORRESPONDING #( struct1 MAPPING b4 = a3 ).
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=abenconstructor_expr_corresponding.htm
Table Comprehensions
A new FOR sub expression for constructor expressions with operators NEW and VALUE allows to read
existing internal tables and to construct new tabular contents from the lines read.
Example
Construction of an internal table itab2 from lines and columns of an internal table itab1. You can of course also
use the CORRESPONDING operator to construct the lines.
DATA(itab2) = VALUE t_itab2( FOR wa IN itab1 WHERE ( col1 < 30 )
( col1 = wa-col2 col2 = wa-col3 ) ).
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=abentable_comprehensions.htm
Meshes
This one is a little bit tricky. Meshes are special structures whose components are internal tables, which can be
linked to
each other using associations. Associations are evaluated by specifying mesh paths in suitable expressions
and statements.The full power of meshes will become more clear in the monent when associations will be
supported by Open SQL for database views (CDS views, see below) in the future.
Example
A mesh flights is declared from a mesh type t_flights. In t_flights you have tabular components as so called
mesh nodes that are linked by associations. A structured data object root is constructed to serve as the start
line for the following LOOP over a mesh path. The results are lines from sflight that are found by following the
mesh path evaluating the associations between its mesh nodes.
TYPES:
t_scarr TYPE SORTED TABLE OF scarr
WITH UNIQUE KEY carrid,
t_spfli TYPE SORTED TABLE OF spfli
WITH UNIQUE KEY carrid connid,
t_sflight TYPE SORTED TABLE OF sflight
WITH UNIQUE KEY carrid connid fldate.
TYPES:
BEGIN OF MESH t_flights,
scarr TYPE t_scarr
ASSOCIATION to_spfli TO spfli
ON carrid = carrid USING KEY primary_key,
spfli TYPE t_spfli
ASSOCIATION to_sflight TO sflight
ON carrid = carrid AND
connid = connid USING KEY primary_key,
sflight TYPE t_sflight,
END OF MESH t_flights.
DATA:
flights TYPE t_flights.
...
DATA(root) = flights-scarr[ carrname = 'United Airlines' ].
LOOP AT
flights-scarr\to_spfli[ root ]\to_sflight[ ]
INTO DATA(wa).
...
ENDLOOP.
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=abenabap_meshes.htm
Open SQL
New Syntax
From 7.40, SP05
Lists in Open SQL statements can and should be separated by a comma.
Host variables in Open SQL statements can and should be escaped by a @.
Only then you will be able to use other new functions that are based on a new SQL parser in the ABAP kernel.
Example
SELECT carrid, connid, fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE @sflight_tab
WHERE carrid = @carrier AND
connid = @connection
ORDER BY carrid, connid.
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=ABENNEWS-740_SP05-OPEN_SQL.htm
SQL Expressions
Yo can use SQL expressions in a column list behind SELECT. The result of such an expression is calculated
on the database (code push down!) and written into the respective columns of the result set. Operands can be
data base columns or host variables.
Possible expressions are
elementary values
arithmetic expressions
arithmetic functions abs, ceil, floor, div, mod
castings with cast
string concatenations with &&
coalesce
case
Examples
SELECT id, num1, num2,
cast( num1 AS fltp ) / cast( num2 AS fltp ) AS ratio,
div( num1, num2 ) AS div,
mod( num1, num2 ) AS mod,
@offset + abs( num1 - num2 ) AS sum
FROM demo_expressions
INTO CORRESPONDING FIELDS OF TABLE @results
ORDER BY SUM DESCENDING.
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=ABAPSQL_EXPR.htm
CDS Views
The new CDS (Core Data Services) enable you to define Views of the ABAP Dictionary with a DDL (Data
Definition Language) in ADT. This DDL encompasses the DDL of SQL and enhances it with the possibility
to define annotations and associations. CDS-Views in the Dictionary are not bound to a specific database
platform. They provide another way of database independent code push down.You can acces CDS-Views
with Open SQL.
Example
Definitiion of a simple view based on only one database table. Of course, you can join as you like ...
@AbapCatalog.sqlViewName: 'BPA_VW'
define view
business_partner as
select from snwd_bpa
{ key bp_id, company_name, bp_role }
You can access the view in ABAP programs e.g. as follows:
SELECT * FROM business_partner INTO TABLE itab ...
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=ABENCDS.htm
See also the dedicated blog http://scn.sap.com/community/abap/eclipse/blog/2014/02/04/new-data-modelingfeatures-in-abap-for-hana by Chris Swanepoel.
You use AMDP as a convenient way of programming and handling Native SQL in ABAP only if you really
gain something from it. And for that, simple examples are not too easy to find, especially since Open SQL is
empowered by new features now (see above).
Example
A simple example of a database functionality that is not readily available in Open SQL is the predefined
currency conversion of HANA. An AMDP method that uses this conversion might look as follows:
METHOD convert BY DATABASE PROCEDURE FOR HDB
LANGUAGE SQLSCRIPT
USING demo_prices.
PRICES = select * from DEMO_PRICES;
PRICES =
CE_CONVERSION (
:PRICES,
[ family
= 'currency',
method
= 'ERP',
steps
= 'shift,convert,shift_back',
target_unit
= :TO_CURRENCY,
client
= :MANDT,
source_unit_column = "CURRENCY",
reference_date = :DATE,
output_unit_column = "CURRENCY",
error_handling = 'keep unconverted' ],
[ amount AS amount ] );
replace DEMO_PRICES select * from :PRICES;
ENDMETHOD.
An alternative implementation for databases other than the SAP HANA database must then be provided, e.g.
as follows:
METHOD abap_convert.
DATA prices TYPE STANDARD TABLE OF demo_prices.
SELECT *
FROM demo_prices
INTO TABLE prices.
LOOP AT prices ASSIGNING FIELD-SYMBOL(<price>).
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
client
= mandt
date
= date
foreign_amount = <price>-amount
foreign_currency = <price>-currency
local_currency = to_currency
IMPORTING
local_amount = <price>-amount
EXCEPTIONS
OTHERS
= 4.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
<price>-currency = to_currency.
ENDLOOP.
MODIFY demo_prices FROM table prices.
ENDMETHOD.
ABAP code calling these methods could look as follows:
IF cl_db_sys=>is_in_memory_db = abap_true.
NEW cl_demo_sqlscript_curr_conv(
)->convert(
EXPORTING
to_currency
= to_upper( currency )
mandt
= sy-mandt
date
= sy-datlo ).
ELSE.
NEW cl_demo_sqlscript_curr_conv(
)->abap_convert(
EXPORTING
to_currency
= to_upper( currency )
mandt
= sy-mandt
date
= sy-datlo ).
ENDIF.
More About
http://help.sap.com/abapdocu_740/en/index.htm?file=ABENAMDP.htm
Further Information
For a complete overview of all ABAP Language News for Release 7.40, SP05 see
http://help.sap.com/abapdocu_740/en/index.htm?file=ABENNEWS-740_SP05.htm
http://help.sap.com/abapdocu_740/de/index.htm?file=ABENNEWS-740_SP05.htm
If you are especially interested in ABAP for HANA, also have a look at Jens Weiler's blog New ABAP for
HANA features in SAP NW 7.4 SP5. The ABAP Keyword Documentation summarizes the respective ABAP
language features under http://help.sap.com/abapdocu_740/en/index.htm?file=ABENABAP_HANA.htm.
Outlook
The next bundled release will be 7.40, SP08 with kernel release 742. Expect some nice features from that one
too. I'm already very busy documenting them.
49146 Views Tags: abap
It's a bug. SAP does not "DO some changes in the mesh anyhow".
I was able to reproduce the error but couldn't explain it and therefore forwarded to development. The reason
are conflicting write restrictions. The loop over the mesh path wants to impose a write restriction on the table
but there is already a write restriction for an importing parameter.
The bug is under investigation and should be resolved with a kernel patch.
Thanks for notifying!
Jakob Mainka in response to Horst Keller on page 12
29 Mar, 2016 3:21 PM
Ok - weird, but problem is solved now...
First I tried your code - worked fine!
So I did mine from scratch in a local program - also fine!
Then I again had a look at my "issue" code, and saw, that there the mesh is passed to the method as an
importing-parameter (as I don't change anything within the mesh, but only read it) but unfortunately internally
SAP seems to DO some changes in the mesh anyhow, if the subnode doesn't have data according the
association - even if there is just a READ / LOOP.
So solution for my issue is just: change the parameter from IMPORTING to CHANGING
Horst Keller in response to Jakob Mainka on page 13
29 Mar, 2016 2:29 PM
I tried to reproduce the error as follows:
TYPES:
t_scarr
AHA! and given that the mesh path aren't materialized, I see now how not providing a syntax to evaluate as
a table really protects against performance problems associated with a repeated "lazy" evaluation that would
occur in something like:
LOOP AT ...
READ TABLE lt_carr_pfli_mesh-scarr\to_spfli[ <fs_carr> ][]...
ENDLOOP.
Thanks, much!
You're right. There's no way to access the result set as a whole in operand positions other than behind LOOP
etc.
The reason is, that the result set of a mesh path is not materialized but evaluated for each usage. If there
would be a syntax that allows access to the result set as a whole and you use it several times, you would start
to ask, where your performance goes. Therefore, you must do it explicitly: Extract the result set with LOOP or
FOR into a helper table once and use that.
Best
Horst
PS: And yes, it's a bit unfortunate that it is similar to header lines
Thomas Matecki
27 Jan, 2016 7:19 PM
Hi Horst,
Is there any way to control the generic type that a mesh path evaluates too?
Johan Keldermans
13 Jan, 2016 11:05 AM
Hi Horst,
According the help file on the new SQL syntax it should be possible to use LIKE and IN in JOIN conditions after
ON as of SP08 (we are running 7.4 SP09)
However, when I do so I get a syntax error (@so_org not allowed here, tried different positions without
success)
I would like to check whether there is a performance difference if I set the 'IN' after the respective ON clause vs
the WHERE
Thanks in advance
Johan
'xactly!
Inline declarations are a convenience tool that should make your code shorter and more readable. If we start
to transfer the TYPES/DATA syntax for table kind and secondary keys into the SELECT statement we do the
opposite by blowing up that statement. Therefore it was decided to KISS in that case.
Jakob Mainka in response to Horst Keller on page 20
24 Nov, 2015 2:50 PM
Well in that case the whole advantage of getting the tables created by the compiler is gone, as I can only
create standard tables (no sorted / hashed / secondary keys)
So in the end, I will have to declare the tables by myself as before
Horst Keller in response to Christiaan Edward Swanepoel on page 20
24 Nov, 2015 2:45 PM
Hmm, doesn't work for CREATE DATA either ...
And in SELECt the compiler must do it, no dynamic specification anyhow.
Christiaan Edward Swanepoel in response to Horst Keller on page 20
24 Nov, 2015 2:41 PM
But the idea is interesting :-)
Horst Keller in response to Jakob Mainka on page 20
24 Nov, 2015 2:39 PM
where (and how) can I define potential secondary keys for that table
you can't.
INTO TABLE @DATA(itab) declares a standard table itab of this row type with an empty table key.
Jakob Mainka
24 Nov, 2015 2:23 PM
Maybe I just can't find it, but...
When I get my internal table defined by the fields which I select - where (and how) can I define potential
secondary keys for that table?
e.g.
SELECT
pgmid,
object,
obj_name
INTO TABLE @DATA(lt_tadir WITH NON-UNIQUE SORTED KEY obj COMPONENTS obj_name)
FROM tadir
WHERE obj_name LIKE 'Z%'.
Horst Keller in response to Jacques Nomssi on page 21
15 Oct, 2015 6:56 PM
Table expressions, as writable expressions, can only be placed at a handful of result positions. The position
behind INSERT INTO TABLE is not such a result position.
You can INSERT INTO a mesh path and since there are square brackets too, the parser thinks, you want to do
that.
Best
Horst
PS: .B.T.W., the syntax diagrams of the next docu release will distinguish between BNF brackets and brackets
that are part of the syntax, yes!
Adi Sieker in response to Jacques Nomssi on page 21
15 Oct, 2015 4:09 PM
As far as I know, the new syntax does not create a field symbol so it is not the same as the old syntax version.
table[ v = v ] will create a "copy" it does not assign a field symbol.
Jacques Nomssi
15 Oct, 2015 4:03 PM
Hello,
I found
READ TABLE mt_vertices ASSIGNING <ls_graph_vertex>
WITH KEY v = v.
INSERT w INTO TABLE <ls_graph_vertex>-adj.
passed the syntax check but
INSERT w INTO TABLE mt_vertices[ v = v ]-adj.
triggers "Invalid syntax for an association".
What am I missing here? the documentation gives the impression INSERT INTO TABLE is only for meshes. Is
the parser confused?
regards,
JNN
P.S. for testing:
TYPES tv_vertex TYPE syindex.
TYPES tt_path TYPE STANDARD TABLE OF tv_vertex WITH NON-UNIQUE DEFAULT KEY.
SP08 has great new features but I suppose basis team won't upgrade if there are much work/trouble.
J.
Horst Keller in response to Jesus Antonio Santos Giraldo on page 23
26 May, 2015 7:54 AM
Hi,
see modification 3, sql expressions together with aggregates works since SP08.
H.
Jesus Antonio Santos Giraldo
21 May, 2015 7:14 PM
Hi,
BTW, very nice post about the new ABAP features in Release 7.40.
We recently upgraded to EHP7 and we gain some of these features.
Particularly the enhancements of open sql suits us very well with programs we are developing now.
However a SELECT I'm trying to do is not working. By the ABAP online help it should work, I think, but it is not.
I explain myself:
In the online help it states that you do a SELECT like this:
SELECT
Where is ... ...
And could be a
And
And
And
And
could be
could be SUM( [DISTINCT] col| )
could be
could be CASE operand
WHEN operand1 THEN result1
[WHEN operand2 THEN result2]
...
[ELSE resultn]
END
J.
Horst Keller in response to Ramananda L N on page 24
18 Dec, 2014 11:21 AM
In this case move corresponding can move data to relevant fields/tables between
structures?
Yes, because the enhanced structure is known at compile time. In fact, MOVE-CORRESPONDING even
works for generically typed field symbols or formal parameters. Then the comparison of names takes place at
runtime.
Is it is supported in lower releases below 7.4 ?
MOVE-CORRESPONDING for structures is supported since long time. MOVE-CORRESPONDING for internal
tables, see blog above.
Ramananda L N
18 Dec, 2014 8:32 AM
Hi,
I have one question. If have str1 and srt2 deep structure it has several internal tables in it. In this str1 can be
enhanced and str2 is cannot be enhanced.
In this case move corresponding can move data to relevant fields/tables between structures? Is it is supported
in lower releases below 7.4 ?
Best Regard,
Ramananda
Adi Sieker in response to Horst Keller on page 25
1 Dec, 2014 2:44 PM
Hi Horst,
thanks for the info. I must admit I didn't look in the docs.
I don't think my customer is on SP08 yet. I don't really keep track of that.
Regards
Adi
Horst Keller in response to Adi Sieker on page 25
28 Nov, 2014 6:05 PM
Hello Adi,
see the respective ABAP Keyword Documentation.
"In an assignment of the constructor expression to an internal table, its
existing rows cannot be used directly as an argument in line_spec. This is because this table is deleted before
line_spec is evaluated or overwritten by the content of
itab. If the entire internal table or rows from the
left side are needed on the right side, however, they can be saved in local
auxiliary variables using a LET
expression, since this expression is evaluated first".
So, do something like (I didn't make a syntax check)
lt_lines = value erdz_tab( let it = lt_lines in
for ls_line in it
where ( nettobtr lt 0 )
( ls_line ) ).
and it should work.
Regards
Horst
PS: that's also something for the new FILTER operator.
Adi Sieker
28 Nov, 2014 2:38 PM
Hello Horst,
I just ran into a weird behaviour
the following code snippet will produce an empty table instead of a filled table as I would expect:
data(lt_lines) = value erdz_tab(
( nettobtr = '50.00-' )
( nettobtr = '50.00-' )
( nettobtr =
'100.00-' )
( nettobtr = '80.00-' )
( nettobtr = '50.00-' )
( nettobtr = '100.00-' )
( nettobtr =
'50.00-' )
( nettobtr = '50.00-' )
).
lt_lines = value erdz_tab( for ls_line in lt_lines where ( nettobtr lt 0 ) ( ls_line ) ).
Is this expected behaviour?
If I replace the last line with
data(lt_lines2) = value erdz_tab(...)
lt_lines2 is filled.
Regards
Adi
Suhas Saha in response to Horst Keller on page 26
22 Sep, 2014 5:55 PM
Horst Keller wrote:
I guess, I have enough examples ...
...
In fact, no blogs needed since everything is documented here (refresh your browser's
caches).
...
In fact, no blogs needed since everything is documented here (refresh your browser's caches).
= mcomp1
= mcomp2
substruc-comp1 = substruc_subcomp1
... ).
OK, OK, 'twasn't a master piece, but documenting these expressions ...
I changed the syntax diagram to
MAPPING {t1 = s1}|( t1 = s1 [MAPPING ...] [EXCEPT ...] )
{t2 = s2}|( t2 = s2 [MAPPING ...] [EXCEPT ...] )
...
placed the text about nesting more prominently and added a simple example directly to the text. This will be
available in 7.40, SP012.
You find example code already now (Example) but maybe not too clear?
Horst
Horst Keller in response to SAP ITR ENTWICKLUNG on page 30
17 Sep, 2014 8:05 AM
Hi Rdiger,
The exception object also contains attributes for the table keys used. If you can distinguish the table
expressions by different keys, you can find out which has failed, otherwise (index access) there's no way.
Best
Horst
Jacques Nomssi in response to Horst Keller on page 30
16 Sep, 2014 7:04 PM
many thanks Horst!
after reading the documentation, I could not express this logic correctly until I saw your code. Note: CALLER
is not defined in the source as a structure, so your proposal does not compile verbatim. I had to use the
TABLE_LINE keyword.
rs_sat =
CORRESPONDING #(
is_trace mapping ( caller = table_line
mapping prog = caller
type = caller_type
inst = caller_inst ) ) .
Kind regards,
JNN
P.S.
Unfortunately the resulting code behavior is incorrect. I have created a test report with an unit test in the SCN
Wiki to demo the problem.
SAP ITR ENTWICKLUNG
16 Sep, 2014 3:25 PM
Horst,
when I presented the new ABAP features in our team, one of the questions I could not answer was how to
track a table access error in a complex read statement, like this one from your fun example:
ev_result = it_table[ 2 ]-col2[ 1 ][ 2 ]-col1.
In case something goes wrong, the exception CX_SY_ITAB_LINE_NOT_FOUND is issued. The attribute
INDEX gives the index value for which the read access failed - 2, say - but which one was it? it_table[ 2 ]
or ...col2[ 1 ][ 2 ]? Is there a way to find this out on base of the exception object, that is: in the CATCH clause?
Regards,
Rdiger
Horst Keller in response to Jacques Nomssi on page 30
16 Sep, 2014 2:59 PM
Nested mapping:
rs_sat =
CORRESPONDING #(
is_trace mapping ( caller = caller
mapping prog = caller
type = caller_type
inst = caller_inst ) ) .
See: mapping
Jacques Nomssi
15 Sep, 2014 12:16 PM
Hello Horst
can I use the MAPPING option in the CORRESPONDING operator to create sub-structures in the target ? e.g.
is there a replacement for the following method?
METHODS convert_struct IMPORTING is_trace TYPE ts_sat
RETURNING VALUE(rs_sat) TYPE ts_trace.
METHOD convert_struct.
MOVE-CORRESPONDING is_trace TO rs_sat.
rs_sat-caller = VALUE #( prog = is_trace-caller
type = is_trace-caller_type
inst = is_trace-caller_inst ).
ENDMETHOD.
regards,
JNN
Krzysztof Ziniewicz in response to Shai Sinai on page 31
25 May, 2014 8:40 PM
You can check https://service.sap.com/pam for EHP dependencies.
Uwe Fetzer in response to Uwe Fetzer on page 32
7 May, 2014 10:13 AM
Important: Answered: Re: DDL and customer namespace -> create your DDL in customer namespace (or
move, if already created).
Uwe Fetzer in response to Uwe Fetzer on page 32
6 May, 2014 4:37 PM
I've opened a separate thread for this question: DDL and customer namespace
Shai Sinai in response to Suhas Saha on page 31
4 May, 2014 5:50 AM
Yeap, Thanks for the info. This is the standard installation for ERP EhP7.
My (theoretical) question was about EhP0.
Suhas Saha in response to Shai Sinai on page 33
2 May, 2014 8:19 PM
Is it possible to install NW 7.4 on ERP 6 EhP0 (Or more precisely, upgrading NW to 7.40
without upgrading any ERP components)?
Our SAP landscape is on ERP6, EhP7 and is running ABAP Kernel 740, Patch level 4.
BR,
Suhas
Uwe Fetzer
2 May, 2014 3:09 PM
Hello Horst,
I've finally managed to install a NW7.40 SP5 to play around with the new ABAP features.
Currently I'm trying out DDLs and have a (maybe) stupid question:
why don't the cds_entity names (the view names) have to be in the customers namespace?
If I create a "business_partner" view like in the above example, SAP may create another one in the upcoming
SPs and voil we have a problem (don't we?).
Sudhir Kumar
11 Mar, 2014 1:58 PM
Hi Sir,
Thanks for this valuable blog for great new feature of ABAP.
It's good to see many features are added to ABAP with new releases
Thanks,
Sudhir
From a technical point of view a mesh as a data object is simply a structure with tabular components. In ABAP
you can treat it like that. e.g. for addressing and filling the components. There is no join relation instantiated
between the components. The relation between the components is defined in the mesh type only. The only
way of using these relations is using a mesh path in the program. The mesh path is evaluated at runtime of the
program. You could program the same with normal internal tables and normal table statements yourself. But
meshes and mesh pathes offer a more convenient and more efficient way to solve related tasks.
Kind regards,
Horst
PS: B.T.W. here is an example how to achieve a join between two internal tables http://help.sap.com/
abapdocu_740/en/index.htm?file=ABENTABLE_CMPRHNSNS_JOIN_ABEXA.htm
Suhas Saha
7 Feb, 2014 2:39 PM
Hello Horst,
Is it safe to say "meshes" are like "joins" on internal tables?
BR,
Suhas
Peter Inotai in response to Horst Keller on page 35
7 Feb, 2014 2:06 PM
Thanks a lot for the detailed answer.
For point 1) I'm sure you will share it here, once it can be shared.
For point 2) now the picture is more clear. I'm looking forward to be able to play around with it.
Peter
Horst Keller in response to Peter Inotai on page 36
7 Feb, 2014 12:39 PM
Hi Peter,
Can you already share something about SP08 with kernel release 742?
Hmm, officially I'm not allowed to speak about deatails of future releases, but what I can tell you is that ABAP
will continue its evolution and that again many new nice features will come that will close existing gaps and
enhance the language with new functionality.
I also don't really understand what was the main motivation with AMDP that SQLscript is
mixed up with ABAP instead of keeping SQLscript as a new, separated repository object
like XLST transformation for example?
AMDP is not about SQLScript. AMDP is about Native SQL or other DB languages. AMDP can be seen as an
advanced way of embedding Native SQL into ABAP - a modern EXEC SQL so to say. SQLScript of HANA
is simply the first language supported by AMDP. AMDP offers an open API to any DB. If other DB platforms
then HANA will support AMDP, AMDP can also support their languages. You also cannot compare DB
procedures to XSLT programs. While an XSLT program is compiled and excuted on the application server,
dabase procedures are entities of their DB. Before running an AMDP method from ABAP the first time, the
system checks if the corresponding DB procedure is available in the DB and if it has the most recent version.
If necessary the DB procedure is created or replaced and then executed. You can even examine and call the
AMDP managed DB procedure in the HANA Studio. But its lifecycle management is completely governed
by ABAP and therefore by ABAP's transport management. And this is the main advantage. Regarding the
execution of the AMDP managed DB procedure, there is no difference to any native DB procedure created in
the HANA Studio. But for calling and software logistics there is no difference to a normal ABAP method.
Best
Horst
Horst Keller in response to Wouter Lemaire on page 37
7 Feb, 2014 12:15 PM
Is HANA required for the SQL Expressions or will this work with any database on ABAP
7.40 SP5 ?
Hi Wouter,
Its Open SQL, it works on all databases (my colleagues are working hard to produce the same results for all
supportet DBs. Especially for calculations the task is not trivial).
Best
Horst
Peter Inotai
7 Feb, 2014 11:35 AM
Hi Horst,
Thanks for this great new feature overview.
It's good to see that currently with SPs so many features are added to ABAP as earlier with new releases
I have some questions (as usual
):
Can you already share something about SP08 with kernel release 742? Or it's too early?