<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Check failed in condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-failed-in-condition/m-p/12678637#M2016800</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;BR /&gt;I am using simple transformation to serialize and deserialize a XML file.Some of the xml element is optional which means it can appear in the XML structure but it is not a must.
  &lt;BR /&gt;The code below is a snippet from the transformation file that I have created:
  &lt;PRE&gt;&lt;CODE&gt;    ....&lt;BR /&gt;    &amp;lt;tt:cond check="$INVL.PRICE.PRICE_AMOUNT &amp;gt; P(0.00)"&amp;gt;&lt;BR /&gt;      &amp;lt;cbc:PriceAmount&amp;gt;&lt;BR /&gt;        &amp;lt;tt:attribute name="currencyID" value-ref="$INVL.PRICE.PRICE_CURRENCY"/&amp;gt;&lt;BR /&gt;        &amp;lt;tt:value ref="$INVL.PRICE.PRICE_AMOUNT"/&amp;gt;&lt;BR /&gt;      &amp;lt;/cbc:PriceAmount&amp;gt;&lt;BR /&gt;    &amp;lt;/tt:cond&amp;gt;&lt;BR /&gt;    ....&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;What it should do is to check if the value of INVL.PRICE.PRICE_AMOUNT is greater then 0.00. The PRICE_AMOUNT has data type CURR length 23 decimal 2.However when the amount is 0.00 as the example shows below the system dumps. 
  &lt;BR /&gt;
  &lt;PRE&gt;&lt;CODE&gt;    &amp;lt;cac:Price&amp;gt;&lt;BR /&gt;      &amp;lt;cbc:PriceAmount currencyID="EUR"&amp;gt;0.00&amp;lt;/cbc:PriceAmount&amp;gt;&lt;BR /&gt;    &amp;lt;/cac:Price&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;The error message:
  &lt;BR /&gt;An exception has occurred in class "CX_ST_COND_CHECK_FAIL". As the exceptionwas not
  &lt;PRE&gt;&lt;CODE&gt;caught, a runtime error occurred. The reason for the exception&lt;BR /&gt;occurring was:&lt;BR /&gt;The following error has occurred in row 147 of program&lt;BR /&gt;XML_FILE==============XT: "Check failed in condition"&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;What am I doing wrong?
  &lt;BR /&gt;Best regards</description>
    <pubDate>Wed, 11 Jan 2023 07:41:35 GMT</pubDate>
    <dc:creator>friendlycoder</dc:creator>
    <dc:date>2023-01-11T07:41:35Z</dc:date>
    <item>
      <title>Check failed in condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-failed-in-condition/m-p/12678637#M2016800</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;BR /&gt;I am using simple transformation to serialize and deserialize a XML file.Some of the xml element is optional which means it can appear in the XML structure but it is not a must.
  &lt;BR /&gt;The code below is a snippet from the transformation file that I have created:
  &lt;PRE&gt;&lt;CODE&gt;    ....&lt;BR /&gt;    &amp;lt;tt:cond check="$INVL.PRICE.PRICE_AMOUNT &amp;gt; P(0.00)"&amp;gt;&lt;BR /&gt;      &amp;lt;cbc:PriceAmount&amp;gt;&lt;BR /&gt;        &amp;lt;tt:attribute name="currencyID" value-ref="$INVL.PRICE.PRICE_CURRENCY"/&amp;gt;&lt;BR /&gt;        &amp;lt;tt:value ref="$INVL.PRICE.PRICE_AMOUNT"/&amp;gt;&lt;BR /&gt;      &amp;lt;/cbc:PriceAmount&amp;gt;&lt;BR /&gt;    &amp;lt;/tt:cond&amp;gt;&lt;BR /&gt;    ....&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;What it should do is to check if the value of INVL.PRICE.PRICE_AMOUNT is greater then 0.00. The PRICE_AMOUNT has data type CURR length 23 decimal 2.However when the amount is 0.00 as the example shows below the system dumps. 
  &lt;BR /&gt;
  &lt;PRE&gt;&lt;CODE&gt;    &amp;lt;cac:Price&amp;gt;&lt;BR /&gt;      &amp;lt;cbc:PriceAmount currencyID="EUR"&amp;gt;0.00&amp;lt;/cbc:PriceAmount&amp;gt;&lt;BR /&gt;    &amp;lt;/cac:Price&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;The error message:
  &lt;BR /&gt;An exception has occurred in class "CX_ST_COND_CHECK_FAIL". As the exceptionwas not
  &lt;PRE&gt;&lt;CODE&gt;caught, a runtime error occurred. The reason for the exception&lt;BR /&gt;occurring was:&lt;BR /&gt;The following error has occurred in row 147 of program&lt;BR /&gt;XML_FILE==============XT: "Check failed in condition"&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;What am I doing wrong?
  &lt;BR /&gt;Best regards</description>
      <pubDate>Wed, 11 Jan 2023 07:41:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-failed-in-condition/m-p/12678637#M2016800</guid>
      <dc:creator>friendlycoder</dc:creator>
      <dc:date>2023-01-11T07:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Check failed in condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-failed-in-condition/m-p/12678638#M2016801</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;have you included: &amp;lt;tt:switch-var&amp;gt; ?&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenst_tt_switch-var.htm"&gt;ST - tt:switch-var, Case Distinction for Variables - ABAP Keyword Documentation (sap.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Conditional transformations are normally used as cases in tt:switch and tt:group.&lt;/P&gt;&lt;P&gt;or try to replace &amp;gt; with "&amp;amp; g t ;" (without spaces)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;tt:condcheck="$INVL.PRICE.PRICE_AMOUNT &amp;gt; P(0.00)"&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jan 2023 10:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-failed-in-condition/m-p/12678638#M2016801</guid>
      <dc:creator>ThorstenHoefer</dc:creator>
      <dc:date>2023-01-11T10:29:03Z</dc:date>
    </item>
  </channel>
</rss>

