cancel
Showing results for 
Search instead for 
Did you mean: 

XPath Expression

Former Member
0 Kudos

Hey Guys...

Currently I am working on one Xpath expression issue..as described below;

Its a File to Idoc scenario ...where in I need to check the two Item level nodes and based on that need to produce the target Idoc. and my souce structure look like this....

DT_Input

Header --- 1 to 1

H1

H2

H3

Item -


0 - Unbounded

Item_1

Item_2

Item_3

Query : If the Item_1 and Item_3 are not equal AND Item_1 not equal to blank ...then I need to produce the target Idoc otherwise not!

Can you please help me out!!!

Cheers.,

S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The expression would be

//Item[Item_1 != Item_3 and Item_3 !="" ]

And try mapping it to Idoc segment or use in Interface Determination.

Regards,

Radek

Former Member
0 Kudos

Hi,

I have used the same kind of expression with EX operator...still its not working.

-S

Former Member
0 Kudos

Can anybody help me out!!!

-S

Former Member
0 Kudos

Have you tried to configure Receiver Determination in Integration Directory?

Regards,

Radek

Former Member
0 Kudos

You could create an advance user defined function.

fed your function with the 3 values (Item_1 and Item3).

Inside the function, check the values of Item_1 and Item_3 nodes.

What is the result of your query? I mean, if your query is meet, Which value do you want to populate in your IDOC?

You should use this sentence: result.addValue(a[0]). It is supposed a is the value returned by the funcion.

If you don`t want create the node in the IDOC, use this other one: result.addValue(ResultListCC).

Regards,

Carlos

Former Member
0 Kudos

HI,

I am new to java...can you jst help me out to write UDF?

-S

Former Member
0 Kudos

yeah...I have given this XPath in RD itself!!

-S

Former Member
0 Kudos

Can't we work this...without UDF?!! I mean...by using X Path itself?!!

-S

Former Member
0 Kudos

It can be done using Standard Functions

Regards

Krishna

Former Member
0 Kudos

hi

Check this screenshot

http://imageupper.com/i/?S0200010090011S2206064301383060

regards

krishna

Answers (5)

Answers (5)

Former Member
0 Kudos

Xavier,

We can do this in message mapping only. Check your conditions in mapping and if they are true then create an idoc else dont create an idoc in mapping itself.

Follow Krishnamoorty screenshot you should resolve your issue with that only.

Regards,

---Satish

former_member192295
Active Contributor
0 Kudos

Hi,

Through condition editor it is little bit critical, through UDF we can solve easily. follow below configuration

1. Item1 and item 3 take as mandatory.

2. Take two UDF check condition

1.

if item1 # item2

return item 1

2. if item2 # item1

return item 2

I hope it will help

SudhirT
Active Contributor
0 Kudos

Hi Stallin,

Actually the format what i hv answered get changed after posting into underlines. therefore provide me your Email ID, I'll fwd you the screenshot of pattern that you can try for your case.

Just sent you on your yahoomail ID. chk it

Thanks!

Edited by: sudhir tiwari on Sep 5, 2008 12:17 PM

SudhirT
Active Contributor
0 Kudos

Hi,

Use EX operator in expression editor with the syntax like node1/node2/ [field1 "condition" field2]. this operator will provide the pattern you want.

Jitendra_Jeswan
Contributor
0 Kudos

Hi,

Try using "EX" operator in the Condition editor for your query and create your own expression.

Hope this helps.