on 01-23-2013 6:21 AM
Hi Friends,
I got struck with mapping issue and require your valuable inputs:
my scenario is file to IDOC:
In one particular field from source file , input values are coming as : one! two! three!four!five!six. count may increase or decrease....(dynamic)
What is expected is .. I have to read till the delimiter value and create segments accordingly. In above example , I have to generate six segments at target side.
source target
<key>abc</key> <key>abc</key> segment1
<text> one;two;three;four;five;six</text> <text> one </text>
<key> abc</key>
<text> two</text> segment2
<key> abc</key>
<text>three</three> segment3
File provider is not ready to change his design. please share your thoughts.
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Thank you.
I have replicated the same as you mentioned. Function is not creating multiple segments based on input field values ( delimeter). But, other values are coming proper in debug mode.
input provided : one!two!three for testing
error :
Value missing in queue context, Target XSD requires a value for this element, but the target field mapping does not create one...
If you don't mine , can you share your function signature as well as test result...
Regards,
Suman
Hi Amit,
Thank you and appreciate your time.
It is working now..... small bug was due to one mandatory field missing from source file.
Points given.
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit/ Friends
I was under impression that there will be only one segment with values separated by delimiter(!). In that case, logic provided by you is working perfect .
There will be a case where I can get input as several segments; In this case, segments are not generating as expected.
eg;
FILE IDOC
<root> < target>
<key> abc </key> <key> abc </key>
<text> one </one> <text>one </one>
</root> </target>
<root> <root>
<key> def </key> <key> def</key>
<text> two!three </one> <text>two </one>
<key> def</key>
<text>three</text>
</root> </root>
As I have mapped based on keyword and text, segment repeation is ignoring for single based values. Is there any way I can enhance java function to accomodate both scenarios.
Thanks in Advance.
Regards,
Suman
Hi Suman,
If its a FCC file then u should use JAVA UDF to split the values.
Thanks
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.