Google Search - Blog...........

Program On Field Symbols Using OOPS Concept.

report zfieldsymbols_oops .

*---------------------------------------------------------------------*
* CLASS c1 DEFINITION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
class c1 definition.

public section.

data: it_tab type table of i.
data: wa_tab type i.

methods: constructor .

endclass.
*---------------------------------------------------------------------*
* CLASS c1 IMPLEMENTATION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
class c1 implementation.

method constructor.

wa_tab = 1.
append wa_tab to it_tab.

wa_tab = 2.
append wa_tab to it_tab.

wa_tab = 3.
append wa_tab to it_tab.


endmethod.


endclass.

data: object type ref to c1.
data: wa2 type i.

field-symbols: type table.

start-of-selection.

create object object.

assign object->it_tab to .

loop at into wa2.
write:/ wa2.
endloop.

No comments:

Post a Comment