| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Working with import, export and change parameters of a classBy Vikram Chellappa, Mouri Tech Solutions Go to SE38 and
create a program. Then provide the following code. REPORT ZLOCALCLASS_VARIABLES. *How we can use import and export and changing parameters in the class. *Provide the variables DATA: V_IMP TYPE I,
V_CHA TYPE I VALUE 100.
*Define the class. CLASS CL_LC DEFINITION. PUBLIC SECTION. METHODS: DISPLAY IMPORTING A TYPE I
EXPORTING B TYPE I
CHANGING C TYPE I.
ENDCLASS.
*Implement the class. CLASS CL_LC IMPLEMENTATION. METHOD DISPLAY. B = A + 20. C = A + 30. ENDMETHOD. ENDCLASS. *Create the object. DATA OBJ TYPE REF TO CL_LC. START-OF-SELECTION. CREATE OBJECT OBJ. CALL METHOD OBJ->DISPLAY EXPORTING A = 10 IMPORTING B = V_IMP CHANGING C = V_CHA. WRITE:/ 'OUTPUT PARAMETR', V_IMP,
'CHANGING PARAMETER', V_CHA.
Save and activate
the program. Now execute the
program by inserting a breakpoint.
Press F5.
Press F5
Press F5.
The values are
changed. Press F5. Then
Final output.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||