ABAP Objects in Release 6.20
1. New Class for Calculating with Time Stamps
2. New Variant PROVIDE FIELDS
3. Creating Objects from the XSLT Processor
4. Polymorphism and Object Services
5. Error Handling and Exceptions
6. New Methods for Ascertaining Type Attributes
7. Accessing Data References and Static Class Components in JavaScript
Modification 1
New Class for Calculating with Time Stamps
The class CL_ABAP_TSTMP was introduced for calculating with time stamps.
Modification 2
New Variant PROVIDE FIELDS
The PROVIDE FIELDS statement allows you to process internal tables without headers. The functions of the PROVIDE statement are therefore also available under ABAP Objects.
- Modification 3
Creating Objects from the XSLT Processor
It is possible to create objects and call class methods from the XSLT processor. Now only public methods are allowed, whereas previously you could also call private and protected methods.
The transfer of parameters now supports all ABAP Elementary Types, any object references, as well as the generic types CSEQUENCE and XSEQUENCE. Previously, the types C, D, F, I, N, STRING, and T were supported.
The transfer has been tightened, so that for the data types D and I only valid specifications are permitted. Value losses for type P are now caught. The values of types X and XSTRING are converted into the XML standard format BASE64.
Modification 4
Polymorphism and Object Services
* The uniqueness of object keys is now checked not only by class, but across the whole inheritance hierarchy. Additionally, the behavior of the following methods has been changed:
* The methods RELEASE and REFRESH_PERSISTENT behave polymorphically, so that objects of subclasses can also be handled.
* The methods GET_PERSISTENT and DELETE_PERSISTENTnow access a table of the root class first, to optimize the type determination. Because the type is now stored over several transactions, it can no longer be changed.
* By searching in the tables of the root class, the methods CREATE_PERSISTENT and CREATE_TRANSIENT now check whether the object key exists in another class of the inheritance hierarchy.
Modification 5
Error Handling and Exceptions
The Interfaces IF_ABAP_MESSAGE and IF_ABAP_SERIALIZABLE_OBJECT have been added to the class CX_ROOT, which is the global superclass for all exceptions. They format texts from classes, implemented by these interfaces, as Message Texts. You can use the GET_LONG_TEXT method to obtain the long text for the exception text.
Modification 6
New Methods for Ascertaining Type Attributes
Two new methods have been introduced for ascertaining type attributes at runtime (RTTI):
* The IS_READ_ONLY method ascertains whether a referenced data object is write-protected.
* The method APPLIES_TO_DATA_REF carries out a type check between the description object and the data object. This allows you to ascertain the compatibility of data objects.
Modification 7
Accessing Data References and Static Class Components in JavaScript
Binding JavaScript objects to ABAP Objects has been extended to allow you to access data reference variables and static components (attributes and methods) of classes. In bound internal tables, you can delete rows using the JS method deleteLines and the JS method append has been renamed appendLine.
No comments:
Post a Comment