cancel
Showing results for 
Search instead for 
Did you mean: 

Condition checking in Message Mapping

Former Member
0 Kudos

Hi

My scenario has a IDOC coming in XI and gets converted into a flat file

Idoc Structure

ControlRecord

ParentRecord

Field1

Field2

ChildRecord

Field3

Field4

Field5

Condition is Field2 = 0500 and Field5=""

If both the conditions are satisfied,then

For every occurence of child record,parent record needs to be repeated.

I used "useOneasMany" function to check ,but I am not able to check both the conditions.

Help needed on how to check these conditions

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

Do it like this....If Field2 = 0500 and Field5=""

then -here use the node function exists ..if child node exists,

give that output to create if function and the output node is parent node

One if ,one exist and one createif function are required here

regards,

Ramya Shenoy.

Former Member
0 Kudos

Hi,

Try Like below.

Field2-----------
   ChildRecord----Use One as many-->@
   Field5-----------

@----equalsS("0500")----------and----if with out else---then(--@)----Target.
   Field5--length--equalsS("0")--

If you required else condition then use "if" condition. As per above mapping any one condition fails target field will suppress.

Regards,

Prakasu.M

Former Member
0 Kudos

Hi

My issue solved using XSLT mapping.

Former Member
0 Kudos

Hi Sheela,

Please close this thread. Thanks!

Regards,

Neetesh

Former Member
0 Kudos

Hi Sheela,

I do not know why You say that "You are not able to check both the conditions"

I think you can use the following solution:

Apply useOneUsMany standard function to the replication.


[Field5]---->
[Field2]---->          [useOneUsMany ]--->[removeContext]--->[if  = ""]
[Field2]---->
                                                                        -------------->[AND]------> [createIf]--->[targe node]
 
[Field2]---->[if  = ""]

Regards

Ivan