cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime Exception in Message mapping

Former Member
0 Kudos

Hi Experts,

I have a scenario of IDoc to <third party adapter> cXML.

The message caught the below error

RuntimeException in Message-Mapping transformation : Runtime exception during processing target field mapping ......./ShipTo[2]/Address/PostalAddress/DeliverTo (suppressed field). The message is: Exception:[java.lang.ArrayIndexOutOfBoundsException: 7] in class com.sap.xi.tf._M_IDOC_to_cXML_ method getShipToContact$[, , com.sap.aii.mappingtool.tf3.rt.Q2QFunctionWrapper@253fdd8a]

Please suggest on what went wrong, as everything is working fine before.

Thanks in advance.

MK

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Mk:

For this there is problem in the mapping. For the field ....../ShipTo[2]/Address/PostalAddress/DeliverTo there is no value passed and you are pulling value from there to the target using some function/mapping. Since there is no value there you are getting OutofBoundException. Try to test the Payload you get in the SXMB_MONI and test in the Test tab of message mapping. You will be able to see if value is present there or not.

Former Member
0 Kudos

Thanks Guru.

i have tested with the payload in the mapping test and found that

RuntimeException in Message-Mapping transformation is

due to the missing TEXT_LINE element in the segment Z1VOBTH for the TEXT_ID 'INVOICE_TO_LOCATION'

and we are getting the Invoicing details for PO from the SAP script.

But couldn't able to find why the data is missing,

Please suggest to resolve it.

Thank you,

MK

Former Member
0 Kudos

Mk:

Please check if the source fields which are mapped to the target are all generated by the SAP Script and make sure that they have data so that when they are mapped to the target. If they are mapped and source fields don't have data then it may error out. Sometimes SAP Script might not generate a node if there is not data for it, make sure you handle that condition also.

RuntimeException in Message-Mapping transformation is
due to the missing TEXT_LINE element in the segment Z1VOBTH for the TEXT_ID 'INVOICE_TO_LOCATION'

I am not able to understand this. is Text_ID subelement of Text_Line?? Could you please post the complete error message as it is.

Former Member
0 Kudos

Guru,

Found the problem, exception caused due to a blank line at the end of the SAP script.

we are getting the text from the SAP script using READ_TEXT FM .

After we got the text into the Table, please suggest how to delete the blank lines using some code BEFORE PASSING IT TO THE IDoc.

I am not able to understand this. is Text_ID subelement of Text_Line?? Could you please post the complete error message as it is.

TEXT_ID AND TEXT_LINE are the two elements of the segment Z1VOBTH.

Thank you,

MK

Former Member
0 Kudos

use

CONDENSE variablename

see if this works out.

Former Member
0 Kudos

Thanks Guru.

the table is t_txab TYPE STANDARD TABLE OF tline.

can you please give the code of the delete statement to delete the empty lines from the table t_txab.

Former Member
0 Kudos

Mk:

I think what you can do is loop in the table and condense each row value one at a time..

Loop at table_name into work_area

condense work_area-variable.

endloop.