To set customizing attributes you have to create an instance of the relevant attribute bundle.
Example of creating a customizing bundle for the drawing area
...
1. Define a reference variable for the attribute bundle class
<reference variable> TYPE REF TO CL_CU_DRAWING_AREA.
2. Create an instance of the attribute bundle using the reference variable defined earlier.
CREATE OBJECT
<reference variable> EXPORTING
INSTANCE_ID =
<'instance ID'>
ADMIN
= <GFW_TRUE or GFW_FALSE>.
The instance name is required for accessing the database. The parameter ADMIN is optional and defines whether the bundle contains general or user-specific settings.
Instance name
The instance name is used in two places:
· As part of the key on the database
You must select a unique key for a customizing class so that no other application is affected.
· In the communication between the SAP system and the GUI when assigning attributes
You must ensure that instances of one and the same class have different names.
Example of two instances with the same key
...
1. Create the reference variables for the attribute bundle class
DATA: CU1 TYPE REF TO
CL_CU_VALUES,
CU2 TYPE
REF TO CL_CU_VALUES.
2. Create the instances of the attribute bundles.
CREATE OBJECT
CU1 EXPORTING INSTANCE_ID = 'MyApplication'.
CREATE OBJECT CU2 EXPORTING INSTANCE_ID = 'MyApplication'.
This results in an error ! Only one of the instances will be saved on the database; only one instance will affect the appearance of both data series in the GUI.