Hi all,
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.
The code below is a snippet from the transformation file that I have created:
....
<tt:cond check="$INVL.PRICE.PRICE_AMOUNT > P(0.00)">
<cbc:PriceAmount>
<tt:attribute name="currencyID" value-ref="$INVL.PRICE.PRICE_CURRENCY"/>
<tt:value ref="$INVL.PRICE.PRICE_AMOUNT"/>
</cbc:PriceAmount>
</tt:cond>
....
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.
<cac:Price>
<cbc:PriceAmount currencyID="EUR">0.00</cbc:PriceAmount>
</cac:Price>
The error message:
An exception has occurred in class "CX_ST_COND_CHECK_FAIL". As the exceptionwas not
caught, a runtime error occurred. The reason for the exception
occurring was:
The following error has occurred in row 147 of program
XML_FILE==============XT: "Check failed in condition"
What am I doing wrong?
Best regards