Welcome to SAP Central
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Exporting and Importing values in ABAP Objects example

Go down

Exporting and Importing values in ABAP Objects example Empty Exporting and Importing values in ABAP Objects example

Post  Admin Sun Apr 08, 2012 9:38 pm

*&---------------------------------------------------------------------*
*& Report Z_03
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT ZKRISH_OOPS_03.

*----------------------------------------------------------------------*
* CLASS c1 DEFINITION
*----------------------------------------------------------------------*
CLASS C1 DEFINITION.
PUBLIC SECTION.
METHODS: M1 IMPORTING A TYPE I
EXPORTING B TYPE I.
ENDCLASS. "c1 DEFINITION
.
*----------------------------------------------------------------------*
* CLASS c1 IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS C1 IMPLEMENTATION.
METHOD: M1.
B = A * A.
ENDMETHOD. "M1
ENDCLASS. "c1 IMPLEMENTATION

DATA: O1 TYPE REF TO C1.
DATA: RESULT TYPE I.
START-OF-SELECTION.
CREATE OBJECT O1.
CALL METHOD O1->M1
EXPORTING
A = 4
IMPORTING
B = RESULT.
WRITE: RESULT.

Admin
Admin

Posts : 92
Join date : 2012-01-26

https://mysaplab.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum