cancel
Showing results for 
Search instead for 
Did you mean: 

MATMAS mapping transformation error

Former Member
0 Kudos

Scenario: IDOC to File

Idoc is sent successfully. But in SXMB_MONI am getting this error: RuntimeException in Message-Mapping transformatio

How can I rectify that.

Thanks

Kiran

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Siva,

this error is coming because of your mandatory occurance of the receiver elements.

ie : on source side you might be having 0-1 and on target side 1-1. In this situation mapping is mandatory for all the fields.

You will get no erroe if you pass data into all the fields.

The alternative for this is pass data externally as null.

You can use exits node function and check whether the field exists in the payload and then pass null value if it won't exits.

This will solve your problem.

You have to use EXIST node function and IF condition.

Pass field to if via exist and again field to then and pass null to the else .

Regards,

Jeevan

Edited by: jeevan on Mar 25, 2008 1:47 PM

Former Member
0 Kudos

hai

check the message mapping thru test tab

check whether control records of the idoc are handled properly are not

check whether mandatory segments are mapped properly....

check the below link for trouble shooting ALE scenario if still the problem persists

/people/raja.thangamani/blog/2007/07/19/troubleshooting-of-ale-process

note:reward points if solution found helpfull.....

regards

chandrakanth.k

Former Member
0 Kudos

Do I need to handle control records. this is IDOC to File scenario!!!!

thanks

Siva

Former Member
0 Kudos

Hi,

The way to take the inbound payload from moni

Goto SXMB_MONI--select your scenarioclick on inbound messagepayload-main doc-right click-download.

save it on desktop and take this payload and paste it in test tab of message mapping

Regards

Seshagiri

Former Member
0 Kudos

when i tested as u told, i got the below error:

Cannot produce target element /MATMAS05/IDOC/E1MARAM/ERSDA. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

please let me know what 2 do now.

awarded points 2 sarvesh and sheshagiri

thanks

siva

Former Member
0 Kudos

Hi,

Check the field ERSDA in the IDOC structure and check the value you are passing that is valid or not.

Check the mapping between the source and target of that field

Regards

Seshagiri

Former Member
0 Kudos

ERSDA is a date field and am not sending any value in this field.

should i fill and send this?

Former Member
0 Kudos

> when i tested as u told, i got the below error:

> Cannot produce target element /MATMAS05/IDOC/E1MARAM/ERSDA. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

>

> please let me know what 2 do now.

Ok, after getting the error, come to Design Tab and right click on your souce fiels "ERSDA" and select display queue. Check if you are having any value in it or not. You can debugg your mapping by this way and can resolve the problem.

If the above mentioed field is mapped to a mandotry target field then you must pass some value to it. Do your mapping according in case this fields comes as empty.

You can also enter the value in any field under test tab manually and then you can test it.

Regards,

Sarvesh

Former Member
0 Kudos

i mapped properly and passed that ersda value also. but the strange thing is ... am getting an error like:

<SAP:Stack>No receiver agreement found for sender -SNDCLNT100 to receiver -MDMERP6,urn:sap-com:document:sap:idoc:messages.MATMAS.MATMAS05</SAP:Stack>

why so?

thanks

siva

Former Member
0 Kudos

Have you created the correct Receiver agreement in ID?

Now it is not a mapping issue. Check the Receiver Agreement.

Former Member
0 Kudos

i created and just reactivated the receiver agreement and am getting back the same error...

SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_mm1_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

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

so i just checked the queue as suggested by you. i can see my values in the queue. so where am i still missing?

thanks

siva

justin_santhanam
Active Contributor
0 Kudos

Shiva,

It's related to cache issue. Can u see one - attached to the sender and receiver services? Just do SXI_CACHE - Full Cache refresh and if it doesn't helps then do the Full cache using URL.

raj.

Former Member
0 Kudos

Have you tested with the current payload values, if not take the current one coz now it is mapping error. Under test tab when you press the execute button just check the errors and send it to me.

