Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error during access to reference node XML reading in ABAP

Former Member
0 Likes
3,163

Hi Experts,

I am facing an issue while reading the XML file content to an ABAP structure. It says the reference node is incorrect. The exact error is as below.

"An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_ST_REF_ACCESS', was not caught and therefore caused a runtime error. The reason for the exception is: Error during access to reference node 'CORRELATIONID'. The reference node is not defined or does not have the necessary type. For more information follow the link: ABAP Keyword Documentation."

I understand that transformation is not able to reach the structure at runtime but why and where is the mistake?

Below is my XML transformation.

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L1S33 { color: #009300; }

<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined">
<tt:root name="ZCREATEITEMREQUEST" type="ddic:ZCREATEITEMREQUEST"/>
<tt:template>
<ns3:createItemRequest xmlns:ns2="http://schemas.zimmer.com/plm/item" xmlns:ns3="http://schemas.zimmer.com/plm/itemapi">
<correlationId tt:value-ref="ZCREATEITEMREQUEST.CORRELATIONID"/>
<sourceSystem tt:value-ref=".ZCREATEITEMREQUEST.SOURCESYSTEM"/>
<targetSystem tt:value-ref=".ZCREATEITEMREQUEST.TARGETSYSTEM"/>
<ITEM>
<tt:loop ref=".ZCREATEITEMREQUEST.ITEM">
<ZECCN_RESULT>
<CATALOGNUMBER tt:value-ref="CATALOGNUMBER"/>
<LOGICALSYSTEMSGROUP tt:value-ref="LOGICALSYSTEMSGROUP"/>
<LEGALREGULATION tt:value-ref="LEGALREGULATION"/>
<CEMARKCLASSIFICATION tt:value-ref="CEMARKCLASSIFICATION"/>
</ZECCN_RESULT>
</tt:loop>
</ITEM>
</ns3:createItemRequest>
</tt:template>
</tt:transform>

Below the structure in where I am reading the XML. Below is the source XML structure.

Below is my source XML file.(just filled with test data).

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <ns3:createItemRequest xmlns:ns2="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" xmlns:ns3="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">

<correlationId>sssssssssssssssssssssssssssssssss</correlationId> <sourceSystem>aaaaaa</sourceSystem>

<targetSystem>ddd</targetSystem>

<item>

<catalogNumber>test1</catalogNumber> <logicalSystemsGroup>wccg</logicalSystemsGroup> <legalRegulation>test2</legalRegulation> <cemarkclassification>xxx</cemarkclassification>

</item>

</ns3:createItemRequest>

2 REPLIES 2
Read only

Former Member
0 Likes
1,673

Oopppsss...

I got it.

I colled the return parameter incorrectly in the program.

Read only

vmcuervo
Explorer
0 Likes
986
Hello Engineer.

I know this post is from a long time ago, but the exact same thing is happening to me and I'd like to know exactly how you solved it.

Can you please help me?

Thank you so much.