cancel
Showing results for 
Search instead for 
Did you mean: 

use message mapping to create multiple idoc segments from a single message

former_member271795
Participant
0 Kudos

Hi

I have an incoming message, occurs 1 this is being mapped to IDOC FIDCC1.FIDCCP01 which is the FI document input

as part of the idoc I need 2 entries for segment E1FISEG , its part of the double entry bookkeeping

How do I creat these 2 segments from a single incoming message

I've been having a look at the node functions but cannot find what I need

thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member271795
Participant
0 Kudos

thanks for the quick reply

I'm not sure that the useoneasmany node function can be used in this instance

my source file is

mt_refund occurances 1

module 0.1

acc_ref 0.1

amount 0.1

My target message is IDOC FIDCCP01

EF1KPF occurances 1

E1FISEG 0...999

E1FISEC 0...999

What I want to do is for each occurance of the source entry mt_refund-module

create two segments E1FISEG

the useoneasmany function requires input as to the howmany entries need to be created from the source message, in thiscase there is only 1 entry

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

>>> I want to do is for each occurance of the source entry mt_refund-module create two segments E1FISEG

Since the maximum occurrence of the element 'module' is 1, you'll get only 2 E1FISEG segments each and everytime. I'm I right? If so, then you can achieve it with a simple UDF...

for(int i=0;i<var1.length;i++){

result.addValue("Value1");

result.addValue("value2");

}

Regards

Priyanka

Answers (2)

Answers (2)

former_member271795
Participant
0 Kudos

Thanks thats exactly what I need

but having created two segments

how would I refer to the 1st segment and the 2nd segment when doing the mapping ?

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Try with useOneAsMany node function to repeat the source element that occurs only once in the source structure multiple times in the target. Please post your source and expected target structure for further help.

Regards,

Priyanka