Hi ,
I have scenario, where in mapping I need to have a condition.. where the fields are not mandatory.
Below is the my Source XML:
<?xml version="1.0" encoding="UTF-8" ?>
<INVENTORYINTERFACE>
<DOCUMENT>
<SAPFUNCTIONALITY>CONSUMPTION</SAPFUNCTIONALITY>
<BLDAT>07.29.2011</BLDAT>
<BUDAT>07.29.2011</BUDAT>
<FileName>test.xml</FileName>
<MATERIALDATA>
<MATNR>1000000000</MATNR>
<BATCHDATA>
<CHARG>123456789</CHARG>
<WERKS>1000</WERKS>
<ERFMG>186.10</ERFMG>
<ERFME>KG</ERFME>
<ID>1</ID>
<FLAG>Y</FLAG>
</BATCHDATA>
</MATERIALDATA>
</DOCUMENT>
</INVENTORYINTERFACE>
Here if ID or Flag is not there then I need to process.
And If ID exists then I need to check for the Flagexistsa or not... if any of then is missing then I need to fail the mapping
How can I do so?