cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Adapter with file conversion Multimapping

Former Member
0 Kudos

Hello all,

i have to use multimapping with the file sender adapter

XML for multimapping ist like this

ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:KVNR_Senden_MT xmlns:ns1="urn:lsv.de/SENDER">

<Inhalt>

<KE/>

<VF/>

<BBNRAB/>

<BBNREP/>

<VERNR/>

<ED/>

<FEKZ/>

.............

in File adapter

DocumentName Messages

RecordsetName Inhalt

Recorset Struc Inhalt,20

Inhalt.fieldFixedLength 4,5,6.....

Inhalt.fieldNames KE,VF,.....

but were can I generate Message1?????

any Hints?

regards

ralf

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ralf,

Do not use Message or message1 in File content conversion. Just procced with your file content conversion paramters you would have used in normal mapping. These tags will be added dynamically by XI.

Regards,

Jai Shankar

Former Member
0 Kudos

sorry but the message tags will not be add dynamically

i have change an existing message mapping 1:1 with file content conversion

into a multimapping.

by changing into multimapping the message was surrounded with

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>.......

no changing in File Adapter an in the IE there was an error

com.sap.aii.utilxi.misc.api.BaseRuntimeException geworfen: RuntimeException in Message-Mapping transformatio~.

if i added the stuct

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>.......

by hand and it works???

so i think i had to add

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>.......

to the file content conversion but i don't know how to do it???

Ralf

Former Member
0 Kudos

Ralf,

you need mutimapping in Traget side not in side sider then it will work otherwise if you message1 in sender side i.e. multi mapping it becomes N:M mapping which you need use BPM with out BPM ucant use this feautre

Regards

Sreeram.G.Reddy

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

>i]sorry bt the message tags will not be add dynamically</i>

They are added Dynamically. You do not have to worry about it.

Just make sure that the Message After Contnet Conversion confirms to the format expetctred by your Source Datatype. You need not add the MESSAGES Tag etc.

When the runtime encounters a multi mapping , it itself will encapsulated yoyur messgae with the MESSAGES tag etc.

Just make sure that your message mapping for the multi mapping has been done correct.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh Kantilal ,

i have <b>modify my 1:1 message mapping into an 1:n mapping </b>

and now i have

<i> one Source Message Type</i>

<i> n number of Message Types for Target side</i>

<i> a Message Mapping with 1 message in the Source side and N(2) number of messages in the Target side.</i>

in the Interface mapping my target Interface have "N number of Message Interfaces" for each N message Types.

i think this is ok!!

If i change to an 1:1 mapping all work fine!

So were is my fault??

Former Member
0 Kudos

Ralf,

>>i have modify my 1:1 message mapping into an 1:n mapping

This is called multi mapping. For a multi mapping scenario, you <b>need not</b> change the File content Conversion paramaters/ data types.

The changes will be made by XI dynamically. You need not worry about that.

This is perfectly ok.

Regards,

Jai Shankar

Former Member
0 Kudos

Hi,

in the IE i get the following error.

  <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_KVNR_File_2_KVNR_File_</Trace> 
  <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:406) at 

In IE in the Message Payload there is no Message / Message1

wen i test the message payload from IE in design message mapping

all is red!

Former Member
0 Kudos

Ralf,

This is a mapping issue. Kindly recheck the mapping. Do you get the Inbound payload as expected after file conversion? Does it confirm to the data type you created in IR?

Another thing what are you mapping to Message1 node?

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

Ralf,

After making the mapping as 1:N mapping, you will need to make a change in your Interface determination.

In your Interface determination select the option Enhanced / Extended and then select the Inbound Interface and your interface mapping and then execute your scenario without the <MESSAGES> in your source . It should work.

Regards

Bhavesh

Former Member
0 Kudos

@ Bhavesh Kantilal

thanks

i forgot to change the interface determination!

regards

ralf

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Ralf,

if you use an XSLT mapping, you dont have to care about the types. Just create the result as you ve described. For the data types a dummy with only 1 field is enough.

Regards,

Udo

Former Member
0 Kudos

Hi Ralf,

dont worry about messge 1....

just make your normal XML msg data type and for it an msg interface.....

then in msg mapping, when you will go to messages tab and change its occurance to 0..unbounded, then automatically this message 1 will come for your source msg.

Thanks,

Rajeev Gupta