cancel
Showing results for 
Search instead for 
Did you mean: 

Message split ABAP mapping

Former Member
0 Kudos

Hello everybody,

for a special mappging I use ABAP mapping -everything fine.

But I need to split the message with ABAP mapping.

Does anybody know if this is possible ?

In the ABAP-class I use the interface IF_MAPPING. This has as a result parameter the parameter RESULT Type XSTRING (no table).

It only works to add to XMLs in 1 XML string, but my result have to be 2 XML files.

Alternatively would it be an idea to use multi message mapping (graphical first) AND then ABAP-mapping for special mappings?

Thanks a lot,

Florian

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Florian,

for multimappings in coded mappings (xslt, java and abap mappings) you'll also create a single stream, but in this case, the stream may have the following format:

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

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

<ns0:Message1>

<b><enter your first message here></b>

</ns0:Message1>

<ns0:Message2>

<b><enter your second message here></b>

</ns0:Message2>

...

</ns0:Messages>

where <ns0:MessageX> tags refer to each different target message type.

In the case you have a 1:n split, you'll have only 1 message type, but may have several messages within it.

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

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

<ns0:Message1>

<b><My_message id=1></b>

...

<b></My_message></b>

<b><My_message id=2></b>

...

<b></My_message></b>

...

</ns0:Message1>

</ns0:Messages>

Also, remember that, when you define an interface mapping as multimapping (meaning, you set either source, target or both interfaces to multiple messages, your input stream will also contain the <ns0:Messages> and <ns0:MessageX> tags, so you need to treat them in your mapping program.

Regards,

Henrique.

Answers (4)

Answers (4)

former_member181999
Contributor
0 Kudos

it is good

Former Member
0 Kudos

hi friend

I am new to Abap mapping PLZ can any one helpme on sample abap mapping code

with TC

mail id :- viswanadh.xi@gmail.com

thank u

wishva

Former Member
0 Kudos

hello again,

thank you very much for your answer.

How can I create this two or more messages in ABAP-Coding (Tags </ns0:Message1> </ns0:Message2> etc.) ?

And how can I expand header with "encoding="UTF-8" ?

Do you have a coding sample in ABAP?

Thanks a lot,

Florian

henrique_pinto
Active Contributor
0 Kudos

The encoding in header ("encoding="UTF-8") is not strictly necessary, don't worry about it.

As for the abap coding, i'm sorry but I'm not an abap expert, so I can't help you further in this matter.

Regards,

Henrique.

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Florian,

Why cant you try using another mapping program which splits into two xml files..

i.e one Mapping program is your Abap Mapping and the other one is the one which splits into two xml(source coming from the map 1)

Then in interface mapping mention the mapping programs first Abap Mapping and next second one...

Thanks and regards,

sridhar