
Interface of the Function Module
In a function, you refer to an ABAP function module whose input and output data is copied as table entries.
For information on how to create function modules, see the SAP Library BC Basis ® ABAP Workbench ® ABAP Workbench: Tools ® Function Builder.

If you want to specify a function module in a function, the name of your function module cannot have more than 18 characters.
The ABAP interface of an external function module is hard coded and comprises the following elements:
Interface Import Parameters
Parameter Name |
Typing |
Reference Field |
Content |
GLOBALS |
LIKE |
CUOV_00 |
Global parameters for calling a function. However, the list of fields currently only contains the date. |
Table Interface
Tables MATCH and QUERY are required to transfer characteristics to ABAP code and back.
Parameter Name |
Typing |
Reference Type |
Content |
QUERY |
LIKE |
CUOV_01 |
Table of input parameters and the expected output parameters |
MATCH |
LIKE |
CUOV_01 |
Table of output parameters All partial fields except ATCIO must be filled in a MATCH entry (especially format ATFOR) |
Structure CUOV_01 comprises the following fields:
The fields ATFOR, ATWRT, and ATFLV only have values assigned for input parameters.
Exceptions:
FAIL |
This exception shows that the condition represented by the function is not fulfilled. |
INTERNAL_ERROR |
This exception shows that a runtime error has occurred processing the function. |

Do not enter any other import parameters or table parameters unless you define them as optional.
The type of dependency in which the function is used determines which data is transferred to the function module and which is returned:

If you transport the product model into another R/3 System, you must maintain the module manually.
The following help functions are supported for accessing import parameters:
If you use these modules for modeling, you can access entries in table QUERY directly by name or enter a return value in table MATCH.