- Created by Dominik Maier, last modified by Rene Gerlach on Dec 20, 2021
Since SAP ECTR 5.1.11.0 it is possible to combine different explosion scenarios with different sets of application load options.
Info
This functionality depends on the capabilities of the underlying CAD-system and may work differently or not work at all with some CAD-systems.
Important prerequisite: the application (e.g. CAD-system) has to be able to work with partially provided assemblies!
Conclusion
A "load scenario" is a combination of an explosion scenario and application specific load options.
Use Case
Optimize fast load for large assemblies:
- Loading a large assembly can take a long time (reading structure and metadata for all parts).
- The file transfer needs a lot of time.
- The CAD-system may even not be able to load large assemblies with full structure due to
- RAM limitation
- loading in CAD takes too long
- bad performance of CAD when assembly is loaded
Using special "load scenario" can reduce the amount of data which needs to be exploded in SAP, download to the client and loaded into the CAD system.
Example
We want to make it possible to load just first level of an assembly in CAD-system NX.
1 Create explosion scenario (transaction CDESK_CUS in ECC6.0, CAD_SRV_CUS in S/4HANA) which only takes direct children of an assembly.
Info
The main difference between the usual explosion scenario "CAD_LOAD" and the explosion scenario we just created is the usage of the rules "1A/1N instead of NA/NN" - it means return child but don't return the structure underneath this child.
Make sure that the tables are maintained for CDESK_C_EXPLCF and CDESK_C_EXPLFA.
- You can maintain these table with transaction SM30 and enter the corresponding view V_CDESK_C_EXPLCF or V_CDESK_C_EXPLFA.
- For V_CDESK_C_EXPLCF maintain the values SORTF.
- For V_CDESK_C_EXPLFA please maintain your possible SORTF value like above in the picture UGS:PI, UGS:C, UGS:CR, ...
2 Define the combination of explosion scenario named "FIRST_LEVEL" with load options "fitting" to the application.
This is done in the application-specific load_scenarios.xml
For NX in the following file:
<ECTR_INST_DIR>\applications\ugs\customize\config\load_scenarios.xml
<?xml version="1.0" encoding="utf-8"?> <document_load_scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../basis/aux-files/load-scenarios.xsd"> <document_load_scenario> <name>ONLY_FIRST_LEVEL_COMPONENTS</name> <description>first level</description> <application_type>UGS</application_type> <bod_explosion> <explosion_scenario>FIRST_LEVEL</explosion_scenario> <explosion_rule> <active/> </explosion_rule> </bod_explosion> <application> <option> <name>COMPONENTS</name> <value>FALSE</value> </option> <option> <name>COMPSETTINGS</name> <value>None</value> </option> </application> <!-- since 5.1.9.1 new parameter - do/don't update cache in background --> <cache_update_background>false</cache_update_background> </document_load_scenario> </document_load_scenarios>
Parameter | Description |
---|---|
ONLY_FIRST_LEVEL_COMPONENTS | name of load scenario |
UGS | application type used for NX Integration |
FIRST_LEVEL | name of the explosion scenario (definition of how to resolve the structure in SAP Customizing) |
COMPONENTS and COMPSETTINGS | NX-specific load options required to be able to partially load the assembly with only a subset of provided files |
2.1 Clean up working directory when opening documents with "Load Scenario"
This feature is available from SAP ECTR versions 5.2.2.1 or 5.1.15.3
When opening the document with "Load Scenario", you can define in load_scenarios.xml whether the working directory should be cleaned up.
To do this, the element <cleanup_session> ... </cleanup_session> must be defined.
The files to be deleted can be defined with the element <document_selector/>. The element <document_selector/> can have the attributes master_filename_pattern and/or master_wsappl. At least one of the two attributes must be defined, otherwise the element is not considered.
load_scenarios.xml (Example)
... <cleanup_session> <document_selector master_filename_pattern=".*\.prt" master_wsappl="UGI"/> <document_selector master_filename_pattern=".*\.doc"/> </cleanup_session> ...
load-scenarios.xsd
... <!-- defines if the sessoin should be cleared before loading --> <xs:element name="cleanup_session" minOccurs="0" maxOccurs="1"> <xs:complexType> <!-- defines which files should be deleted when clearing the cache --> <xs:sequence> <xs:element name="document_selector" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="master_filename_pattern" type="xs:string"/> <xs:attribute name="master_wsappl" type="xs:string"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> ...
Note
If you want to delete all files allowed for deletion from the working directory, the following can be defined:
... <cleanup_session> <document_selector master_filename_pattern=".*"/> </cleanup_session> ...
3 Configure the function for documents (application type UGS)
This is done in the application-specific menu_macros.txt
For NX in the following file:
<ECTR_INST_DIR>\applications\ugs\customize\config\menu_macros.txt
Add the following line...
fnc.doc.open.by.load.scenario(ONLY_FIRST_LEVEL_COMPONENTS)
... wherever it serves best:
? DOC_UGS = mnu.flyout.doc_doc = fnc.doc.checkout = fnc.doc.save.checkin = fnc.doc.open.by.load.scenario(ONLY_FIRST_LEVEL_COMPONENTS) = -----------------------------
4 Configure dictionary text and icon
Add text for the function key in customer.txt:
<ECTR_INST_DIR>\customize\dictionary\<LANGUAGE>\customer.txt
Add the following line:
fnc.doc.open.by.load.scenario(ONLY_FIRST_LEVEL_COMPONENTS) = Open partially
Add the icon mapping in customer_icons.txt
For NX in the following file:
<ECTR_INST_DIR>\customize\aux-files\customer_icons.txt
Add the following line:
fnc.doc.open.by.load.scenario(ONLY_FIRST_LEVEL_COMPONENTS) = {0}/view_without_structure
Result
Function in ECTR
What happens when this function is executed
- SAP ECTR resolves the structure using explosion scenario "FIRST_LEVEL"
- SAP SAP ECTR provides files of all resolved documents into session directory
- ECTR sends top-level file to NX to open - with defined NX load options, the name of the used load scenario and the name of the explosion scenario
Effect of the function
- The session contains only files of the top-level document and documents directly referenced by the top-level document
- The assembly is loaded partially in NX without any errors (remember, loading of components was switched off by load options)
Application specific load options - sample
CAD | Option | Values |
---|---|---|
INVENTOR | DeferUpdates | TRUE/FALSE |
OpenExpress | TRUE/FALSE | |
SkipAllUnresolvedFiles | TRUE/FALSE | |
NX | COMPONENTS | FALSE |
COMPSETTINGS | None | |
SOLIDWORKS | DocumentLoadMode | default |
ignoreHiddenComponents | ||
lightweight | ||
resolved | ||
useSpeedpak | ||
viewOnly |
There may be more possible values. See CAD specific documentation.