SAP Help ABAP Function Module basics
ABAP Function Module basics in SAP
Function Module Attributes
Proc type
• Normal
• Remote enabled
• Update
FUNCTION POOL
Main program for function groups is SAPL<function group>.
INCLUDES
Includes must be created with the same name as the function group and with the following structure.
L<function group>F01 or TOP...
I.e. LSPO1F01
F01 - Function module forms.
TOP - Data declarations, Generated auto. "Message ID goes in here
U01 - Function modules themselves, Generated automatically
UXX - Generated automatically for each function module
Exceptions
Raise <exception>.
i.e. RAISE no_data_found.
Or
MESSAGE I100(BC402) raising exception.
Retrieve message from within calling program using symsgid, sy-mstext1 etc fields.
EVENTS
Can only have one EVENT in function modules:
LOAD-OF-PROGRAM.
SAP Function Modules
See here for SAP Function Modules