cancel
Showing results for 
Search instead for 
Did you mean: 

iDoc Scenario - how to jump in context

0 Kudos

Hello,

I need help for my iDoc -> XML scenario.

follow situation

IDOC

---SEC1

-


VAL1=11

-


VAL2=aa

---SEC1

-


VAL1=22

-


VAL2=bb

---SEC1

-


VAL1=33

-


VAL2=cc

---SEC2

-


SEC2.1

-


VAL1=11

-


VAL2=ab

-


SEC2.1

-


VAL1=22

-


VAL2=bc

-


SEC2.1

-


VAL1=33

-


VAL2=cd

-


SEC2.2

-


VAL1=22

-


VAL2=xyz

I have to test

If IDOC/SEC1/VAL1=22 then write IDOC/SEC1/VAL2 into INVAL1

If IDOC/SEC1/VAL1=22 doesn't exist

then go down to IDOC/SEC2/ and compare all VAL1 only in SEC2.1

if IDOC/SEC2/SEC2.1/VAL1=22 then write IDOC/SEC2/SEC2.1/VAL2 into INVAL1

It could be any number of SEC1 and SEC2.1

Thanks for any ideas

Andrej

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Use If Then else:

First IF Condition will be as follows.

IDOC/SEC1/VAL1--> Fix values (Default false, 22 = true)

Then Pass,

IDOC/SEC1/VAL1 --> Target

Else Pass output of below mapping

Use If without else.

If

IDOC/SEC2/SEC2.1/VAL1 --> format by example = 22

Then,

pass IDOC/SEC2/SEC2.1/VAL1

-Gouri

Former Member
0 Kudos

Hi ,

Try with below mapping.

Mapping to the node(lets say "Record" is the node) which contains the field "INVAL1" at the target side.

VAL1(context:IDOC)

-


>equalsS--->createIf


>removeContexts--


>Record

Constant(22)

fro teh field level mapping, use if else conditions as per your requirement. Hope , it works.

Regards,

Swetha

Edited by: Swetha Reddy on Jan 22, 2010 6:16 AM