Skip to Content
0
Former Member
May 19, 2008 at 09:55 AM

calling private and public methods

13 Views

hai friends...

in real time.

i declared itab to retrieve values .

and where can i declare select-options.

iam attaching my simple code ..

can anybody send me simple example...

class c3 definition.

public section.

types: begin of ty_marc,

matnr type marc-matnr,

werks type marc-werks,

end of ty_marc.

data: wa_itab type ty_marc.

data: itab type table of ty_marc .

methods add .

  • private section.

  • method sub importing value(itab) ..

endclass.

class c3 implementation.

method add.

select matnr

werks

from marc into table itab." where matnr in s_matnr.

*call method sub exporting value(itab1)

loop at itab into wa_itab.

write: wa_itab-matnr,

wa_itab-werks.

endloop.

endmethod .

endclass.

start-of-selection.

data b1 type ref to c3.

create object b1 .

call method b1->add.

  • parameters: s_matnr like marc-matnr.

here where can we delcare select-options ...

an di want to use both public and private methods how can i write...

tankx in advance ..