You should check all mandatory target fields if all are having values in it. do this by same way as i mentioned in my previous reply.

Former Member
0 Kudos

guyz, i understood the exact problem. If I pass the data in all the fileds i mapped, then am getting a file successfully.

But its not sure that all fields of idoc is filled all the time. so i have to check some condition like if exists or some thing like that. let me know the exact function which needs to be used.

thanks

siva

Edited by: shiva g on Mar 25, 2008 11:39 AM

justin_santhanam
Active Contributor
0 Kudos

Shiva,

Try to use MapWithDefault function in the places where the occurrence of the source is 0..1 (i.e not mandatory elements). Again it depends on your reqmt, whether u need all the value or not.

raj.

Former Member
0 Kudos

raj,

my source side occurence is o..1

and destination side is 1..1.

may be the problem is coming up just because of this.

so if i can manage to change the occurence of destination side for file structure i guess i donn need 2 use any functions. if there is a value it will be passed and else no.

am i right?

plz correct me.

thanks

siva

Former Member
0 Kudos

yes correct. But make sure before you made the changes in target occurrence.

Former Member
0 Kudos

my target structure is am external object.

so how can i change the occurence in that XSD?

justin_santhanam
Active Contributor
0 Kudos

Shiva,

Download the XSD to your local machine. Change the occurrences and upload them back again as External Definition.

raj.

Former Member
0 Kudos

raj, i have the xsd with me. plz guide me how can i change the occurence in XSD of a file

Former Member
0 Kudos

Hi,

in the xsd file you will be able to find the Min occurence and the max occurence of every field.

there u can change the min occurence = 0 as per ur requirement. And re-import the same as external def after you made necessary changes

Regards

Seshagiri

justin_santhanam
Active Contributor
0 Kudos

Shiva,

if you go to the field where u mentioned that it has occurrence 1..1, change the occurrence as 0..1 there, can u paste that particular line where it mentioned occurrence as 1..1, so that we can suggest.

raj.

Former Member
0 Kudos

below is my XSD which is imported into PI system.

Please advise now.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="ZEIVR">

<xs:complexType />

</xs:element>

<xs:element name="ZEINR">

<xs:complexType />

</xs:element>

<xs:element name="ZEIFO">

<xs:complexType />

</xs:element>

<xs:element name="ZEIAR">

<xs:complexType />

</xs:element>

<xs:element name="WRKST">

<xs:complexType />

</xs:element>

<xs:element name="WESCH">

<xs:complexType />

</xs:element>

<xs:element name="VPSTA">

<xs:complexType />

</xs:element>

<xs:element name="VOLTO">

<xs:complexType />

</xs:element>

<xs:element name="VHART">

<xs:complexType />

</xs:element>

<xs:element name="TEMPB">

<xs:complexType />

</xs:element>

<xs:element name="STOFF">

<xs:complexType />

</xs:element>

<xs:element name="STFAK">

<xs:complexType />

</xs:element>

<xs:element name="SPRAS_ISO">

<xs:complexType />

</xs:element>

<xs:element name="SPRAS">

<xs:complexType />

</xs:element>

<xs:element name="SLED_BBD">

<xs:complexType />

</xs:element>

<xs:element name="SERLV">

<xs:complexType />

</xs:element>

<xs:element name="SATNR">

<xs:complexType />

</xs:element>

<xs:element name="SAISO">

<xs:complexType />

</xs:element>

<xs:element name="RMATP">

<xs:complexType />

</xs:element>

<xs:element name="RDMHD">

<xs:complexType />

</xs:element>

<xs:element name="RBNRM">

<xs:complexType />

</xs:element>

<xs:element name="RAUBE">

<xs:complexType />

</xs:element>

<xs:element name="QMPUR">

<xs:complexType />

</xs:element>

<xs:element name="PRZUS">

<xs:complexType />

</xs:element>

<xs:element name="PRDHA">

