Umar Abdullah
Umar Abdullah

Reputation: 1290

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?

Upvotes: 0

Views: 3231

Answers (2)

Horst Keller
Horst Keller

Reputation: 1

From ABAP release 7.56, SP01 on, CL_DEMO_OUTPUT supports any type.

https://blogs.sap.com/2021/12/08/cl_demo_output-invigorated/

Upvotes: 0

Sandra Rossi
Sandra Rossi

Reputation: 13636

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.

Upvotes: 2

Related Questions