sapdev logo background
sapdev logo sapdev logo
Comments

ABAP FUNCTION-POOL Statement syntax, information and example SAP source code



Return to Statement index



FUNCTION-POOL

Short Reference

ABAP Syntax FUNCTION-POOL fpool [
list_options ]
[MESSAGE-ID mid].

What does it do? 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.
One top include with the prefix "L" and the ending "TOP"
in the declaration section of the function group.
Optional include programs with the prefix "L" and the ending "D.." for the declaration of local classes within the top include.
One include program with the prefix "L" and the ending
"UXX" in the implementation section of the function group. This include program includes include programs with the ending "U.." for implementing each function module of the function group. This structure must not be changed.
Optional include programs with the prefix "L" and the ending "P.." for implementing the methods of local classes in the implementation section of the function group.
Optional include programs with the prefix "L" and the ending "O.." for implementing PBO modules in the implementation section of the function group.
Optional include programs with the prefix "L" and the ending "I.." for implementing PAI modules in the implementation section of the function group.
Optional include programs with the prefix "L" and the ending "E.." for implementing event blocks in the implementation section of the function group.
Optional include programs with the prefix "L" and the ending "F.." for implementing subroutines in the implementation section of the function group.
The periods ".." represent a two-digit number. The functionality of the Function Builder is based on adherence to this naming convention.

Example ABAP Coding 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
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




FUNCTION
FUNCTION_TYPING_OBSOLETE




comments powered by Disqus