Since SAP ECTR 184.108.40.206 it is possible to distribute the Configurations of a SAP ECTR via SAP System.
0 Use Case
Optimize the distribution of SAP ECTR configuration changes for users and administrators
1 Distribute configuration via SAP system
The SAP Engineering Control Center configuration can be distributed via the SAP backend system. To do this, the SAP Engineering Control Center configuration is stored using a document info record (ECTR_CONF_<major>.<Minor>.<Incremental> - AUX - 000) whose original is a ZIP archive.
The configuration distribution via the SAP system requires the document type "AUX". Make sure that this exists in the SAP system. This can not be changed in any configuration. The document type "AUX" can be activated using a BC Set supplied. For more information on BC Sets, see the Operations Guide.
1.1 Read configuration from the SAP system
When starting SAP Engineering Control Center and logging on to the SAP system, ECTR checks whether a newer, released configuration than the local configuration exists in the SAP system.
If so, the newer configuration is checked out and unpacked to the local configuration directory.
Since a user with a SAP Engineering Control Center installation can log on to different SAP systems, of which all contain a different configuration document, the configuration directory is SAP system-dependent:
- After logging on to the SAP system, the internal environment variable PLM_INSTDIR_CONF is switched to the SAP system-dependent configuration directory
If an administrator has made changes to his local configuration, he will be asked if he wants to keep his local configuration or get the latest version from the SAP system before overwriting the configuration.
If a normal user logs on to SAP Engineering Control Center, the currently valid released version of the configuration document is always used.
If no valid released version already exists, the last version of the configuration document is used. Administrators always get the last version of the configuration document.
However, the behavior for administrators can be changed by using the preference variable from the file SAPLogon.txt.
1.2 Write configuration to the SAP system
The admin function fnc.configuration.upload is used to upload the configuration.
The function checks whether the local configuration has been changed since the start of SAP Engineering Control Center session.
If this is the case, SAP Engineering Control Center must first be restarted before the configuration can be uploaded.
This is to prevent an untested configuration from being uploaded. Then it is checked whether the last version of the configuration document has been released in the SAP system.
If this is the case, the administrator is asked if a new version should be created or if the upload of the configuration should be aborted.
The following folders from the directory tree of PLM_INSTDIR_CONF will then packed into a ZIP archive:
Except for these files:
The last version of the configuration document will be checked in. Finally, the uploaded configuration is checked for changes that are relevant for the backend logic.
If this is the case, the user is asked if they should be activated in the backend.
2.1 Activation using the installer of SAP Engineering Control Center
For this function, the add-on backendConfig was created which can be selected in the SAP ECTR installer.
This add-on contains the file backendConfig.bat, which is located under addons\backendConfig\basis\config.
The file is called and executed by the basis\config\plm_initialize.bat.
With this file, the following settings are made:
- The activation of the function via "PLM_USE_SAPCONFIG"
- The configuration of the path "%LOCALAPPDATA%\SAP\ECTR\conf" as a storage location of the configuration via "PLM_SAPCONFIG_BASEDIR"
- Activation of a Java classloader for custom Java classes under "PLM_SAPCONFIG_BASEDIR".
The settings can be changed by the customer in customize\config\plm_initialize.bat.
2.2 .configignore - Customer-specific rules to define, which files are to be uploaded
From version 220.127.116.11 it is possible with the help of .configignore files to extend and overwrite the rules, which define the files and folders that are to be uploaded. The use of these files is explained below using an example.
In the directory customize\config\, all files ending in "basic.txt" except for the file "menu_suppress_GuiCmds-basic.txt" should be ignored.
Solution option 1:
Create the file .configignore in the directory customize\config (tip: enter .configignore. as file name in the Windows Explorer)
Solution option 2:
Create the file .configignore in the root directory (tip: enter .configignore. as a file name in the Windows Explorer)
General information about the .configignore files
- The rules delivered with SAP Engineering Control Center can be found in the file \basis\aux-files\config-exclude.
- The rules within a file are processed from top to bottom. It is therefore only possible to overwrite rules that are above the rule.
- In .configignore files you can overwrite the rules of all .configignore files of the directories.
- A .configignore file can only affect files that are in the same directory or in a subdirectory. A .configignore file is only processed if it is in a directory that itself has not already been ignored by a rule.
Information about the syntax of the .configignore files
- Lines starting with a hashtag (#) are comments and are ignored during processing. With rules beginning with an exclamation mark (!), files can be included again that were previously ignored. The asterisk (*) represents any string, but only within a directory.
- A double asterisk (**) represents any string across multiple directories. Paths starting with a slash will be evaluated relatively to the directory where the .configignore file is located.
The environment variable PLM_USE_SAPCONFIG controls the activation of the function and its setting also defines whether after the logon the internal environment variable PLM_INSTDIR_CONF is switched over to the SAP system-dependent configuration directory.
Optionally, the document version to be used at startup can be forwarded.
This preference is only read for administrators.
The options are:
- latest - the most recent version (by default or admins)
- latest_released - the last released version
- released_today - the currently valid released version (by default for non-admins)
- XX - a fixed version number (e.g. 01)
This must be set in the file SAPLogon.txt:
The configuration document required a DType, which has the primary_workstation_application as "zip" so that the tracking of changes works.
This DType configuration can only be used to change the appearance (icons...) and the workstation application for the ZIP - file. Other settings like "document type" will not be considered.
- In order to enable an admin to overwrite his local configuration with the selected one by right-clicking on a configuration document, the omf fnc.configuration.use must be entered in the menu.guidef.
- In addition, an OMF can be entered to compare the configurations (see Compare Configurations)
- Finally, the OmfConfigurationUpload should be configured in the admin menu
2.5.1 Compare Configurations
The Function of Compare Configurations needs an external Comparing Tool like WinMerge.
How this Tool will be called has to be set in the default.txt with the preference plm.omf.ConfigurationCompare.cmd.
2.6 SmartList: Configuration documents
The following macro can be used to create a SmartList with all configuration documents:
3 Boundary conditions
As the configuration from the SAP system can only be used after the logon, not all "configuration files" or all files of the customize directory can benefit from this type of distribution.
- The configuration of the tray menu (customize/aux-files/ectr_tray*.ini)
- Basically all files that are required before logging on to the SAP system.
Support for CAD interfaces
Here you can find the CAD interfaces for ECTR which already support the backend-configuration.
- SAP ECTR Interface to PTC Creo Parametric, Patch 23 and newer
Note: SAP ECTR interface to PTC Creo: Support the distribution of SAP ECTR configurations via SAP system