SAP ABAP Creating A Function Module in ABAP To Take Any Table and Write It To The Screen
SAP ABAP Creating A Function Module in ABAP To Take Any Table and Write It To The Screen
SAP List Viewer is used to add an ALV component and provides a flexible environment to display
lists and tabular structure. A standard output consists of header, toolbar, and an output table. The
user can adjust the settings to add column display, aggregations, and sorting options using
additional dialog boxes.
CALL METHODcl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = itab.
go_alv->display( ).
Another Dynamic Way to Output Any Internal Table is by using field-symbol, this is a particular
field type in ABAP. Without going into the details of it, you must know that a field symbol works
like a pointer without pointer arithmetic, but has a value semantics.
The typing ANY is necessary because the field symbol should be able to refer to data of any
type. And this is what our loop looks like now using a dynamic assignment to the various
components of the work area:
DO.
IF sy-subrc <>0.
SKIP.
EXIT.
ENDIF.
WRITE <wa_comp>.
ENDDO.
ENDLOOP
https://www.tutorialspoint.com/Creating-a-Function-module-in-ABAP-to-take-any-table-and-write-it-to-the-screen 1/1