SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Program structure → Introductory Statements for Programs →Syntax
FUNCTION-POOL fpool [list_options]
[MESSAGE-ID mid].
Effect
The FUNCTION-POOL statement introduces a function group. After the expansion of any existing include programs, it must be the first statement of a standalone program. The additions of the FUNCTION-POOL statement have the same meaning as the additions of the REPORT statement.
You use the Function Builder of the ABAP Workbench to maintain the function groups. The Workbench automatically generates a framework program and the include programs listed below. The FUNCTION-POOL statement is created in a top include.
The complete name of a framework program of a function group in the Repository consists of the prefix SAPL and the name fpool of the FUNCTION-POOL statement.A function group serves as a frame for function modules and is organized in include programs as follows.
Example
Function group SAPLABAP_DOCU is structured from include programs.
*&---------------------------------------------------------------------*
*& Function Group SAPLABAP_DOCU
*&---------------------------------------------------------------------*
INCLUDE labap_docutop.
" Global Declarations
INCLUDE labap_docue00. " Load of Program
INCLUDE labap_docuuxx. " Function Modules
INCLUDE labap_docuo01. " PBO Modules
INCLUDE labap_docui01. " PAI Modules
INCLUDE labap_docue01. " Handling of Runtime-Events</
INCLUDE labap_docup01. " Class implementations
INCLUDE labap_docup02.
INCLUDE labap_docup03.
INCLUDE labap_docup04.
The function group includes the top include in the first place; it contains the FUNCTION-POOL statement and other include programs for data and class declarations:
*&---------------------------------------------------------------------*
*& Include LABAP_DOCUTOP
*&---------------------------------------------------------------------*
FUNCTION-POOL abap_docu.
INCLUDE labap_docud00. " Global Data for Screens
INCLUDE labap_docud01. " Classes for Docu Display