cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to JDBC multimapping N:1

Former Member
0 Kudos

Hello,

I've the follow:

IDOC

segA

belnr = 1

segB

belnr = 2

segC

It's possible the segB is repeat (this is the problem):

IDOC

segA

belnr = 1

segB

belnr = 2

segB

belnr = 1

segC

The target is:

field1

field2

...

fieldN

the field2 value is

empty (if segA belnr <> segB belnr) or belnr (if segA belnr = segB belnr)

The problem is when come two segB, In this case the value of field2 must be belnr when segA belnr <> segB (first) belnr or

segA belnr <> segB (second) belnr

How can i do this?

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

If i do this in the message mapping the problem is the follow:

- if first segB have different BELNR to segA -> the target field its ok, the BELNR segA

-but now, second segB have = BELNR to seg A -> the target field it's empty and it is not correct

The value of target field must be BELNR

Former Member
0 Kudos

Hi,

This can be achieved very easily using a UDF (queue function). Just have the belnr fields of both Seg A and B as input and check for equal value.

Can also be done using the EqualString and If function of PI.

Regards,

Shiladitya

Former Member
0 Kudos

Hi,

Even though Segments of idoc gets repeated the exact data can be retrieved based on the qualifier..

for e.g. E1EDK02 of Orders idoc contains BELNR and qualifier 001(purchase order) and 009 (Invoice number)

so based on qualifiers data can be retrieved from segements...if occur multiple times

HTH

Rajesh

rajasekhar_reddy14
Active Contributor
0 Kudos

This is not N:1 scenario,mapping logic will help to aceiev your requirement.

first you have to write logic for access tag to filter condition,then map all fields.

Regards,

Raj