Skip to Content
0
Former Member
Jul 21, 2009 at 05:36 PM

Help with retrieiving texts

97 Views

I am working with the invoic02 idoc. In my example, I have an idoc with two E1EDP01 segments. The first item contains one E1EDPT1 segment with three lines of text (three E1EDPT2 segments). The second item contains two text segments (E1EDPT1), the first with three E1EDPT2 segments, the second having only one. Below is a 'snapshot' of what I am talking about.

I want to map only the ZBLT text to the special instructions at the line item of a chemXML Invoice. When I do a straight mapping, where the context is set to E1EDP01, the first line item works fine (as there is no ZBLT), however the second line item returns the wrong text. It returns (below) "ADJUVANTS 5". I assume this is due to ZBLT being the second item, telling XI to return the second text item (of the four) regardless to which E1EDPT1it's related to.

I attempted to use UseOneAsMany, however I could not get it to return what I needed. I followed some instructions on this function. For the three items, I used TDID (with context on E1EDPT1), TDLINE (with context on E1EDPT1) and tried to use TDLINE (with context on E1EDP01 to get the two contexts). This failed. I couldn't use UseOneAsMany unless the final items's context was E1EDPT1 or E1EDPT2, which does me no help.

Any ideas on what I can do?

The first line item:

<E1EDPT1 SEGMENT="1">

<TDID>Z034</TDID>

<TSSPRAS>E</TSSPRAS>

<TSSPRAS_ISO>EN</TSSPRAS_ISO>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 1</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 2</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 3</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

</E1EDPT1>

The second line item:

<E1EDPT1 SEGMENT="1">

<TDID>Z034</TDID>

<TSSPRAS>E</TSSPRAS>

<TSSPRAS_ISO>EN</TSSPRAS_ISO>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 4</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 5</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

<E1EDPT2 SEGMENT="1">

<TDLINE>ADJUVANTS 6</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

</E1EDPT1>

<E1EDPT1 SEGMENT="1">

<TDID>ZBLT</TDID>

<E1EDPT2 SEGMENT="1">

<TDLINE>140.000</TDLINE>

<TDFORMAT>*</TDFORMAT>

</E1EDPT2>

</E1EDPT1>