cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime exception occurred during application mapping

former_member601528
Participant
0 Kudos

Dear All,

I'm doing file to idoc scenario. I'm getting an error in Sxmb_moni as "Runtime exception occured during application mapping".

In SXMB_MONI, of under trace, i got the error:

" <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_CardMachineCreate_to_ZCRDBRK_ Thrown: com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ZCRDBRK/IDOC. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode">

I tested the mapping by using the message payload from "moni", but the mapping is failing in Message mapping.


I'm attaching the screenshots of message mapping, operational mapping testings and also the message mapping.

In the mapping i have given all the mandatory data to the idoc.

Please suggest any solution to my issue.

Thanks,

Aravind

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member601528
Participant
0 Kudos

Dear Sen,

     

               But the error  displaying is for the Segment node not for the fields. You can check in my attached screenshot images.

"cannot create target element ZCRDBRK". what i need to do in this issue.Please let me know. I provided all the mandatory data to the fields.

and my source file is in this format:


C001|20130311|ICICI123|C001GEN|150000

I'm doing a test scenario here.

Whether the file structure is proper or not, please let me know. and my mapping

source:

Cardmachinecreate---->root node of idoc

          Recordset------->Idoc

                    cont------->EDI_DC40

                   CardDetails.......>ZCRDBRK1(Data control node)

                         f1--->f1

                         f2--->f2

                         f3---->f3

                         f4----->f4

                         f5------>f5.

Is my mapping correct or worng according to my file structure? please let me know.

Thanks,

Aravind


nabendu_sen
Active Contributor
0 Kudos

Hi Aravind,

As I mentioned before use Standard Function 'mapWithDefault' after each Source node mapped to Target. You can use 'mapWithDefault' both for Node and Field. It should not be an issue. You have correctly mapped all the mandatory Target Node and Fields with correct Source Structures. But at runtime if any of these Source Nodes / Fields are not getting populated, resulted to this error.

Former Member
0 Kudos

Hi Arvind,

You need to check the pipe line step where it is failing?

Is it failing in message mapping step or call adapter... If it is not failing at Request message mapping

then it should issue with your port & RFC destination maintained in PI.

Regards,

Ashish

former_member601528
Participant
0 Kudos

issue resolved thanx to all.

nabendu_sen
Active Contributor
0 Kudos

Hi Aravind,

This error is coming because Target mandatory node 'IDOC' is not getting populated. It is mapped with Source node 'Recordset' which has occurrence of 1--1 and its seems as Mandatory, but at Source Structure in message mapping it does not have any restriction. So 'Recordset' may not not occur and for that Target 'IDOC' is not getting able to be generated. Use 'mapWithDefault' and select correct Parent context. 

smavachee
Active Contributor
0 Kudos

Seems to be payload issue, as Baskar suggested in his reply some of the mandatory fields or node occurrences are missing.

Use 'mapWithDefault' functions if you have some doubt for specific field. Will be helpful to analyse payload and its restricted validation.

Hope it will helps.!

Regards,

Sunil

Former Member
0 Kudos

Aravind,

What is the logic being used to map IDOC segment or is it just pass through.

If there is no logic then one suggestion would be to map with constant rather than with source node

Recordset.

Regards,

Ashish

former_member601528
Participant
0 Kudos

Dear Ashish,

It's a simple pass through mapping. No logic behind it. I tried with constant mapping, now i'm getting error as:"Error: Transaction IDX1:Port SAPPID, client, RFC destination contains errors",  i tested with payload of moni in ESR but no values are generated in the mapping program.

Thanks,

Aravind

nabendu_sen
Active Contributor
0 Kudos

Hi Aravind,

This error is coming because in IDX1 of PI, Port is not correctly created. Have you maintained the naming conventions? Check the below blog properly:

http://help.sap.com/saphelp_nw04s/helpdata/en/6a/e6194119d8f323e10000000a155106/content.htm

Also test the RFC Destination used by the Port in SM59 transaction.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

copy the value from SXMB_MONI and test in the ESR mapping test area.  The main reason is that the values required for the mandatory fields or node occurence missing at the runtime. Please use the data and check the field elements from the parent node to the child node and their elments completely.

former_member601528
Participant
0 Kudos

Dear Baskar,

I have already done the testing in ESR by using the payload from SXMB_MONI, but my mapping is failed in ESR. The Data segement is not displaying in the mapping.

I have given all the mandatory data to the fields and i gave all the mandatory control record data in idoc also.But still my mapping is failing.

Thanks,

Aravind

nabendu_sen
Active Contributor
0 Kudos

Use <mapWithDefault> for all the Target fields for which you are getting error like below

"Cannot create target element *****************************"