Join
Join
{
"data": "abc",
"tab": ["a", "b", "c"]
}<br>
|data |tab |
|"abc"|3 lines (first: "a", second: "b, third: "c") |
or,
|data |tab |
|"abc"|"a","b","c" |
However, I'm stuck because the field "tab" is a table of string which does
not have field names.
How can I define such type that can receive an array of string as a table?
it's easy:
<object tt:ref=".ROOT">
<str name="data" tt:value-ref="DATA"/>
<array name="tab">
<tt:loop ref="TAB">
<str tt:value-ref="TABLE_LINE"/>
</tt:loop>
</array>
</object>
METHOD if_oo_adt_classrun~main.
DATA:
begin of ls_result,
data type string,
* tab type standard table of string with empty key,
tab TYPE string_table,
end of ls_result.
out->write( ls_result-data ).
LOOP AT ls_result-tab REFERENCE INTO DATA(lr).
out->write( lr->* ).
ENDLOOP.
ENDMETHOD.