cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping query

Former Member
0 Kudos

Hi,

SOURCE:

<?xml version="1.0" encoding="UTF-8"?>

<SHIP_INFO_HDR>

<SHNUMBER/>

</SHIP_INFO_HDR>

<SHIP_INFO_ITM>

<item> -


can be multiple

<SHITEM/>

<DOC_NUMBER/>

<COM_NUMBER/>

</item>

</SHIP_INFO_ITM>

TARGET:

<TARGET>

<SHITEM_1/>

<DOC_NUMBER_1/>

<SHITEM_2/>

<DOC_NUMBER_2/>

<TARGET>

My requirement is to map the 1st item with the corresponding fileds in Target and similarly for 2nd item.

Please suggest.

regards,

Piyush

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

    item - index(1,1) - equals  - ifwithoutelse - SHITEM_1
            constant(1) /      SHITEM*  /

    item - index(1,1) - equals  - ifwithoutelse - SHITEM_2
            constant(2) /      SHITEM* /



  • set context of SHITEM to SHIP_INFO_ITM

Former Member
0 Kudos

Hi Stefan,

Thanks a lot for the quick and correct response

cheers,

Piyush

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stefan,

It works fine for if without else.

But I want to pass a default val,

ue of 0. So I tried using an If then else function.

But it always sets the target to 0.

Please suggest.

regards

Piyush