Show TOC

Adding a Definition Part and Implementation Part to a Function ModuleLocate this document in the navigation structure

Context

Procedure

  1. Open the function module in the editor.
  2. Edit the definition part in the editor.
    Note Finish the definition part with a period.
    Caution Do not add any comments to parameters in the definition part. Otherwise they will be deleted after saving and activating the function module.
    Tip

    You can use the following template in the definition part of your function module:

    IMPORTING 
      IM_PARAM1 TYPE ANY 
      IM_PARAM2 TYPE REF TO <ref_type> 
     EXPORTING 
      EX_PARAM_1 TYPE ANY 
      EX_PARAM_2 TYPE REF TO <ref_type> 
     CHANGING 
      CH_PARAM TYPE ANY 
     TABLES 
      TAB_PARAM TYPE STANDARD TABLE 
     EXCEPTIONS 
      EXCEPTIONS_VALUE.
  3. Edit the implementation part in the editor.
    Caution Do not start your own comments with *" or *"--- as these are reserved for the parameter block in the function editor of the back end. Start your comments for each line with * or ". Note: Consider the implementation part as finished with ENDFUNCTION..
  4. Save the editor contents.
  5. Activate the ABAP Function Module.