Skip to Content
0
Former Member
Nov 20, 2008 at 10:46 AM

need some help on OOPS concept

11 Views

hi gurus,

I have created a interface and class and assigned to it in SE24.Till now its working fine.

but when i called that interface uisng method in se38 this is the doubt i have,

EPORT y_oops3_for_interface.

DATA: it_mara TYPE mara,

wa_mara TYPE mara.

DATA: obj1 TYPE REF TO z_interface_cl.

DATA: lf_matnr TYPE matnr.

SELECT-OPTIONS: s_matnr FOR lf_matnr.

START-OF-SELECTION.

CREATE OBJECT: obj1.

*END-OF-SELECTION.

*CALL METHOD OBJ1->Z_INTERFACE~SELECT_METHOD.

*EXPORTING

CALL METHOD obj1->z_interface~select_method.

exporting

p_matnr_low = s_matnr-low

p_matnr_high = s_matnr-high

importing

it_mara = it_mara

wa_mara = wa_mara.

*display the data

LOOP AT it_mara INTO wa_mara.

WRITE:/ wa_mara-matnr,

wa_mara-ersda,

wa_mara-ernam,

wa_mara-matkl,

wa_mara-meins.

ENDLOOP.

In the above program do i need to manually code this part-

CALL METHOD obj1->z_interface~select_method.

exporting

p_matnr_low = s_matnr-low

p_matnr_high = s_matnr-high

importing

it_mara = it_mara

wa_mara = wa_mara.

or else need to call from PATTERN..pls iam new to oops concept.kindly guide me with suitable steps.