cancel
Showing results for 
Search instead for 
Did you mean: 

How to get refused Conditions as an export parameter

guenter_schepers
Explorer
0 Kudos
94

Hi *,

i am looking for a function which delivers me the "reason" why no entry was selected in a decision table.

In detail i have a decision table with two conditon and one result column. This table is used to check if a special status (result column) is valid or not. The conditions are the actual status on the one side and the contents of several other input parameters on the other side. If only the first conditon is true but the second one not i need to tell the user which input parameters have invalid content. To tell him that the new status can not be set will not help him to continue.

Does anyone solved this question already or tried to find it? I am thankfull for any hint on my problem.

Kind regards

Günter

Accepted Solutions (0)

Answers (2)

Answers (2)

carsten_ziegler
Active Contributor
0 Kudos

We have recently improved the lean trace greatly. Now, you do not need to deal with XML data but can directly extract the relevant information. To do so you need >= NW 7.4 SP5 or >= NW 7.31 SP9 and maybe 2-3 notes when starting with SP5/SP9.

ttrapp
Active Contributor
0 Kudos

At first I recommend to use the automated check functions for completeness and overlap. Perhaps your decision table has an error. Then I suggest you to use the simulation function and analyse the trace.

Or do you need the result of the trace during run time? The is an XML document that can be extracted and analysed but usually the result is not as good as the trace from BRFplus workbench.

Best Regards,

Tobias

guenter_schepers
Explorer
0 Kudos

Hi Tobias,

I need the information during run time as the application is a dialog function where users have to fill out several fields and step through a given process. Depending on the two conditions above mentioned the process switched to the next step - or not. And if not i need to inform the user why it does not switch and what fields he has to fill out to continue.

To get the BRF+-trace would be a solution - is there a way to read the trace  and display it - or can identify the decision table lines which are refused and assign the contents of the condition column to a specific export parameter?

How do i extract the XML-document online?

Kind regards

Günter

ttrapp
Active Contributor
0 Kudos

I think the display of the trace in a standard WDA-component would be the best solution. Maybe can help.

You can return the trace from the BRFplus-function call and can extract everything using XSLT (CALL TRANSFORMATION command):

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" version="1.0">

  <xsl:strip-space elements="*"/>

  <xsl:template match="/">
    <asx:abap>
      <asx:values>
        <ROOT>
          <xsl:apply-templates/>
        </ROOT>
      </asx:values>
    </asx:abap>
  </xsl:template>

  <xsl:template match="/FDT/LOG/TEXT">
    <item>
      <xsl:value-of select="string(.)"/>
     </item>
     <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="/FDT/LOG/CONTEXT_UPDATE">
    <item>
      <xsl:value-of select="concat(string(@DataObjectName), ' is assigned to ' , string(text()))"/>
     </item>
     <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="text() | @*">
  </xsl:template>
</xsl:transform>

You have to adjust the transformation to get the result you need.

Best Regards,

Tobias

P.S.: I'm still thinking about a better solution...