Skip to Content
avatar image
Former Member

UDF to group common values and insert context change

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 17, 2017 at 12:13 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2017 at 06:11 AM

    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.


    Add comment
    10|10000 characters needed characters exceeded