cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Mapping with Multiple Message Mappings

Former Member
0 Kudos

Hi My Scenario is

File to Idoc.( Multiple records to Multiple idocs )

Due to Complexity of Mapping I split the Mapping step into 2.

My Source System does not provide Namspace when they are sending XML Data.

When I try 2 mappings individually both Mappings works fine.

However when I try test using Interface Mapping target messages are not generated.

Since 2nd Mapping invoves Mapping Split its expecting extra tags as shown here in the Targert Message generated from Message Mapping 1.

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

<ns0:Message1></i>

How can I solve this problem ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

While executing the scenario these extra tags are not needed(should not be present indeed). In test tab it might produce some problem. Try executing our scenario, i think it might work properly.

Regards,

P.Venkat

Former Member
0 Kudos

> Hi,

>

> While executing the scenario these extra tags are not

> needed(should not be present indeed). In test tab it

> might produce some problem. Try executing our

> scenario, i think it might work properly.

>

Hi I checked correctness of Cardinality of Source and target Messages. otherwise I cant activate it right ?..

As I said If I test these 2 mappings individually using Message Mapping Test tab they work fine.

However if I use Interface test tab its not producing target messages

Also,

using Message Mapping test Tab I produced Target Message for Message Mapping 1. Then I took the result Source and paste onto Source Message for 2nd message Mapping ( in Message mapping test tab and not Interface mapping ) then also its not producing Target Messages.

With this I'm suspecting the first message is not producing the target message 2nd Mapping is expecting. I checked Cardinalities and they looks fine.

prabhu_s2
Active Contributor
0 Kudos

<i>using Message Mapping test Tab I produced Target Message for Message Mapping 1. Then I took the result Source and paste onto Source Message for 2nd message Mapping ( in Message mapping test tab and not Interface mapping ) then also its not producing Target Messages.

With this I'm suspecting the first message is not producing the target message 2nd Mapping is expecting</i>

are u using two mapping prgms? the result of the first mapping prgm being the source of input for the second?

if this is the case can u post the strucutre of what is used and what is expected?

Former Member
0 Kudos

Hi Ram,

In Interface Mapping the target message type of the first mapping should be same as the source message type of the second mapping. Nothing else is needed. I think there shouldn't be any problem activating this.

Have u tried activating it? If there is some error in activating post it here.

Regards,

P.Venkat

Former Member
0 Kudos

HI,

With this , i understand you are trying to get the result,by executing the first mapping and this result to next mapping right?

Are you checkin IM or not.. there di dyou added these to mappings in your Bottom portion of IM..?

Please calrify..

Regards

Chilla..

Former Member
0 Kudos

yes I did.

in IM

Source Target

A ---> C

at the Bottom there are 2 mapping Programs

A---Mapping1 / Mapping 2 -


>C

prabhu_s2
Active Contributor
0 Kudos

maybe u need to check with the namespace

Former Member
0 Kudos

Hi,

Can i have the imput XML format,

And in you IM,

A--maping1 -- firsttarget

firsttarget - mapping 2 -- final taget.

see the below links

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

Regards

Chilla..

Former Member
0 Kudos

Hi My Input XML does not have Namespace where as Target Message of !st Message Mapping has Name Space associated with it. And Target messages for 2nd Mapping are Idocs. Do you see a problem here ?

prabhu_s2
Active Contributor
0 Kudos

okie.....in this case when u test the mappings separately what u observe WRT to namespace?

Former Member
0 Kudos

on Source Message I donot have control.. so Source message comes into XI without Namespace.. only XML Data

in My first mapping I am mapping this Source to Intermediate target message ( This has Namespace)

When I test message mapping its fine here..

Target of above message mapping is source to 2nd Mapping

When I test standalone testing 2nd mapping it generates target messages

However when I cut target message generated source ( from the first mapping ) onto 2nd Mapping source It wont generate 2nd Mapping Target messages.

So Iam suspecting that target generated out of first mapping is incompatible for 2nd mapping . Iam using Target of firt as source of 2nd mapping ( checked and activate objects ).

prabhu_s2
Active Contributor
0 Kudos

when u cut copy paste the payload of the target message1 into the source of the second message mapping, instead of the xml part (payload) check the graphical part of the mapping to see if the source structure is formed well.

Former Member
0 Kudos

Graphical Part has all nodes in red color.

Former Member
0 Kudos

Hi,

I agree with you,

As you said first mesage does not have namespace ..., i would like to know, how you have taken the message1.

becoz,please import int uner external deff, and add your namespace also.

Try to do it ..

Regards

Chilla..

prabhu_s2
Active Contributor
0 Kudos

okie can u post the payload of the target (maaping1) and structure of the target2...i think the strucutre is not framed well

Former Member
0 Kudos

When I do Message Mapping:

From message Mapping 1 target Produced is as follows:

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

<ns0:CostMaintenanceXI xmlns:ns0="http://test.xxx.com">

<CostMaintenanceXI>

<CostMaintenanceXI>

<Product>000000000000000023</Product>

<Plant>1401</Plant>

<Supplier>0000000001</Supplier>

<ValidityFrom>20021212</ValidityFrom>

<DIIndicator>ZFOB</DIIndicator>

<COGAmount></COGAmount>

<COGCurrency></COGCurrency>

<FreightAmount></FreightAmount>

<FreightCurrency></FreightCurrency>

<MISCAmount></MISCAmount>

<MISCCurrency></MISCCurrency>

<SPAAmount></SPAAmount>

<SPACurrency></SPACurrency>

<LandedCaseCost></LandedCaseCost>

<LandedCaseCurrency></LandedCaseCurrency>

<FrontLinePrice></FrontLinePrice>

<FrontLinePriceCurrency></FrontLinePriceCurrency>

</CostMaintenanceXI>

