cancel
Showing results for 
Search instead for 
Did you mean: 

Help on Message mapping

Former Member
0 Kudos

Hi Guys,

I would like to seek for your expertise.

I have the following source XML format:

For my target is IDOC message, :

Sample input file will be like

<OperatingCycles TimeCyclesRefCode="C">123</OperatingCycles>

<OperatingDays TimeCyclesRefCode="N">123456</OperatingDays>

<OperatingTime TimeCyclesRefCode="O">123456.12</OperatingTime>

There will be always three reference codes ,we need to always map one code to reference code

the target should be

YYOCG_CODE  = N

YYOCG_Days = 123456

YYOCG_CODE  = C

YYOCG_Cycles = 123

YYOCG_CODE  = O

YYOCG_Time = 123456.12

Please let me know how to achieve it using message mapping or UDF .

Thanks and Regards,

Sai

Accepted Solutions (0)

Answers (2)

Answers (2)

juan_vasquez2
Active Participant
0 Kudos

I think you need to evaluate cardinality of IDOC

YYOCG_CODE is 0..1, then you only can have 0 or 1 instances, no more than this.

It is possible to modify cardinality?

it is possible to have 3 instances?

Then you can see Praveen instruction, create more than 1 instance in target structure.

Former Member
0 Kudos

Hi Juan ,

I can create instances , but how can differentiate the reference code values to which code .

Like three nodes may come in different order .how can i segregate numeric values for their respective reference code .

former_member182412
Active Contributor
0 Kudos

HI

Repeat the target node using duplicate subtree by right click on the target node, you need to duplicate two times then you will get three nodes then you can map three reference codes to three target nodes.

Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen ,

Actually my requirement is like below

Sample input file

<OperatingCycles TimeCyclesRefCode="C">123</OperatingCycles>

<OperatingCycles TimeCyclesRefCode="N">1234</OperatingCycles>

<OperatingCycles TimeCyclesRefCode="O">12344</OperatingCycles>

<OperatingDays TimeCyclesRefCode="N">123456</OperatingDays>

<OperatingDays TimeCyclesRefCode="C">1234567</OperatingDays>

<OperatingTime TimeCyclesRefCode="O">123456.13</OperatingTime>

<OperatingTime TimeCyclesRefCode="C">123456.12</OperatingTime>

There will be always three reference codes ,we need to always map one code to reference code

the target should be

YYOCG_CODE  = N

YYOCG_Days = 123456

YYOCG_Cycles = 1234

YYOCG_CODE  = C

YYOCG_Cycles = 123

YYOCG_Days = 1234567

YYOCG_Time = 123456.12

YYOCG_CODE  = O

YYOCG_Time = 123456.13

YYOCG_Cycles = 12344

Please suggest.

Regards

Sai

former_member182412
Active Contributor
0 Kudos

Hi

You can do below mapping, i only done for code N, you can do for others in similar way.

Test:

Regards,

Praveen.