SAP FUNCTION-POOL ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for FUNCTION-POOL

FUNCTION-POOL

Short Reference
• FUNCTION-POOL ABAP Statement


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 ABAP Code Snippet 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 ABAP Code Snippet FUNCTION-POOL statement is created in a ABAP Code Snippet

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.
INTHINT The statement FUNCTION-POOL can also be used instead of
INTHINT PROGRAM or REPORT in executable programs, module pools,
INTHINT or subroutine pools. Then, those programs are handled like
INTHINT real function groups when loaded into an internal session
INTHINT during an external call of subroutines or of local methods.



Example ABAP Coding
Function group SAPLABAP_DOCU is structured from
include programs. *<(> <)> ---------------------------------------------------------------------*
*<(> <)> Function Group SAPLABAP_DOCU
*<(> <)> ---------------------------------------------------------------------*

ABAP Code Snippet

ABAP Code Snippet

ABAP Code Snippet

ABAP Code Snippet

ABAP Code Snippet

ABAP Code Snippet <<)>/

ABAP Code Snippet
ABAP Code Snippet
ABAP Code Snippet
ABAP Code Snippet

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.

ABAP Code Snippet

ABAP Code Snippet

Return to menu