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

Mapping: Re-Sorting/Comparing Fields

Hi everyone,

i have the following issue in my mapping:

In my IDoc-to-JDBC-scenario I want to compare two IDoc-fields of two different nodes with different length (the number of keys and values are not the same), e.g. Filed1 in Node1 and Field2 in Node2 which have following queues:

Field1 Field2 A A B C C E E G F G

My output queue (after comparing or re-sorting) should be:

Compare-Queue

A SUPPRESS C E SUPPRESS G

Is there any way to solve this problem using SAP standards? If not, any idea for an UDF?

I'll be thankful for any help/support 😊

Best regards,

Hamed

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Mar 30, 2015 at 12:04 PM

    Hi Hamed,

    You need to find a value from the first queue in the second one, therefore you can use a standard funcition because you don't know a priori in which position you will find it. You need to do an UDF with a FOR in the first queue and a second for inside the other to find the first value or to response a SUPRESS value.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 30, 2015 at 12:08 PM

    Hi,

    you can use a udf by providing 2 inputs field1 and field2.

    for each value of field1 check with all values of field2. if the value exists then insert value of field1 in output queue.

    else add suppress to the output queue.

    Regards

    Arshath

    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.