cancel
Showing results for 
Search instead for 
Did you mean: 

How to Split messages to other messages using a value as a split-key?

Former Member
0 Kudos

Hi ,

Let's assume that the message is:

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

- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

- <XI>

- <item>

<BKTXT>O-244</BKTXT>

<LIFNR>999003</LIFNR>

</item>

- <item>

<BUKRS />

<BKTXT>O-244</BKTXT>

<LIFNR>999003</LIFNR>

</item>

- <item>

<BUKRS />

<BKTXT>O-245</BKTXT>

<LIFNR>999004</LIFNR>

</item>

- <item>

<BUKRS />

<BKTXT>O-245</BKTXT>

<LIFNR>999004</LIFNR>

</item>

- </XI>

</ns0:ZXI_IDOCFI_DOCUMENT

I would like to split it into two messages as the <BKTXT> element is changed(2 times

<BKTXT>O-244</BKTXT> and <BKTXT>O-245</BKTXT> .

The target messages must be

1)

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

- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

- <XI>

- <item>

<BKTXT>O-244</BKTXT>

<LIFNR>999003</LIFNR>

</item>

- <item>

<BUKRS />

<BKTXT>O-244</BKTXT>

<LIFNR>999003</LIFNR>

</item>

</XI>

</ns0:ZXI_IDOCFI_DOCUMENT

and 2)

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

- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

- <XI>

- <item>

<BUKRS />

<BKTXT>O-245</BKTXT>

<LIFNR>999004</LIFNR>

</item>

- <item>

<BUKRS />

<BKTXT>O-245</BKTXT>

<LIFNR>999004</LIFNR>

</item>

- </XI>

</ns0:ZXI_IDOCFI_DOCUMENT

How is it possible to be implemented ?

Is it possible to solved in BPM or in a Mapping program;

Thanks in advance.

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Your requirements can be solved using a user defined function in JAVA.

Try doing that.

Regards,

P.Venkataramanan

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm

if you access to service.sap.com/solutions

-> SAP Netweaver

-> SAP NetWeaver 2004 - Release-Specific Information

-> How to guide

-> Exchange infrastrcuture

here you can find how to guide for abap mapping. its gives a step by step description.

cheers,

naveen

Former Member
0 Kudos

Hi,

Based on ur requirements , you dont need BPM, as you need a multimapping message mapping. But there is a catch. you may have to do ur message mapping in Java or ABAP. You cannot achive ur requirements using the graphical message mapping tool.

cheers,

Naveen

Former Member
0 Kudos

Hi Nveen,

Your approach makes sense to me.

This is my first project about XI and i as you imagine there is not enough experience. I will do multimapping and i will let you know.

<i>Thank you very much.

Antonis.</i>

Former Member
0 Kudos

Hi,

Dont worry, XI Forum is a great forum. We will help you out.

let me know if you wnat some documents on how to do abap mapping.

cheers,

Naveen

Former Member
0 Kudos

Hi Naveen,

Every relative abap document is welcome

Best Regards,

Former Member
Former Member
0 Kudos

Hi

antonis

as from your replies on this forum indicates that you want to use Abap mapping.

here are some useful artiles on ABAP mapping:

this article will give info on "how to use abap mapping in XI"

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0...

and for "How to guide Abap mapping in Xi"just go through this.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4...

i hope you have got required douments

Former Member
0 Kudos

Hi,

Check the following weblog, it really will help u...

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

Cheers,

Jeya Kumar

Former Member
0 Kudos

Dear Kumar ,

Thank for your nice blog ,

But Let me underline which is my point,

As XI retrieve rows through JDBC from an oracle table

at the end there is an XML message with N items

as:

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

- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

- <XI>

- <item>

<BKTXT>O-244</BKTXT>

<ACCOUNT>999003</ACCOUNT>

</item>

- <item>

<BKTXT>O-244</BKTXT>

<ACCOUNT>999004</ACCOUNT>

</item>

- <item>

<BUKRS />

<BKTXT>O-245</BKTXT>

<ACCOUNT>999006</ACCOUNT>

</item>

...N items...

- </XI>

</ns0:ZXI_IDOCFI_DOCUM

I have to break this xml into N xml messages according to element <BKTXT> in order to send them to Sap sequentially. Keep in mind that the <element> is just as the element <ACCOUNT>( is not a root element ).

I guess this is not an easy excercise but i need to solve it urgently.

Best Regards,

Antonis.

Message was edited by: antonis konstantindis