Skip to Content
author's profile photo Former Member
Former Member

Mapping Issue. Parsing problem to target Fields based on condition.

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 15, 2011 at 01:48 AM

    Not required. Using Java function. Solved the issue.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.