cancel
Showing results for 
Search instead for 
Did you mean: 

split message in files

Former Member
0 Kudos

This is my sender message Payload :

<?xml version="1.0" encoding="UTF-8"?>

<ns0:INOVIS_Sender xmlns:ns0="urn://Inovis.com">

<B>1</B>

<B>2</B>

<B>3</B>

</ns0:INOVIS_Sender>

This is my receiver message payload :

<?xml version="1.0" encoding="UTF-8"?>

<ns0:INOVIS_Receiver xmlns:ns0="urn://Inovis.com">

<C>1</C>

<C>2</C>

<C>3</C>

</ns0:INOVIS_Receiver>

How I can send the message of C in separate files at the occurance level,

for example in this example, I need to create 3 files at receiver side for each C Messages.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

You need to have one more mapping to split the 1 receiver payload to 3 Receiver payload.. i.e u have to use 1:N mapping...

Map the field C to the INOVIS_Receiver and also C in the new mapping.

Remember the target structure in the new mapping should have the occurance of field C a 1..1.

Thanks

SaNv...

Former Member
0 Kudos

from the blog :

I have created my scenario, but the output is coming in the same file,

Payload is as below :

<?xml version="1.0" encoding="UTF-8" ?>

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

- <ns0:Message1>

- <ns1:INOVIS_Receiver xmlns:ns1="urn://Inovis.com">

<C>00* 00 086123830000 129737787551</C>

</ns1:INOVIS_Receiver>

- <ns1:INOVIS_Receiver xmlns:ns1="urn://Inovis.com">

<C>00* 01 086123830000 129737787551</C>

</ns1:INOVIS_Receiver>

- <ns1:INOVIS_Receiver xmlns:ns1="urn://Inovis.com">

<C>00* 02 086123830000 129737787551</C>

</ns1:INOVIS_Receiver>

</ns0:Message1>

</ns0:Messages>

I need to create one file for one INOVIS_Receiver, How I can do this now ?

Where I am doing Mistake ? Please help,

Regards,

Study SAP

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Map the source field C to the root element in the target and also to the target subelement.

Mapping C to the root element will create the target structure as many times the occurance of source field C.

Thanks

SaNv...

Answers (6)

Answers (6)

former_member192295
Active Contributor
0 Kudos

Hi

Use field separator is space, you can get output as 3 columns.

Former Member
0 Kudos

Hi Nallam,

Where I can give this, in the message mapping or any Determination ?

Regards,

Study SAP

former_member192295
Active Contributor
0 Kudos

Hi

In source file adapter using fcc mechanise source.fieldseparator as space.

Automatically xi reconize each value as column and receiver side we can get 3 messages. SXMB_MONI we can see ur required structure

former_member190389
Active Contributor
0 Kudos

As far as my knowledge is concern...

You need to have the occurence of INOVIS tag 0.. unbounded in the target in message mapping as well as Interface mapping .

The C thing can be 0..1 ..

go to messages tab set the occurences.

Then you should use Enhanced Interface Determination in ID..

Hope your problem will be solved..

Edited by: Progirl Progirl on Jul 29, 2008 9:49 PM

Former Member
0 Kudos

when I am using enhanced receiver determination

getting error : No receiver could be determined.

I have created one receiver determination for INPUT --> Receiver det.

One Interface determination INPUT --> Output.

One sender agreement and One receiver agreement.

Is there any mistake ?

Please help,

Regards,

Study SAP

Former Member
0 Kudos

Thanks for reply,

Can any body give me complete idea to make separate file for one message, as for Xpath, I am not able to give any condition.

Regads,

Study SAP

prateek
Active Contributor
0 Kudos

Use multi-mapping without BPM.

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Regards,

Prateek

Former Member
0 Kudos

Hope u can make use of Enhanced Receiver Determination after splitting.

Refer these links

http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm

Illustration of Enhanced Receiver Determination - SP16

Former Member
0 Kudos

Hi,

Use the below UDF between the source and target node to split the source.

public void split(String[] a,ResultList result,Container container)

{

String arr[] = a[0].split(" ");

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

{

result.addValue(arr<i>);

}

}

Edited by: malini balasubramaniam on Jul 28, 2008 3:10 PM