-
Notifications
You must be signed in to change notification settings - Fork 3
Source: Inline
Nuno Godinho edited this page May 20, 2019
·
1 revision
The INLINE
source type is as simple as it gets. If you like math, we can say it implements the Identity function: it returns what it gets.
It is used for all those cases in which the program already has the needed data.
- The
DB
format expects just a table name as data. This is a very common scenario in which the inline content will simply be used to provide the table name to it; - We have XML data in a string variable. We use the
INLINE
content to provide this data to theXML
format.
It is implemented in class ZCL_ABAK_SOURCE_INLINE
.
DATA o_source_inline TYPE REF TO zcl_abak_source_inline.
CREATE OBJECT o_source_inline
EXPORTING
i_content = 'Hello world'.
And then you feed it to ZCL_ABAK_FACTORY=>GET_CUSTOM_INSTANCE()
together with an instance to a FORMAT
class.
Using custom components is the only situation in which you need to explicitly instantiate these classes. If you're using built-in SOURCE
and FORMAT
types this will be automatically done for you by the other factory static methods.