cancel
Showing results for 
Search instead for 
Did you mean: 

UDF help

Former Member
0 Kudos

Hi,

Can you please help in the below issue.

I am having an idoc structure like as shown below.

<IDOC>

<E1EDP01>

<E1EDP02>

<QUALF>85</QUALF>

<BELNR>31</BELNR>

</E1EDP02

<E1EDP03>

<IDTNR>41</IDTNR>

<DATUM>10101</DATUM>

</E1EDP03>

</E1EDP01>

<E1EDP01>

<E1EDP02>

<QUALF>85</QUALF>

<BELNR>32</BELNR>

</E1EDP02

<E1EDP03>

<IDTNR>41</IDTNR>

<DATUM>10104</DATUM>

</E1EDP03>

</E1EDP01>

<E1EDP01>

<E1EDP02>

<QUALF>85</QUALF>

<BELNR>32</BELNR>

</E1EDP02

<E1EDP03>

<IDTNR>41</IDTNR>

<DATUM>10104</DATUM>

</E1EDP03>

</E1EDP01>

<E1EDP01>

<E1EDP02>

<QUALF>85</QUALF>

<BELNR>33</BELNR>

</E1EDP02

<E1EDP03>

<IDTNR>41</IDTNR>

<DATUM>10101</DATUM>

</E1EDP03>

</E1EDP01>

The E1EDP02 and E1EDP03 are in the same level.

My output should retrive the DATUM values.

Find the below display queue.

10101

10104

10101

Can you please help how to get the above output.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member463616
Contributor
0 Kudos

Hi,

Please try like this. I hope that it might be achieve your requirement.

E1DP03-<DATUM>-> remove context> Split by value (ValueChange)>CollapseContext>Target Field

Regards,

P.Rajesh

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I agree .. This will work.

E1DP03-<DATUM>---> remove context--> Split by value (ValueChange)-->CollapseContext-->Target Field

Former Member
0 Kudos

Hi,

Try this:

E1EDP03-<DATUM> -> RemoveContext -> SplitByValue\[ValueChange] -> Target Field

Regards,

Aravind

former_member181962
Active Contributor
0 Kudos

Hi,

I did nlt understand the issue here?

you can simply map the e1edk03->datum by chosing the root node context, isnt it?

Best Regards,

ravi

Former Member
0 Kudos

Hi Ravi,

Thanks for your reply.

I have done the same thing. But i am not getting the expected values.

If i use directly where IDTNR=41, then map DATUM value..

Then my output will be like as shown below.

10101

10104

10104

10101

But i need to get the output like

10101

10104

10101

E1EDP02 and E1EDP03 are in the same level.

If E1EDP02-BELNR is repeating, we need to consider the first value and the corresponding E1EDP03-DATUM value should be mapped?

In my case <BELNR>32</BELNR> is repeated twice. So the first value is considered and corresponding E1EDP03 - DATUM value

i.e 10104(shoud not be repeated) should be the output.

Former Member
0 Kudos

Leela,

Just proceed as follows:

E1DP02~DATUM-> remove context> Sort-> Split by value (each value)>collapseContext--->target