Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 923

Re: Output in Column Format - ABAP program

$
0
0

Hi Shafali,


Use the method cl_demo_output=>display( query_result ) to display it, where "query_result" is your itab, like example below:


TYPES: BEGIN OF y_sflight,

              carrid      TYPE S_CARR_ID,

              planetype TYPE S_PLANETYE,

            END OF y_sflight.


DATA t_sflight TYPE TABLE OF y_sflight.


SELECT carr_id planetype

  FROM SFLIGHT

  INTO TABLE t_sflight.


cl_demo_output=>display( t_sflight ).


If you are using a newer version of SAP (eg 7.4 SP8 or higher)you can furthersimplify doing this way:


SELECT carr_id, planetype

  FROM SFLIGHT

  INTO TABLE @DATA(t_sflight).


cl_demo_output=>display( t_sflight ).


Best regards,


Raphael Pacheco.


Viewing all articles
Browse latest Browse all 923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>