For those components which add new occurrences to the database it is possible for initial values to be defined in the menu database instead of being hard-coded within the program code. This means that the initial values can be changed very easily.
Initial values are loaded into new occurrences before they are first displayed to the user, but they can be changed at any time.
In order for a component to accept initial values it must contain the following code:
params string $params$ : IN endparams getlistitems/id/component $params$ ; copy to component variables
if (!$dbocc) & (!$occmod) ; record is new & unmodified call LOAD_INIT_VALUES($init_values$) #include STD:FATAL_ERROR endif
Any initial values that are required must be added to the menu database using transaction MNU_0080M.
When the component is initiated using the standard global proc ACTIVATE_PROC the following will take place:-
$$PARAMSas an item with the identity of
$INIT_VALUES$, thus producing a list within a list.
$$PARAMSis the name of an associative list which is passed to the component by ACTIVATE_PROC.
$INIT_VALUES$list into the component using global proc LOAD_INIT_VALUES.
The following keywords will be converted by proc LOAD_INIT_VALUES at run time:-
Note that it is possible to create another version of the component with an alternative transaction identity so that a different set of initial values can be defined for each Transaction ID.