Skip to Content
0

UDF to group common values and insert context change

Mar 16, 2017 at 02:44 PM

53

avatar image
Former Member

Hi All

Please help me with UDF for below requirement

I have to add the quantity if we have same material and same POSNR and same Delivery and same Transport ID.
I have put in logic for above.
I need UDF to group common values and insert context change.

For example:
Input:
a
b
b
a
c
-------------------------------------------------
d
a
c
a
output should be
a
a
-----------
b
b
------
c
--------------------------------------------------------
d
------
a
a
----------
c
---------
I know we can use Sort->Split by Value change functions.
but this will give incorrect Quantity as we are not sorting Material/POSNR/Delivery.

If I try to SORT Material/POSNR/Delivery that will lead to other mismatch.I tried those possible ways.So finally thought good to go with UDF for this.

Regards

Anitha

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Harish Mistri Mar 17, 2017 at 12:13 AM
0

Hi Anitha,

What is your source structure hierarchy of Material/POSNR/Delivery and Quantity. Based on this field context mapping/udf needs to design. Please provide the source structure, target structure and sample input.

regards,

Harish

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 17, 2017 at 06:11 AM
0

Hi Harish

Thanks for your reply.It is IDOC to IDOC scenario.Source and Target are same
/DELVRY07/IDOC/E1EDL20/TRAID
/DELVRY07/IDOC/E1EDL20/E1EDL24/POSNR
/DELVRY07/IDOC/E1EDL20/E1EDL24/Material(KDMAT)
/DELVRY07/IDOC/E1EDL20/E1EDL24/Quantity(LFIMG)
/DELVRY07/IDOC/E1EDL20/E1EDL24/E1EDL41/Delivery(BSTNR)

There can be number of Transport ID's(TRAID) so IDOC occurence is 1...n

so I have to add the quantity if we have same material and same POSNR and same Delivery and same Transport ID.input-xml.txt

As per this input XML I expect 2 IDOCs as there are two TRAID.



zxnvr.png (3.3 kB)
input-xml.txt (3.2 kB)
Share
10 |10000 characters needed characters left characters exceeded