
Functions for Accessing the Dynamic Database
Use
Functions may need to read or change data in the current configuration, in addition to the characteristic values transferred in the function interface.
Function group CUPR provides a series of function modules for this type of access. You can use the function modules in this function group to determine and change data of objects $SELF, $PARENT, and $ROOT in the configuration structure.
You call functions with these function modules by using keyword PFUNCTION. You can only use them in procedures, because reading or changing configuration data with function modules in this function group may have undesired effects when processing dependencies, which must be avoided in all declarative dependency types (such as constraints).
Features
Function modules in function group CUPR let you read, set, or delete characteristic values for an instance.
The access modules in function group CUPR require an internal instance number (INSTANCE) to identify the relevant objects in the configuration. Do not hard-code the instance number in an external program, because the number is assigned dynamically at runtime for the objects included in the configuration.
When you call a user-defined function with keyword PFUNCTION, the system transfers the internal instance numbers for the following objects in the configuration to the function
being called:These three fields are part of structure GLOBALS in the generic function interface for user-defined functions.
They correspond to the keywords $SELF, $PARENT, and $ROOT used in configuration.

You can display the function modules in function group CUPR in the ABAP Workbench Repository Browser. For details of the function modules, see the function module documentation.