cancel
Showing results for 
Search instead for 
Did you mean: 

Complex Message Split

Former Member
0 Kudos

Hi,

We have an interface from JDBC to IDOC. Based on the content of the JDBC Results the data has to be mapped to the IDOC in up to 11 different way, ie:

if Action == 1

     Map "field A" with constant "111"

     Map "field B" with constant "222"

     Map "field C" with data from sourceField1

If Action == 2

     Map "field A" with constant "444"

     Map "field B" with constant "555"

     Map "field C" with data from sourceField7

...

and so on for 11 different variations.

Can people recommend a nice way of doing this? The options I can see are either split the interface into 11 different Message mappings in the "Interface Determination" or else have very complex if/else mappings on each field.

Any help greatly appreciated.

Gareth

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Gareth,

just use fix values function. Here you can link action to field value meaning:

Action vs field A

Action vs field B

Should reduce complexity.

Cheers

Andreas

nabendu_sen
Active Contributor
0 Kudos

Hi Gareth,

Have you already tried Multimapping and facing any specific performance issue just like mentioned in the blog. If its creating Performance issue then may be you can use Java UDF and compare the processing times.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

former_member201264
Active Contributor
0 Kudos

Hi Gareth,

Could you please elaborate about the actions (What is this Action from Sender JDBC Result).

Is this number 11 fixed or subject to change?

Regards.

Sreeni.

Former Member
0 Kudos

Hi Sreeni,

Action is a field in the source data. So depending on the content of the source data the destination IDOC can be populated in 11 different ways. For one variation of Action some segments are created and some fields mapped with certain Constants. For a different variation different segments are needed with different constants mapped.

The number of possible variations is fixed.

Thanks.

rajasekhar_reddy14
Active Contributor
0 Kudos

If you have complex mapping logic in JDBC to IDoc mapping then achieving scenarion with one mapping not a right idea because you have to qrite condition check for each and every segment(if you need pass different value based on action).

This case develop 11 different mappings and write a condition in Interface determination.

or

if you use one message mapping then you have to write condition validation to satify all conditions, use generic UDf to validate a condition,insted of using mutliple standard functions.

Regards,

Raj

former_member201264
Active Contributor
0 Kudos

Hi Gareth,

Suppose, you have 11 actions in source, then, do you need 11 IDOCs with suitable data?

OR one IDOC with by including the suitable data?

If you need One IDOC, then you can use UDF or Graphical Mapping Node Functions and do it.

Regards,

Sreeni.