Get Example source ABAP code based on a different SAP table
ABAP_ITAB - Table Reduction, Method Calls This example demonstrates a reduction> of the columns of an internal table to an object.
ABAP_SOURCE_CODE DEMO CL_DEMO_REDUCE_METHOD_CALL
ABAP_DESCRIPTION In this example, a call of a method to_string> transforms the lines of the internal table carriers> after the FOR> expression> to a text string. This string is then passed to the instance method WRITE> of an object of the class CL_DEMO_OUTPUT>>. This object is created after INIT> and referenced by the local reference variable o>. The return value of the method WRITE> returns a reference to its own object, which means that the assignment to o> does not modify its value but meets the syntax rule that o> must be filled. At the end of processing, the reference to the object in o> is assigned to the reference variable out> and the content of the internal table written to the object can be displayed using the method DISPLAY>.