<xs:complexType />

</xs:element>

<xs:element name="NORMT">

<xs:complexType />

</xs:element>

<xs:element name="MSTDV">

<xs:complexType />

</xs:element>

<xs:element name="MSTDE">

<xs:complexType />

</xs:element>

<xs:element name="MSTAV">

<xs:complexType />

</xs:element>

<xs:element name="MSTAE">

<xs:complexType />

</xs:element>

<xs:element name="MSGFN">

<xs:complexType />

</xs:element>

<xs:element name="MPROF">

<xs:complexType />

</xs:element>

<xs:element name="MHDRZ">

<xs:complexType />

</xs:element>

<xs:element name="MHDLP">

<xs:complexType />

</xs:element>

<xs:element name="MHDHB">

<xs:complexType />

</xs:element>

<xs:element name="MFRPN">

<xs:complexType />

</xs:element>

<xs:element name="MFRNR">

<xs:complexType />

</xs:element>

<xs:element name="MATNR">

<xs:complexType />

</xs:element>

<xs:element name="MATMAS05">

<xs:complexType>

<xs:sequence>

<xs:element ref="IDOC" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="MATFI">

<xs:complexType />

</xs:element>

<xs:element name="MAKTX">

<xs:complexType />

</xs:element>

<xs:element name="MAGRV">

<xs:complexType />

</xs:element>

<xs:element name="LVORM">

<xs:complexType />

</xs:element>

<xs:element name="LAEDA">

<xs:complexType />

</xs:element>

<xs:element name="KZKFG">

<xs:complexType />

</xs:element>

<xs:element name="KZEFF">

<xs:complexType />

</xs:element>

<xs:element name="KUNNR">

<xs:complexType />

</xs:element>

<xs:element name="IPRKZ">

<xs:complexType />

</xs:element>

<xs:element name="IDOC">

<xs:complexType>

<xs:sequence>

<xs:element ref="E1MARAM" maxOccurs="unbounded" />

</xs:sequence>

<xs:attribute name="BEGIN" use="required">

<xs:simpleType>

<xs:restriction base="xs:byte">

<xs:enumeration value="1" />

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

<xs:element name="GTIN_VARIANT">

<xs:complexType />

</xs:element>

<xs:element name="GEWTO_NEW">

<xs:complexType />

</xs:element>

<xs:element name="GEWTO">

<xs:complexType />

</xs:element>

<xs:element name="GENNR">

<xs:complexType />

</xs:element>

<xs:element name="FUELG">

<xs:complexType />

</xs:element>

<xs:element name="FORMT">

<xs:complexType />

</xs:element>

<xs:element name="ETIFO">

<xs:complexType />

</xs:element>

<xs:element name="ETIAR">

<xs:complexType />

</xs:element>

<xs:element name="ERSDA">

<xs:complexType />

</xs:element>

<xs:element name="ERNAM">

<xs:complexType />

</xs:element>

<xs:element name="ERGEW">

<xs:complexType />

</xs:element>

<xs:element name="ERGEI">

<xs:complexType />

</xs:element>

<xs:element name="EKWSL">

<xs:complexType />

</xs:element>

<xs:element name="E1MARAM">

<xs:complexType>

<xs:sequence>

<xs:element ref="MSGFN" />

<xs:element ref="MATNR" />

<xs:element ref="ERSDA" />

<xs:element ref="ERNAM" />

<xs:element ref="LAEDA" />

<xs:element ref="AENAM" />

<xs:element ref="LVORM" />

<xs:element ref="ZEINR" />

<xs:element ref="ZEIAR" />

<xs:element ref="ZEIVR" />

<xs:element ref="ZEIFO" />

<xs:element ref="AESZN" />

<xs:element ref="BLATT" />

<xs:element ref="BLANZ" />

<xs:element ref="FORMT" />

<xs:element ref="WRKST" />

<xs:element ref="NORMT" />

<xs:element ref="EKWSL" />

