21.03.2013 Views

Object Oriented ABAP

Object Oriented ABAP

Object Oriented ABAP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PARAMETERS: V_VBELN TYPE VBAP-VBELN.<br />

*Provide Data <strong>Object</strong>s<br />

DATA: WA_VBAP TYPE VBAP,<br />

IT_VBAP TYPE Z_VBAP.<br />

*Create the <strong>Object</strong><br />

CREATE OBJECT OBJ1.<br />

*Call the Redefine Select Method<br />

CALL METHOD OBJ1->SELECT_METHOD<br />

EXPORTING<br />

P_VBELN = V_VBELN<br />

* IMPORTING<br />

* WA_VBAK =.<br />

*Provide the IT_VBAP Values<br />

IT_VBAP = OBJ1->IT_VBAP.<br />

LOOP AT IT_VBAP INTO WA_VBAP.<br />

WRITE:/ WA_VBAP-VBELN,<br />

WA_VBAP-POSNR,<br />

WA_VBAP-MATNR.<br />

ENDLOOP.<br />

Click On SAVE , CHECK , ACTIVATE and EXECUTE it.<br />

Output :-<br />

The output data display in the list.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!