Customizing the metamodel > Customizing the repository metamodel: SAPROPS.CFG and USRPROPS.TXT > Example of making changes to USRPROPS.TXT
  
Example of making changes to USRPROPS.TXT
This section shows what happens when you make changes to a definition that already exists in SAPROPS.CFG. The following code is in SAPROPS.CFG:
DEFINITION "Change Request"
{
ADDRESSABLE
LAYOUT { COLS 2 TAB ALIGN LABEL }
PROPERTY "Impact Statement"
{ EDIT Text LENGTH 1000 }
PROPERTY "Original Source"
{ EDIT Text LIST "Business Unit" LENGTH 80 LABEL "Source Dept." }
PROPERTY "Author Name"
{ EDIT Text LENGTH 25 }
PROPERTY "Date Entered"
{ EDIT date INITIAL date READONLY LENGTH 10 }
PROPERTY "Start Date"
{ EDIT date LENGTH 10 }
PROPERTY "Required Completion Date"
{ EDIT date LENGTH 10 LABEL "Required Completion" }
}
Change request definition dialog as defined in the master configuration property set file
The following illustration shows the Dictionary Object dialog for the above definition block (the rest of this manual calls this “the definition dialog”).
This graphic is described in the surrounding text.
There is an Introduction tab, even though the SAPROPS.CFG has not called this out specifically with a CHAPTER command. If no CHAPTER command is specified, System Architect provides a default Introduction tab. The Access Data tab is hardcoded in the software; it is not specified in SAPROPS.CFG.
Making a change with USRPROPS.TXT
Make changes to the Change Request definition by adding the following code to USRPROPS.TXT and reopening the encyclopedia:
DEFINITION "Change Request"
{
  LAYOUT { COLS 2 TAB ALIGN LABEL }
  PROPERTY "Author Name" { LABEL "Client Division" }
  PROPERTY "Supervising Manager" { EDIT text LENGTH 45 }
  PROPERTY "On time" { Edit Boolean Length 1 DEFAULT "T" }
}
Effect of USRPROPS.TXT Entries
DEFINITION "Change Request" {
Specifies a change to the Definition “Change Request”
LAYOUT { COLS 2 TAB ALIGN LABEL }
Sets up a two-column layout for the properties below the LAYOUT command (until the end of the definition is reached or another LAYOUT command is encountered).
PROPERTY "Author Name" { LABEL "Client Division" }
This modifies an existing property: it changes the label on the field from Author Name to Client Division
PROPERTY "Supervising Manager" { EDIT TEXT LENGTH 45 }
This adds a new property, which is a text field, Supervising Manager, to the dialog box.
PROPERTY "On time" { EDIT BOOLEAN LENGTH 1 DEFAULT "T" }
This adds a new property, which is a checkbox, to the dialog box to indicate whether the change request is meeting the deadline.
Import the changed USRPROPS.TXT file into the System Architect encyclopedia, and reopen the definition of a change request, to see the changes to its dialog; note that the information on the Introduction tab has now spilled onto two pages.
Change Request Definition dialog as modified by entries in USRPROPS.TXT
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
The information is on two pages of the Introduction tab because of the two new properties that were added. They are added to the end of the definition (they are not added to the end of the Access Data tab because this tab does not count: it is hardcoded and not part of SAPROPS.CFG).
Only change what needs to be changed
In this example, you do not have to re-enter the entire PROPERTY statement that exists in SAPROPS.CFG into the USRPROPS.TXT file. You have to enter only specific statements that need to be changed, and any new statements that you are adding. Even for the statements that you are changing that you are re-entering, you have to add only the part of the statement that is changing. In the example, the only statement from SAPROPS.CFG that was re-entered and changed was:
PROPERTY "Author Name" { EDIT TEXT LENGTH 25 }
In the USRPROPS.TXT file, you want to change only the label on this property, so you enter:
PROPERTY "Author Name" { LABEL "Client Division" }
The length of the property and the fact that it is text (instead of numeric or Boolean) are unchanged; only the label of the control in the dialog has been changed.
One more change and a warning
Try another change: add the text in bold below to the USRPROPS.TXT code:
DEFINITION "Change Request"
{
LAYOUT { COLS 2 TAB ALIGN LABEL }
PROPERTY "Impact Statement" { EDIT text LENGTH 100 }
PROPERTY "Author Name" { LABEL "Client Division" }
PROPERTY "Supervising Manager" { EDIT text LENGTH 45 }
PROPERTY "On time" { Edit Boolean Length 1 DEFAULT "T" }
}
PROPERTY "Impact Statement" { EDIT TEXT LENGTH 100
This statement tries to modify an existing property, reducing the space for the Impact Statement from 1000 characters to 100.
Import this USRPROPS.TXT back into your encyclopedia, and then reopen the encyclopedia. This message appears:
Warning: In user’s property file addenda between line number 70 and line number 72. Illegal attempt to shorten the length of a property. Original length retained.
You can not decrease the length of a field; you can only increase it. This is because users might have already entered information into a text field that will be lost if you decrease the length of a field, and thereby decrease the amount of information that the encyclopedia can hold for this property, at a later time.
System Architect issues the warning, ignores the faulty code, and opens the encyclopedia. If this had been an error message, the encyclopedia would not open until you corrected USRPROPS.TXT.
If you try to increase the length of the Impact Statement field, System Architect accepts the change.
PROPERTY "Impact Statement" { EDIT text LENGTH 1200 }
See also
Customizing the repository metamodel: SAPROPS.CFG and USRPROPS.TXT