βš™οΈSAPTools
πŸ“„

RFC Function Module Docs Generator

ABAPNew

Generate ABAP RFC-enabled function module stubs with IMPORTING, EXPORTING, TABLES, EXCEPTIONS, and documentation comments. Ready to paste into SE37.

Parameters

Generated Function Module

*"*"----------------------------------------------------------------------
*"*" Local Interface:
*"*"  IMPORTING
*"*"    VALUE(IV_INPUT) TYPE STRING
*"*"----------------------------------------------------------------------

FUNCTION Z_MY_RFC_FUNCTION.
  IMPORTING
  VALUE(IV_INPUT) TYPE STRING
  EXPORTING
  VALUE(EV_RESULT) TYPE STRING
  TABLES
  VALUE(ET_DATA) TYPE BAPIRET2
  EXCEPTIONS
  NOT_FOUND                      = 1
  OTHERS                         = 99
.

* ===========================================================
* Short Description: My RFC-enabled function module
* Function Group   : ZMYGROUP
* RFC-Enabled      : Yes (Remote-enabled module)
* ===========================================================

* TODO: Implement function module logic here

  CLEAR EV_RESULT.

  REFRESH ET_DATA.

ENDFUNCTION.
Create the function group in SE80 first, then create the function module in SE37. Set the processing type to Remote-enabled module.

Advertisement

Frequently Asked Questions

What makes an ABAP function module RFC-enabled?

A function module is RFC-enabled when its "Remote-enabled module" attribute is set in SE37. RFC-enabled FMs can only use pass-by-value parameters (PASS BY VALUE), cannot use LIKE references to local types, and all parameters must be type-safe for serialization.

What is the RETURN parameter table in BAPIs?

By convention, RFC-enabled function modules and BAPIs use a TABLES parameter named RETURN of type BAPIRET2. It contains a table of messages (type, ID, number, message text) that indicate success or failure. Always check RETURN after calling a BAPI.

How do I test the generated RFC function module?

After creating the function module in SE37, use the Test/Execute button (F8) to call it directly in the SAP system. Alternatively, use transaction SE37 β†’ Utilities β†’ RFC Test to test it as a remote call.