Skip to Content
Technical Articles
Author's profile photo Bernd Dittrich

WKS: Condition Explanation Tool

The Problem

When working with conditions you have a lot of flexibility in both using input (with Data Access Definitions) as well as in ways to process the in BRFplus with all the flexibilty available in BRFplus. Flexibility comes with complexity and in case the condition does not return the expected result the search might be a bit complex.

But there are tools for you support.

Basically there are two questions:

  1. Did the Data Access Definition supply the Data I expect when they are processed?
  2. How did BRFplus process my input?

What did the DAD provide

For the first question suprises can e.g. come from Data Access Definitions trying to read data which are not YET there, e.g. because they are determined a bit later in the creation mode. To see what has been determined by an data access definition when the condition is processed you can use the user parameter /SCMTMS/COND_EXP and set it to X, it should look like this

When processing a condition afterwards the input for every data access definition used in the condition is returned as a message, it can look e.g. like this:

The only limitation is that table-like or deep  input determined  by data access definitions cannot be shown this way, but this is rather exotic anyway.

 

What did BRFplus calculate

Simulation Mode

First option is to use the simulation in BRFplus, which ca e.g. be started directly from the decision table tab in the condition transaction:

In the simulation itself is described in the online help of brfplus, so I don´t go into the details. Basically you can enter data for all input proviedd to BRFplus and run the simulation.

Trace

There is one more option, the trace. When the condition explanation user parameter is active, we also trigger the tracing in BRFplus. The trace can be accessed from the BRFplus workbench, but it i a bit tricky.

First, start BRFplus workbench by entering transaction  code brfplus (or brf+) which opens a browser window. In there first make sure, that you are in expert mode:

Then you have the option to look into traces:

The trace looks something like this:

 

Notes

Please implement note 2788908 – Condition Explanantion does not work for partial hits when working the traces, it is required to also persist the traces in case BRFplus did not return any data. It also provides an external ID which makes the search for traces easier.

 

Test Report

For quick check you can use the Test report /SCMTMS/TEST_CONDITION, it´s a bit limited, but still usefull sometimes. Of course it can only use the current state of a document.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.