cancel
Showing results for 
Search instead for 
Did you mean: 

Help with retrieiving texts

Former Member
0 Kudos

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>

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Satish,

That does return the correct data (I was able to get this earlier), however it returns three contexts, where I need it to return two. For the first line item, I am returned a suppressed context (which is correct to be suppressed). However I am returned two contexts for the second line item, one suppressed and one with the TDLINE. I need to have returned one item that is suppressed (for the first line item) and one that contains the TDLINE (for the second line item).

This is where I thought I could use the UseOneAsMany to go in reverse and create the two contexts I require. But it didn't work (even thought the help says it should).

I have tried to post the idoc I am using online, but my company does not give me access to places to do this, such as google documents. I would copy the xml here, but it's 950 lines long.

Former Member
0 Kudos

Hi Larry,

Use a simple if then with no else part and map like this:

e1edpt1(context to ededp01) --> exists --> splitbyvlaue(each value) --> this is first input to and

tdid (context to ededp01) equals to ZBLT --> exists --> splitbyvlaue(each value) --> this is second input to and

in the above the output --> if

then TDLINE (context to e1edpt1)

The output of if then to remove context and then to target.

If this doesnot work then give chemXML inovice xsd or from location where we can download and a sampel input payload for invoice so that somebody can help you.

Regards,

---Satish