cancel
Showing results for 
Search instead for 
Did you mean: 

Multimapping issue

Former Member
0 Kudos

Hi Experts,

Scenario : SOAP -> XI -> RFC

Source side : One message

Target side : Two RFCs

Depends on..one of the source field value I have to trigger the particular RFC.

IR Objects

-


1. Interface mapping - 1

Source message interface occurance - 1

Target RFCs 0 to Unbounded occurance

Mapping

1. XSLT Step1 - Source rootnode contains namespace. To remove that I have used the XSLT mapping.

CODE:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:template match="*">
		<xsl:element name="{local-name()}">
			<xsl:apply-templates select="@* | node()"/>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet>

2. XSLT Step2 - To add the Message tags in the starting for multimapping.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
			<ns0:Message1>
				<xsl:apply-templates/>
			</ns0:Message1>
		</ns0:Messages>
	</xsl:template>
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>

3. Graphical - Multimapping

ID objects

-


Interface determination - Selected the option enhanced. remaining all similar to normal interface.

Able to get the required results from MM and IM testing, but not from ID Test Configuration and runtime workbench.

(For IM testing : I have used the acutal payload)

Getting the below error from runtime workbench.

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

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">GENERIC</SAP:Code>

<SAP:P1>Split mapping created no messages</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Split mapping created no messages</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Could you please tell me how to resolve the issue.

Edited by: Sundari David on Nov 29, 2011 11:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the source XML message you may find some extra tags being included.

Just remove those extra tags, then it will work fine.

For example:

If your source XML message is:

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

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

<ns0:Message1>

<ns1:MT_FileToFile_MultiMap_Src xmlns:ns1="http://FileToFile/MultiMap">

<Input>

<Name>ab</Name>

<EmpId>123</EmpId>

</Input>

</ns1:MT_FileToFile_MultiMap_Src>

</ns0:Message1>

</ns0:Messages>

remove the extra tags and then it will look like:

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

<ns0:MT_FileToFile_MultiMap_Src xmlns:ns0="http://FileToFile/MultiMap">

<Input>

<Name>ab</Name>

<EmpId>123</EmpId>

</Input>

</ns0:MT_FileToFile_MultiMap_Src>

please go through below thread,

i hope this will help you,

regards,

ganesh.

Edited by: ganesh.nijampudi on Nov 29, 2011 12:02 PM

Former Member
0 Kudos

Hi Ganesh,

Thanks for the quick reply.

To remove the Message tags, first I have removed the XSLT - Step2 mapping and then I have tested it thro' MM, IM, ID Test configuration and runtime workbench.

In MM and IM the required target structure is not created and in ID and runtime workbench getting the same error.

Former Member
0 Kudos

Hi,

if you are going with the option of mapping based message split with you XSLT mapping , you need to include Message and MessageN tags as the top nodes in your target msgs.

The problem is the Target XML that is produced contains the namespace

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

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

<ns0:Message1>

</ns0:Message1

u2026

This needs to be removed.

Use this XSLT as post processing after the main message mapping. Save this code as XSLT, zip and then import as external archive and then add this as last step in interface mapping.

Let me know how it goes - it will fix your namespace issue not sure if you'll have problems with the result it produces.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="no"/>

<xsl:template match="/|comment()|processing-instruction()">

<xsl:copy>

<xsl:apply-templates/>

</xsl:copy>

</xsl:template>

<xsl:template match="*">

<xsl:element name="{local-name()}">

<xsl:apply-templates select="@*|node()"/>

</xsl:element>

</xsl:template>

<xsl:template match="@*">

<xsl:attribute name="{local-name()}">

<xsl:value-of select="."/>

</xsl:attribute>

</xsl:template>

</xsl:stylesheet>

i hope it will helpful.

regards,

ganesh.

Former Member
0 Kudos

Hi Ganesh,

As per your suggestion, I have added one more XSLT to remove the target namespace..but still getting the same error from runtime workbench.

Getting the below successful result from IM

<?xml version="1.0" encoding="UTF-8"?>
<Messages>
	<Message1>
		<ZMM_IBX_RFC_POST_CABIN_GR>
			<GOODSMVT_CODE>
				<GM_CODE>01</GM_CODE>
			</GOODSMVT_CODE>
			<GOODSMVT_HEADER>
				<HEADER_TXT>0100000237</HEADER_TXT>
			</GOODSMVT_HEADER>
			<TESTRUN> </TESTRUN>
			<GOODSMVT_ITEM>
				<item>
					<MOVE_TYPE>101</MOVE_TYPE>
					<ENTRY_QNT>1.0</ENTRY_QNT>
					<ENTRY_UOM>EA</ENTRY_UOM>
					<ENTRY_UOM_ISO>EA</ENTRY_UOM_ISO>
					<PO_ITEM>00001</PO_ITEM>
				</item>
			</GOODSMVT_ITEM>
			<RETURN/>
		</ZMM_IBX_RFC_POST_CABIN_GR>
	</Message1>
	<Message2/>