<xs:element ref="BEHVO" />

<xs:element ref="RAUBE" />

<xs:element ref="TEMPB" />

<xs:element ref="STOFF" />

<xs:element ref="KUNNR" />

<xs:element ref="WESCH" />

<xs:element ref="BWVOR" />

<xs:element ref="BWSCL" />

<xs:element ref="SAISO" />

<xs:element ref="ETIAR" />

<xs:element ref="ETIFO" />

<xs:element ref="PRDHA" />

<xs:element ref="CADKZ" />

<xs:element ref="ERGEW" />

<xs:element ref="ERGEI" />

<xs:element ref="GEWTO" />

<xs:element ref="VOLTO" />

<xs:element ref="KZKFG" />

<xs:element ref="VHART" />

<xs:element ref="FUELG" />

<xs:element ref="STFAK" />

<xs:element ref="MAGRV" />

<xs:element ref="BEGRU" />

<xs:element ref="QMPUR" />

<xs:element ref="RBNRM" />

<xs:element ref="MHDRZ" />

<xs:element ref="MHDHB" />

<xs:element ref="MHDLP" />

<xs:element ref="VPSTA" />

<xs:element ref="MSTAE" />

<xs:element ref="MSTAV" />

<xs:element ref="MSTDE" />

<xs:element ref="MSTDV" />

<xs:element ref="MFRPN" />

<xs:element ref="MFRNR" />

<xs:element ref="BMATN" />

<xs:element ref="MPROF" />

<xs:element ref="COMPL" />

<xs:element ref="KZEFF" />

<xs:element ref="RDMHD" />

<xs:element ref="IPRKZ" />

<xs:element ref="PRZUS" />

<xs:element ref="GEWTO_NEW" />

<xs:element ref="AENNR" />

<xs:element ref="MATFI" />

<xs:element ref="CMREL" />

<xs:element ref="SATNR" />

<xs:element ref="SLED_BBD" />

<xs:element ref="GTIN_VARIANT" />

<xs:element ref="GENNR" />

<xs:element ref="SERLV" />

<xs:element ref="RMATP" />

<xs:element ref="E1MAKTM" />

</xs:sequence>

<xs:attribute name="SEGMENT" use="required">

<xs:simpleType>

<xs:restriction base="xs:byte">

<xs:enumeration value="1" />

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

<xs:element name="E1MAKTM">

<xs:complexType>

<xs:sequence>

<xs:element ref="MSGFN" />

<xs:element ref="SPRAS" />

<xs:element ref="MAKTX" />

<xs:element ref="SPRAS_ISO" />

</xs:sequence>

<xs:attribute name="SEGMENT" use="required">

<xs:simpleType>

<xs:restriction base="xs:byte">

<xs:enumeration value="1" />

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

</xs:element>

<xs:element name="COMPL">

<xs:complexType />

</xs:element>

<xs:element name="CMREL">

<xs:complexType />

</xs:element>

<xs:element name="CADKZ">

<xs:complexType />

</xs:element>

<xs:element name="BWVOR">

<xs:complexType />

</xs:element>

<xs:element name="BWSCL">

<xs:complexType />

</xs:element>

<xs:element name="BMATN">

<xs:complexType />

</xs:element>

<xs:element name="BLATT">

<xs:complexType />

</xs:element>

<xs:element name="BLANZ">

<xs:complexType />

</xs:element>

<xs:element name="BEHVO">

<xs:complexType />

</xs:element>

<xs:element name="BEGRU">

<xs:complexType />

</xs:element>

<xs:element name="AESZN">

<xs:complexType />

</xs:element>

<xs:element name="AENNR">

<xs:complexType />

</xs:element>

<xs:element name="AENAM">

<xs:complexType />

</xs:element>

</xs:schema>

Former Member
0 Kudos

Take the inbound payload from moni & test the same in your mapping under test tab. Also check if you have not missed to map any mandotary field (it will be in red color).

Regards,

