IMPORTING, EXPORTING and CHANGING Keywords in ABAP


IMPORTING transfers a value from the caller to the called method by passing an actual parameter

EXPORTING is just opposite to what IMPORTING does. IT passes value from the method to Caller.

CHANGING is transferring the value from caller to method by a variable which is processed or changed and the changed value is passed back to the Caller. Thus it combines both IMPORTING and EXPORTING function.

There are a couple of ways in which CHANGING can be used:

CHANGING myvar or CHANGING VALUE(myvar)

By using, CHANGING myvar , the value of a variable is changed and passed back to the caller or main program.

Using CHANGING VALUE(myvar) is a kind of exception handling. In case there is an exception or error in Subroutine, the value of a variable will be returned unchanged although it is possible that it has been changed in the subroutine.

Updated on: 09-Dec-2019

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements