on 04-15-2011 1:51 AM
Hi All,
File to Idoc scenario.
My file looks like below.
HD 89650 28/01/11 "Presciber tan"
AF "disc-rsn"
RK "007287001" A
KE disc-code "007287"
KE addr-num "001"
DF fax-num ""
DF in-out "I"
DF phone-2 "23221"
AF "drs"
RK "007287" A
KE dr-num "00221"
KE addr-num "001"
DF affil "OPSM"
DF rec-stat "A"
DF phone-2 "12444"
AF "disc-rsn"
RK "dr-addraddress-1 17287|1EN" A
KE disc-code "008287"
KE field-name "address-1"
KE element " 1"
DF in-out "I"
DF phone-2 "1232"
DF post-code "3109"
DF provider-num "5349201J"
DF rec-stat "A"
T 24
I need to capture and create target segments only for the values "AF "disc-rsn"".And pass all the relavant rows (RK,KE,DF...) which are under "AF "disc-rsn"" to the target fields.
I'm struggling to parse the value to the output structure as RK,KE,DF will be present under anywhere like "AF drs", "AF disc-rsn" etc.
I'm able to create the target segments (2 Zdisc segments as 2 "AF disc-rsn" present in the file), but unable to parse the field values to the target fields.
Ex: DF phone-2 is present in 8th, 15th,22nd row. I need to pass only 8th and 22nd rows to the target fields.
After content conversion, My Source XML looks like below.
<?xml version="1.0" encoding="utf-8" ?>
- <MT_DiscountDetails>
- <HD>
<KeyField>HD</KeyField>
<HDRow>89650 28/01/11 "Presciber tan"</HDRow>
</HD>
- <AF>
<KeyField>AF</KeyField>
<AFRow>"disc-rsn"</AFRow>
</AF>
- <RK>
<KeyField>RK</KeyField>
<RKRow>"007287001" A</RKRow>
</RK>
- <KE>
<KeyField>KE</KeyField>
<KERow>disc-code "007287"</KERow>
</KE>
- <KE>
<KeyField>KE</KeyField>
<KERow>addr-num "001"</KERow>
</KE>
- <DF>
<KeyField>DF</KeyField>
<DFRow>fax-num ""</DFRow>
</DF>
- <DF>
<KeyField>DF</KeyField>
<DFRow>in-out "I"</DFRow>
</DF>
- <DF>
...........................
Is there any way I can acheive my mapping based on the above condition?? Kindly suggest me.
Thank you for your time.
Regards
Deepthi
Not required. Using Java function. Solved the issue.
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 | |
11 | |
10 | |
9 | |
8 | |
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.