Show TOC

 Rule Debugger


Using the rule debugger you can check sets of rules that you have written for the EH&S Expert. You can execute sets of rules with real data step-by-step, check interim and final results, and if necessary, change the results and return them to EH&S specification management .


The rule debugger is part of the EH&S Expert rule editor and you can call it from the rule editor.


You have saved the sets of rules you want to check before running the rule debugger. If any sets of rules are not saved or have been edited since the last save, a dialog box appears when you start the debug mode that prompts you to save.

As the rule debugger works with specification data, you must have created specifications in the specification database in the SAP System.


The Debug menu contains the following menu options:

  • Start / Restart The rule debugger is started .

  • Stop The rule debugger is stopped and the system returns to edit mode.

  • Break The rule debugger run can be interrupted if it runs into long processes or endless loops. Break is equivalent to a breakpoint at the next possible point in the set of rules.

  • Go The rule debugger starts and processes the set of rules up to the next breakpoint. If no breakpoints are set, the set of rules is processed to the end.

Note Note

Rules that were processed because the condition was TRUE are marked with a green checkmark. Rules whose condition did not apply and whose todo part was not executed are marked with a red checkmark. When processing a number of instances, the following combinations are possible:

– Two green checkmarks: rule was executed for all instances.

– Two red checkmarks: rule was not executed for any instances.

– One green and one red checkmark: rule was executed for a part of the instances.

End of the note.
  • Step Into, Step Over, Step Out, Step To Next Rule The rule debugger jumps to the next rule or the next todo for the same rule. The exact behavior depends on the particular position of the rule debugger within the hierarchy of the set of rules. See Step Functions in the Rule Debugger .

  • Run To Cursor The debugger processes the set of rules up to the point where you have placed the cursor. You can position the cursor at the level of the rules or at the level of the individual todos within the rules.

  • Write Data The data generated during the rule debugger run is written back to the SAP System. Here you should note that the settings made under Start of the navigation path Tools Next navigation step Options End of the navigation path on the Debug tab page are used.

  • Breakpoint,Enable/Disable Breakpoint, Advanced Breakpoints , Breakpoints are used to halt the processing of a set of rules at the required position. See Breakpoints in the Rule Debugger. .

Note Note

Breakpoints can also be set in edit mode; the set of rules must then be saved before debugging.

End of the note.
  • Watch, Watch Rule Facts In addition to fact and phrase mapping tables you can use these options to track the current values of facts and thus follow the progress of the set of rules. See Watch Functions in the Rule Debugger .

Note Note

In connection with fact mapping tables, see also How Compositions Are Displayed in the Rule Debugger .

End of the note.
  • Go To Current Break Location If you have navigated to another rule or another todo in the rule window when the rule process was interrupted, you can use this option to return to the position where the process was interrupted.

A yellow arrow indicates the rule in the set of rules the rule debugger has currently reached when rule execution was interrupted. At todo level, the todo line where the rule debugger is currently located is shown colored yellow. The yellow todo has in this case not yet been executed.

For breakpoints at facts or for breakpoints with a condition but without reference to a rule or to a todo, rule execution is interrupted after the todo that triggered the breakpoint. In this case the todo is colored orange.

  • Optimize Condition Evaluation Performance optimization is deactivated as default in the rule debugger, but can be reactivated.

Note Note

The performance of the EH&S Expert is optimized to evaluate complex, logically linked conditions in the IF part. This can considerably increase the speed, particularly when working with compositions .

If, for example, the condition is: Composition1.MeltingPoint > 50 °C AND Composition1.Subid = Composition2.Subid, the second part of the condition is no longer processed if a negative result was already produced for the first part. This avoids unnecessary loops.

End of the note.

The following menu options are also relevant for the rule debugger:

Under Start of the navigation path Tools Next navigation step Options End of the navigation path you can make settings for the debug mode on the Debug tab page. As default, no settings are made for reading and writing the data. Particularly for writing the calculated data from the debug mode back to the database, we recommend you use the settings in Customizing. For reading the data, you should set the correct usage as the selection criterion.

Under Start of the navigation path Edit Next navigation step Find End of the navigation path you have the option of searching for rules and facts according to their name or contents.


The rule debugger is started from the rule editor by choosing Start of the navigation path Debug Next navigation step Start. End of the navigation path A dialog box appears in which you select a specification from the specification database in the SAP System. You can search generically. As a result, a hit list appears from which you choose a specification.

Note Note

We recommend that you hide the property tree in the rule editor when in debug mode.

End of the note.