abap

cl_demo_output=>display data type not yet supported


In ABAP 7.4 OR above, We can use ASTERISK as much the same way as we use in SELECT *.

Following inner join is an example of new syntax which we can use.

 SELECT scarr~carrname, spfli~*, scarr~url
        FROM scarr INNER JOIN spfli ON scarr~carrid = spfli~carrid
        INTO TABLE @DATA(t_result).

I am facing error when trying to display output by using below statement.

 cl_demo_output=>display( t_result ).

The error message is "data type not yet supported"

Can anyone explain the reason ?

what could be the better solution?


Solution

  • In release 7.40, or even in ABAP 7.52, cl_demo_output=>display can only display an internal table with a list of elementary components (string, i, c, etc.)

    In your case, the internal table t_result is automatically declared with three components, the second one being a structure, which is not an elementary type.

    It's a structure because you used ~*. Instead, declare each column explicitly (spfli~carrid, spfli~connid, ...)

    NB: the class cl_demo_output should not be used productively. If you need a generic tool, create your own tool, for instance based on the class cl_salv_table.