Sarvesh

Former Member
0 Kudos

I have mapped all the mandatory fields.

and inbound pay load - do u mean that i have to take this from SXMB_MONI -> PAYLOAD?

when am pasting this payload from moni in TEST tab, its lossing its structure.so what needs to be done

this is my inbound payload:

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

- <MATMAS05>

- <IDOC BEGIN="1">

- <EDI_DC40 SEGMENT="1">

<TABNAM>EDI_DC40</TABNAM>

<MANDT>100</MANDT>

<DOCNUM>0000000000202256</DOCNUM>

<DOCREL>700</DOCREL>

<STATUS>30</STATUS>

<DIRECT>1</DIRECT>

<OUTMOD>2</OUTMOD>

<IDOCTYP>MATMAS05</IDOCTYP>

<MESTYP>MATMAS</MESTYP>

<STDMES>MATMAS</STDMES>

<SNDPOR>SAPSND</SNDPOR>

<SNDPRT>LS</SNDPRT>

<SNDPRN>SNDCLNT100</SNDPRN>

<RCVPOR>SAPDPI</RCVPOR>

<RCVPRT>LS</RCVPRT>

<RCVPRN>DPICLNT100</RCVPRN>

<CREDAT>20080325</CREDAT>

<CRETIM>131027</CRETIM>

</EDI_DC40>

- <E1MARAM SEGMENT="1">

<MSGFN>100</MSGFN>

<MATNR>TEST</MATNR>

<E1MARA1 SEGMENT="1" />

- <E1MAKTM SEGMENT="1">

<MAKTX>TEST DESCRIPTION</MAKTX>

</E1MAKTM>

- <E1MARCM SEGMENT="1">

<E1MARC1 SEGMENT="1" />

<E1MARDM SEGMENT="1" />

<E1MFHMM SEGMENT="1" />

<E1MPGDM SEGMENT="1" />

<E1MPOPM SEGMENT="1" />

<E1MPRWM SEGMENT="1" />

<E1MVEGM SEGMENT="1" />

<E1MVEUM SEGMENT="1" />

<E1MKALM SEGMENT="1" />

</E1MARCM>

- <E1MARMM SEGMENT="1">

<E1MEANM SEGMENT="1" />

</E1MARMM>

<E1MBEWM SEGMENT="1" />

- <E1MLGNM SEGMENT="1">

<E1MLGTM SEGMENT="1" />

</E1MLGNM>

<E1MVKEM SEGMENT="1" />

<E1MLANM SEGMENT="1" />

- <E1MTXHM SEGMENT="1">

<E1MTXLM SEGMENT="1" />

</E1MTXHM>

- <E1CUCFG SEGMENT="1">

<E1CUINS SEGMENT="1" />

<E1CUVAL SEGMENT="1" />

<E1CUCOM SEGMENT="1" />

</E1CUCFG>

</E1MARAM>

<E1UPSLINK SEGMENT="1" />

</IDOC>

</MATMAS05>

thanks

siva

Edited by: shiva g on Mar 25, 2008 9:00 AM

Edited by: shiva g on Mar 25, 2008 9:01 AM

Edited by: shiva g on Mar 25, 2008 9:02 AM

Former Member
0 Kudos

Yes m talking about the same.

Do like this. First of all open your message (source payload i.e. idoc) then just click on Window 1 (Shift + F6 ) if it is in the upper window else click on Window 2 (Shift + F7) and save the file on ur desktop.

Now go to ur mapping test tab and press the "load test instance" button and select the file which u saved on ur desktop. Test it and let me know the results.

Former Member
0 Kudos

sarvesh,

thanks 4 ur i/ps.

if i wanna file exactly in idoc format, is it possible? what i mean is.. if u see a XML of an IDOC, it has all the flds of control record and all that other stuff from segments. so for this, how can i do?

what i thought is, i can download the wsdl of idoc imported and then import its xml as my target file structure. is this ok?

thanks

siva