Posts

Showing posts from June, 2017

ABAP 7.50 – CORRESPONDING

But as you all know there is a  prominent exception  to that rule: All the syntax forms involving  CORRESPONDING  for assigning structure components that (by chance) have the same name. Before ABAP 7.40, these were mainly  MOVE-CORRESPONDING  for the components of structures, the  CORRESPONDING  addition to Open SQL’s  SELECT , and some obsolete calculation statements. With ABAP 7.40  MOVE-CORRESPONDING  was enabled to handle structured internal tables and a new constructor operator  CORRESPONDING  was introduced that allows an explicit mapping of structure components with different names. What was still missing?  A dynamic mapping capability! And this was introduced with ABAP 7.50. The new system class CL_ABAP_CORRESPONDING allows you to assign components of structures or internal tables with dynamically specified mapping rules. The mapping rules are created in a mapping table that is...

ABAP 7.40 – Inline Declarations

Inline declarations are a new way of declaring variables and field symbols at operand positions. Data Declarations In ABAP you have many operand positions, where the value of the operand is changed by the statement. The most typical of these “write positions” is the left hand side  lhs  of an assignment. lhs = rhs. But of course there are more. The data objects you can use at these write positions are either writable formal parameters of the procedure you are working in or variables declared with  DATA  in front of the statement. In many cases the variables filled by a statement are helper variables that you only need close to the statement. For each of  these helper variables you had to write a data declaration with the  DATA statement and of course it was your task to give the variable an adequate type. Well, the operand type of most write positions is statically fixed and well known to the compiler. And this is why ABAP can of...