</Messages>

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

> Depends on..one of the source field value I have to trigger the particular RFC.

Do you want to trigger both RFC at one time or only one RFC will be triggered at a time?

If it is only one RFC that gets triggered, then use XPATH conditions in your interface determination.

Former Member
0 Kudos

Hi Shabarish,

I have to trigger only one RFC at a time.

The scenario works fine till MM and IM level, but not from ID and runtime workbench using multimapping approach.

My first approach was using conditions(Xpath condtions) in Interface Determination, but it was not successful due to rootnode namespace issue.

The Source SOAP xml contains namespace in the rootnode.First I have to remove the namespace from the rootnode and I have to proceed with the condition check in Interface Determination.I am not sure how to do that. If you have idea, please let me know.

If I pass the rootnode without namespace then my Interface Determination conditon approach works fine.

Due to the rootnode issue,now I have moved to multimapping.

Please share your inputs.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Since interface determination step happens before your mappng , you have this issue.

You can use simple xslt mapping to remove the root node and specify this mapping is the first one even before message mapping in the operation mapping. you might want to check below blog...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Former Member
0 Kudos

Hi Experts,

The issue with the mapping.

Depends on the source field value, I have to create the Target RFCs

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> <GoodsReceipt xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SOAP-ENC='http://www.w3.org/2003/05/soap-encoding'>
  <GoodsReceiptHeader>
    <GoodsReceiptID>0100000237</GoodsReceiptID>
    <GoodsReceiptIssueDate>20111124T15:13:16+02:00</GoodsReceiptIssueDate>
    <GoodsReceiptPurpose>
      <Purpose>
        <PurposeCoded>Original</PurposeCoded>
      </Purpose>
    </GoodsReceiptPurpose>
    <GoodsReceiptTypeCoded>AuthorizedRepresentativeInReceipt</GoodsReceiptTypeCoded>
    <ListOfGoodsCondition>
      <GoodsCondition>

If the PurposeCoded = 'Original' then I have to trigger the first RFC.

If the PurposeCoded ='Cancel' then I have to trigger the second RFC.

Earlier I have used the below condition.

PurposeCoded -> equals = Original -> creatIf -> Target RFCs rootnode. This is not working. Instead of CreatIf tried with IfsWithoutElse too.

Could you please tell me what condition, I have to use here.

Former Member
0 Kudos

Hi,

try below mapping logic it should work,

In the signature tab change the occurrence of target message to 0...unbounded and follow the below logic which will result in messages that consists of 2 lines each.

divide->ceil->splitbyvaluechange>collapsecontext>Mt_Target

formatByExample-->TargetLine

FormatByExample:

input1>SourceLineremovecontext

input2>divide>ceil-->splitByValueChange

divide:

input1-SourceLine->index(1,1)

input2--constant(2)

please go through below blog, in blog clearly mentioned how to do multi mapping with standard function,

regards,

ganesh.

Former Member
0 Kudos

Hi,

I couldn't understand much from your previous comments..

I have to map the below

Source field

/ns0:Messages/ns0:Message1/GoodsReceipt/GoodsReceiptHeader/GoodsReceiptPurpose/Purpose/PurposeCoded

Target RFC root node

/ns0:Messages/ns0:Message1/ns1:ZMM_IBX_RFC_POST_CABIN_GR

Could you please tell me how to map it.

Former Member
0 Kudos

Hi All,

I have followed the below link and the scenario works fine from the runtime workbench..but not from the SOAP UI.

http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

Please update me, if you have any solution.

Former Member
0 Kudos

Hi, did you do a search for split message created messages rfc on SDN Process Integration forum? It returns over 40 resolved threads. I bet you will find your answer there.

Regards, Martin

Former Member
0 Kudos

Hi Sundari,

I think you dont need the 2nd XSLT mapping.

When we test in OM or MM that time we need to the extra tags

...<ns0:Messages > and <ns0:Messages1>

But if you see the actual Paylod , you will not find these tags.

Just give it a try.

Former Member
0 Kudos

Hi Biplab,

Removed the 2nd XSLT and tested with the same payload, but getting the same error.