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: 

The ref. node has either not been defined or does not have the required type?.

Lopezs
Explorer
0 Kudos
1,175

Hi experts. I am newbie using Abap. I want to convert data from internal table to XML format using structure, but I am facing this issue and I dont know to solve this:

Simple Transformation:

I am using functions to do the process..

I have moved the data from internal tables to the structure what I declared in the Export Tab of the function,

and I am trying to pass the same structure to the simple transformation. (this structure has already all moved data)

DATA : xml_result TYPE xstring.  

CALL TRANSFORMATION ZPRUEBA2
    SOURCE root = cartaporte
  RESULT XML  xml_result  .
1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
908

Your unique root is named 'cartaporte' (<tt:root name='cartaporte') so you should indicate its name in CALL TRANSFORMATION:

CALL TRANSFORMATION ZPRUEBA2
    SOURCE cartaporte = cartaporte
  RESULT XML  xml_result  .

Based on your transformation, it requires that the variable 'cartaporte' (right-hand side) is a structure of type ZCPXML_CARTAPORTE.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos
908

What is the ABAP code and the types of variables you pass to the root? (structure/internal table)

(no need to post a screenshot; paste the code and format it by pressing the button CODE)

Thank you.

Sandra_Rossi
Active Contributor
909

Your unique root is named 'cartaporte' (<tt:root name='cartaporte') so you should indicate its name in CALL TRANSFORMATION:

CALL TRANSFORMATION ZPRUEBA2
    SOURCE cartaporte = cartaporte
  RESULT XML  xml_result  .

Based on your transformation, it requires that the variable 'cartaporte' (right-hand side) is a structure of type ZCPXML_CARTAPORTE.

908

Thank yo so much. It works. I corrected the name 'root' to 'cartaporte' and now its working.:))