cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping: Re-Sorting/Comparing Fields

Former Member
0 Kudos

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:

Field1Field2
AA
BC
CE
EG
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

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Inaki,

thanks for your replay. I fixed the issue by using an UDF (just as you said).

best,

Hamed

Answers (1)

Answers (1)

0 Kudos

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