Skip to Content
avatar image
Former Member

Difference between receiving, changing inporting, exporting and returning

Hi OO ABAP Gurus

Please clear me the Difference between receiving, changing inporting, exporting and returning parameters of a method?

Many thanks in advance

Sandeep Sharma..

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Apr 09, 2008 at 07:21 AM

    Forget what Prasad said - he's not talking about classes, or objects.

    It depends on context. For CALLING a method.

    Receiving - typed value returned by the method - maximum one of these

    Importing - value returned by the method - many possible, all optional

    Exporting - value sent to the method - many possible, some optional

    Changing - value sent to the method , changed within the method, sent back from method - many possible some optional

    For DEFINING a method

    Returning - typed value returned to the caller- maximum one of these

    Exporting - value sent to the caller - many possible, all optional

    Importing - value sent by the caller - many possible, some optional

    Changing - value sent by the caller, changed within the method, sent back to caller - many possible some optional

    Note - only for returning/receiving must the parameter have a specific type.

    See ABAP help for more details.

    matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Matthew Billingham

      Hi,

      When we define a Method, we can use following for Formal Parameters-

      1- IMPORTING-for Input Formal Parameter

      2-EXPORTING-for output Formal Parameter

      3-CHANGING-for Input/outputt Formal Parameter

      4-RETURNING-for outputt Parameter, passed by value only, and used with a Functional Method

      When we call a Method, RECEIVING is used for Actual Parameter to receive the return value of Method in data object.

      Thanks,

      CP

  • avatar image
    Former Member
    Apr 09, 2008 at 06:57 AM

    Hai sandeep,

    we are using changing and using when working with subroutines.

    Using and changing : Both are same except, the order how they are taking the order of parameters in called subroutine.

    In general,

    Using: is used in subroutines when input parameter value doesn't change in the called program.

    Changing: is used in subroutines when input parameter value does change in the called program and need to update its value in calling programming.

    Importing, Exporting,Changing: These are used when working with function modules only.

    Importing: To receive the parameter values from driver program

    to function module

    Exporting: To send the calculated parameter values to driver

    program from function module.

    Changing: It is used to send the updated parameter values

    (Intially receiving from driver program)

    from function module to driver program.

    If useful, reward points

    by

    G.V.K.Prasad

    Edited by: PRASAD GVK on Apr 9, 2008 8:57 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 12, 2011 at 07:43 PM

    Hi sandeep,

    you should post a question after reading the [documentation|http://help.sap.com/abapdocu_702/en/abapcall_method_parameters.htm].

    Regards,

    Clemens

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 02, 2012 at 05:57 AM

    As per i have seen:

    Importing parameters can be optional or non-optional.

    Exporting parameters can be optional or non-optional.

    Changing parameters can be optional or non-optional.

    But,

    Returning Parameter is always optional by default.

    Regards,

    Pranoy

    Edited by: Pranoy on Feb 2, 2012 6:57 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2012 at 04:52 AM

    Hi Experts,

    Can i use changing parameter (in ooabap) to pass and receive the values at the same time for a mathod?

    Moderator message: Please don't post a question on an old thread.

    Edited by: Neil Gardiner on Feb 20, 2012 4:18 PM

    Add comment
    10|10000 characters needed characters exceeded