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

Help with retrieiving texts

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>

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 Jul 21, 2009 at 06:10 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2009 at 06:53 PM

    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.

    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.