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

Mapping problem on different levels. (IDOC) to XML

I am having a mapping issue with a multi segment IDOC. It seems that it should be pretty straight forward but I am struggling. I have looked at some pretty good documentation but it still doesn't seem to help. The IDOC segments deal with text lines in SAP. The text identifier is at a higher level and the text lines are a level below the text identifier. I am writing these records to XML . Both of these are at the same level. I need to combine the text identifier from the higher level to to each text line in the XML.

Here is my source file. It contains two different types of text identifiers (TDID)

<E1TXTH8 SEGMENT="1">

<TDID>0012</TDID>

<TDSPRAS>E</TDSPRAS>

<E1TXTP8 SEGMENT="1">

<TDLINE>This is line 1 of TDID 0012</TDLINE>

</E1TXTP8>

<E1TXTP8 SEGMENT="1">

<TDLINE>This is line 2 of TDID 0012</TDLINE>

</E1TXTP8>

<E1TXTP8 SEGMENT="1">

<TDLINE>This is line 3 of TDID 0012</TDLINE>

</E1TXTP8>

</E1TXTH8>

<E1TXTH8 SEGMENT="1">

<TDID>Z110</TDID>

<TDSPRAS>E</TDSPRAS>

<E1TXTP8 SEGMENT="1">

<TDLINE>This is line 1 of TDID Z110</TDLINE>

</E1TXTP8>

<E1TXTP8 SEGMENT="1">

<TDLINE>This is line 2 of TDID Z110.</TDLINE>

</E1TXTP8>

</E1TXTH8>

I wand this to map so that I see the following results:

<TDID>0012</TDID>

<TDLINE>This is line 1 of TDID 0012</TDLINE>

</access>

<access>

<TDID>0012</TDID>

<TDLINE>This is line 2 of TDID 0012</TDLINE>

</access>

<access>

<TDID>0012</TDID>

<TDLINE>This is line 3 of TDID 0012</TDLINE>

</access>

<access>

<TDID>Z110</TDID>

<TDLINE>This is line 1 of TDID Z110</TDLINE>

</access>

<access>

<TDID>Z110</TDID>

<TDLINE>This is line 2 of TDID Z110</TDLINE>

</access>

</MDB_tblshippingtext>

</InsertStatement_ShippingText>

So far I have been unsuccessful. I am mapping the access element to the lower level segment E1TXTP8. This gives me all of the text lines but the TDID is not filled in properly.

If I map the access element to the highler level E1TXTH8 then I do not get all of my text lines from the lower level. I have looked at the document "Replication of Nodes using the graphical tool mapper" but I still don't seem to understand my problem.

Any help is appreciated.

Thanks,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:34 PM

    Hi !

    Use the "UseOneAsMany" standard mapping function to have many "TDID" tags, one for each "TDLINE" in the target message structure.

    Regards,

    Matias

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 06:46 AM

    Hi Neela,

    I have uploaded Mapping pictures(Access node Mapping,TDID field Mapping,TDLINE Field Mapping).

    http://www.flickr.com/photos/14144840@N02

    In Access node Mapping You can use removeContexts node function as shown in Pic or without using removeContexts function Change Context to parent of E1TXTH8 node (How to Change Context: Right click on TDLINE in Data flow editor Context->select parent of E1TXTH8 node)

    In TDID field Mapping useOneAsMany node function and change contexts of 2nd and 3rd inputs of this function to E1TXTH8 as shown in Pic.

    Please let me know if you have any issues.

    Thanks,

    Jag

    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.