on 11-19-2007 4:05 PM
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
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.
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.
Hi,
You can achieve this in the receiver detrmination step , by using the X-path Expression...
Regards,
Mili
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.