cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Logic

Former Member
0 Kudos

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?

View Entire Topic
Former Member
0 Kudos

Hi Hareen,

id -> exits(true) -> constant(true) -> equals ->if (then)-> check -> exits -> constant(true) -> equals -> target msg

thanks,

Former Member
0 Kudos

HI Bhavanisankar,

you logic fails when ID and Flag does not exist.

Former Member
0 Kudos

hi,

first u dont write ur logic ,

u try this

1.id -> 2.exits(true) -> 3.constant(true) -> 4.equals ->5.(first)if (then)

-> 6.check -> 7.exits -> 8.constant(true) -> 9. equals -> 10.(second)if -> target

if Check fail (second)(if) then -> constant -> target msg

if Id fail (first )if-else ->constant -> target

thanks,

Former Member
0 Kudos

HI Bhavani,

Your logic worked.

Thanks a lot!!!!!