</CostMaintenanceXI>

</ns0:CostMaintenanceXI>

-


in 2nd Mapping I entered some details in the test tab and the generated source is as follows:

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

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

<ns0:Message1>

<ns1:CostMaintenanceXI xmlns:ns1="http://test.xxx.com">

<CostMaintenanceXI>

<CostMaintenanceXI>

<Product>1</Product>

<Plant>1</Plant>

<Supplier>2</Supplier>

<ValidityFrom>12212122</ValidityFrom>

<FOBIndicator/>

<DIIndicator>ZFOD</DIIndicator>

<COGAmount>10</COGAmount>

<COGCurrency/>

<FreightAmount>10</FreightAmount>

<FreightCurrency/>

<MISCAmount>10</MISCAmount>

<MISCCurrency/>

<SPAAmount>10</SPAAmount>

<SPACurrency/>

<LandedCaseCost/>

<LandedCaseCurrency/>

<FrontLinePrice/>

<FrontLinePriceCurrency/>

</CostMaintenanceXI>

</CostMaintenanceXI>

</ns1:CostMaintenanceXI>

</ns0:Message1>

</ns0:Messages>

-


As you can see both of the above structures differs in xmlns. I dont see anything else weird.

Former Member
0 Kudos

Hi,

Remove namespace second msg and try to test.

Regards

Chilla..

prabhu_s2
Active Contributor
0 Kudos

what abt <FOBIndicator/> in the second MM. can you check the below xml payload for testing the MM-2.

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

<ns1:CostMaintenanceXI xmlns:ns1="http://test.xxx.com">

<CostMaintenanceXI>

<CostMaintenanceXI>

<Product>000000000000000023</Product>

<Plant>1401</Plant>

<Supplier>0000000001</Supplier>

<ValidityFrom>20021212</ValidityFrom>

<FOBIndicator/>

<DIIndicator>ZFOB</DIIndicator>

<COGAmount></COGAmount>

<COGCurrency></COGCurrency>

<FreightAmount></FreightAmount>

<FreightCurrency></FreightCurrency>

<MISCAmount></MISCAmount>

<MISCCurrency></MISCCurrency>

<SPAAmount></SPAAmount>

<SPACurrency></SPACurrency>

<LandedCaseCost></LandedCaseCost>

<LandedCaseCurrency></LandedCaseCurrency>

<FrontLinePrice></FrontLinePrice>

<FrontLinePriceCurrency></FrontLinePriceCurrency>

</CostMaintenanceXI>

</CostMaintenanceXI>

</ns0:CostMaintenanceXI>

if this is not working fine replace <ns1:CostMaintenanceXI xmlns:ns1="http://test.xxx.com">

with <ns0:CostMaintenanceXI xmlns:ns0="http://test.xxx.com">.

Keep posted on the proceeding.

Former Member
0 Kudos

FOBINdicator is not mandatory element.

Also I can not change ns1 to ns0 or vice versa.. How can we do that during run time?

prabhu_s2
Active Contributor
0 Kudos

ignore change ns1 to ns0 or vice versa and check with the payload. is it working fine?

Former Member
0 Kudos

> ignore change ns1 to ns0 or vice versa and check with

> the payload. is it working fine?

Hi Changing ns1 to ns0 in the 2nd mapping didnt worked. any ideas ?

Former Member
0 Kudos

Hi,

try

<ns0:CostMaintenanceXI xmlns:ns0="http://test.xxx.com">

<CostMaintenanceXI>

<CostMaintenanceXI>

<Product>000000000000000023</Product>

<Plant>1401</Plant>

<Supplier>0000000001</Supplier>

<ValidityFrom>20021212</ValidityFrom>

<DIIndicator>ZFOB</DIIndicator>

<COGAmount></COGAmount>

<COGCurrency></COGCurrency>

<FreightAmount></FreightAmount>

<FreightCurrency></FreightCurrency>

<MISCAmount></MISCAmount>

<MISCCurrency></MISCCurrency>

<SPAAmount></SPAAmount>

<SPACurrency></SPACurrency>

<LandedCaseCost></LandedCaseCost>

<LandedCaseCurrency></LandedCaseCurrency>

<FrontLinePrice></FrontLinePrice>

<FrontLinePriceCurrency></FrontLinePriceCurrency>

</CostMaintenanceXI>

</CostMaintenanceXI>

</ns0:CostMaintenanceXI>

-


in 2nd Mapping I entered some details in the test tab and the generated source is as follows:

<ns1:CostMaintenanceXI xmlns:ns1="http://test.xxx.com">

<CostMaintenanceXI>

<CostMaintenanceXI>

<Product>1</Product>

<Plant>1</Plant>

<Supplier>2</Supplier>

<ValidityFrom>12212122</ValidityFrom>

<FOBIndicator/>

<DIIndicator>ZFOD</DIIndicator>

<COGAmount>10</COGAmount>

<COGCurrency/>

<FreightAmount>10</FreightAmount>

<FreightCurrency/>

<MISCAmount>10</MISCAmount>

<MISCCurrency/>

<SPAAmount>10</SPAAmount>

<SPACurrency/>

<LandedCaseCost/>

<LandedCaseCurrency/>

<FrontLinePrice/>

<FrontLinePriceCurrency/>

</CostMaintenanceXI>

</CostMaintenanceXI>

</ns1:CostMaintenanceXI>

Regards

Chilla..

prabhu_s2
Active Contributor
0 Kudos

ram

have you tried with 1:N mapping? In the <b>messages</b> tab of the MM specify the source structure in the <b>source messages</b> and specify both the target structures under <b>target message</b> in MM. with this do the mapping and check

prabhu_s2
Active Contributor
0 Kudos

Have you changed the cardinality fo the target message in interface mapping aslike the message mapping?.