cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering IDoc Segments in Graphical Mapping

Former Member
0 Kudos

Hello,

I have a IDoc structure that looks similar to the following One.

IDoc

EDIDC40

Segments (1..Unbounded)

Field1

Field2

Field3

All of those unbounded segments should be mapped to a target SQL structure, but only in case field1 and field3 are present.

I was playing around with contextChanges etc. but until now I did not get the desired result. Do you have any idea on how to map those segments and fields to get the desired result?

Thank you very much!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

Write a UDF and check whether the field 1 and field 3 value exists if it exists then only map the target field.

Thanks

Chirag Gohil

Former Member
0 Kudos

Hello,

well, the problem is that I have to map the whole segment to a target record (for using an SQL insert) in case the fields are there and not create a record at all if one of the fields does not exist.

So writing a UDF on field level alone is not enough I think. I need to somehow treat also the according segment.

And idea?

Former Member
0 Kudos

Hi,

In the receiver determination step, of integration directory configuration.....

Under Configured Receivers you have three options:

CONDITION PARTY SERVICE.

Give your Business Service(Target)UNDER SERVICE option ..... then goto Condition.....Click on the Search Button(?)

It will take you to the condition Editor.Click on the search button on the left operand.It will take you to the X-path Expression,where you have your IDOC structure(Usually source structure)....

Here you can have a condition saying that your field has a value then send it to the TARGET System.....

Hope this helps....

Regards,

Mili

Former Member
0 Kudos

Hello,

thank you for the advise with the receiver determination, but this is not the way I can go for as I want to have a single target SQL XML structure that I send to the JDBC Adapter (to have all of them in a single transaction).

So I have to find a way how to filter the segments out in the message mapping.

Former Member
0 Kudos

<a href="/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination:///people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Hope this helps....

Regards,

Mili

bhavesh_kantilal
Active Contributor
0 Kudos

Use the standard function EXISTS.

When mapping the Target SQL segment for insert, use the Source field with EXISTS. Also make sure that the contenxt of this source field is moved one to the higher root node level.

Regards

Bhavesh

Former Member
0 Kudos

Hi,

this sounds very feasable. I will try it. Just one more question for complete understanding:

I will map all fields to be inserted with the exists functions and will also map the exists condition to the upper segment for insertion --> However is it enough to shift the context up in this case?

I need a target SQL segment for each of the source segments where all the mandatory fields exist.

Former Member
0 Kudos

Hi,

You can achieve this in the receiver detrmination step , by using the X-path Expression...

Regards,

Mili