cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC Mapping UDF to deal with Segments

0 Kudos

Hi All,

Need IDOC Mapping help for my scenario IDOC - File(PI 7.31)

IDOC Item level Fields are mapped to Header level for Target System.

<E1J3P01 SEGMENT="1-Unbounded">  --- Item

    <E1EDPT1 SEGMENT="1">

                  <TDID>AT</TDID>

                  <TSSPRAS>E</TSSPRAS>

                <E1EDPT2 SEGMENT="1">

                    <TDLINE>121345</TDLINE>

                </E1EDPT2>

                <E1EDPT2 SEGMENT="1">

                    <TDLINE>CITES</TDLINE>

                </E1EDPT2>

                  <E1EDPT2 SEGMENT="1"/>

            </E1EDPT1>

<E1J3P01>

Now based on the condition TDID "AT" the values of  <TDLINE>121345</TDLINE> and <TDLINE>CITES</TDLINE> are concatenated and sending to target field.This is fine.

Every Time the values from the first Item are sending to Target system.

Now Fisrt Item vales might come blank and I need to check the second item values and need to pass as mentioned above.

If both first and Second item has values then need to consider only the first Item values.

Do I need write UDF or this can achieved by Graphical Mapping itself. For fisrt Item i had used Copy values and did that.Now need handle this please giude me.

Rgds,

Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184789
Active Contributor
0 Kudos

Hi,

You can change the context of the fields to higher level before concatenating them if it is such that the first item does not contain the fields. Or you can do like below:

ambrish_mishra
Active Contributor
0 Kudos

Hi Kumar,

You can achieve this with graphical mapping but UDF will be much cleaner and simple. Use context type and context should be an item level (higher than E1EDPT1).

Give it a try else come back to the forum.

Hope it helps!

Ambrish