cancel
Showing results for 
Search instead for 
Did you mean: 

Depending on value mapping to specific file

Former Member
0 Kudos

Hi, well my Scneario is IDoc to File and i have no clue how to achive this:

we get an IDoc with different fields and one of this is field "No" which can have the value 1,2,3

Depending on these values the message should be split and collect all the data-fields wherein the No = 1 or 2 or 3.

After this, the so divided messages should be written in different files.

Can someone tell me how to achive this?!

br

Source looks like:

<ZBC0 SEGMENT="1">

<No>1</No>

<TYPE>1B20-6</TYPE>

<SPEC>152J</SPEC>

</ZBC21>

- <ZBC0 SEGMENT="1">

<No>2</No>

<TYPE>1B20-6</TYPE>

<SPEC>152J</SPEC>

</ZBC21>

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Your question is not clear, tell me what exactly you want in target.

regards,

Ravi Siddam

Former Member
0 Kudos

Hi, well the mapping is not properly working!

I map from field "No" to field MT_TYP with SplitByValue

Occurance is changed in Messages-Tab to 0...unbounded.

<MT_TYP> has therefore occurance of 0...unbounded and

<TYPDetailsStruc> has 1..unbounded.

<MT_TYP>

<TYPRecordSet>

<TYPDetailsStruc>

<No>1</No>

<FELD1/>

<FELD2/>

</TYPRecordSet>

</TYPDetailsStruc>

<TYPRecordSet>

<TYPDetailsStruc>

<No>2</No>

<FELD1/>

<FELD2/>

</TYPRecordSet>

</TYPDetailsStruc>

</MT_TYPSCH>

when i have to instances of the IDoc ZBC21 and No is 1 for the first and 2 for the second i only get the first instance mapped.

When someone could provide me with some infos on this!?

I could also send the MTR for testing purposes...?!

thx in advance

Former Member
0 Kudos

someone - please?!

former_member192295
Active Contributor
0 Kudos

Hi,

Receiver structure put occurence 1..1, automtically each record will be created as a file

Former Member
0 Kudos

Hi, well this is possible yes.

But perhaps i don't make the requirements clear - sorry.

For each occurance of "No" the source message should be stored an all items with No=1 should appear in one file! so for each occurance of 1,2 and 3 a file will be created with the collection of all items depending on value in field "No"!

Can you help?!

br

Former Member
0 Kudos

hi,

Its possible If your using message split in message mapping.

Go to Message Mapping.

Select Message Tag.

Change the Target Message Occurrence 0-Unbounded.

In Mapping Map the Header Node of the Target according to your No field.

Choose Interface Mapping.

Change the Target Message Occurrence 0-Unbounded.

In Integration Directory ,

Interface Detarmination Choose Extented.

Get Your mapping.

In Receiver File Adapter choose add time stamp or counter.

It will create multiple output files according to No field.

*Reward Points If Useful*

Regards,

Prakasu