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

Simple Transformation

Former Member
0 Likes
1,699

I am working on simple xml transformation to read xml string into ABAP structure and having an issue on with one of the children node (table) of parent node. Can someone give a pointer on how to access the child (table) node.?

I am not sure quite on how to access <tabstatus> table.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,600

You need to create a deep structure similar to the XML structure. Mentioned this table name in the CALL transformation. The values get assigned to the table structure.

the other way is to convert the XML  into Xstring  using 'SCMS_BINARY_TO_XSTRING'. After that use  SMUM_XML_PARSE to get the elements names and values.

Thanks

You need to create a deep structure similar to the XML structure. Mentioned this table name in the CALL transformation. The values get assigned to the table structure.

the other way is to convert the XML  into Xstring  using 'SCMS_BINARY_TO_XSTRING'. After that use  SMUM_XML_PARSE to get the elements names and values.

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
1,601

You need to create a deep structure similar to the XML structure. Mentioned this table name in the CALL transformation. The values get assigned to the table structure.

the other way is to convert the XML  into Xstring  using 'SCMS_BINARY_TO_XSTRING'. After that use  SMUM_XML_PARSE to get the elements names and values.

Thanks

Read only

0 Likes
1,600

Once I create deep structure; would the following works to read table node?

<tt:loop ref="TabStatusues.TabStatus">

Read only

0 Likes
1,600

No.. Data will be assigned directly to the deep structure fields.

if S1 is the main structure and T1 is deep table structure then accessing using T2 = S1-T1[]. Here T2 table type is simialr to T1..

Hope this give you an idea. Let me know still if you have any Qs.

Thanks.

Read only

0 Likes
1,600

Can you provide me a sample code to read deep structure from root structure.. in simple transformations.

Read only

0 Likes
1,600

Please send me your code if you are getting any errors. I'll check and correct the issue..

Read only

0 Likes
1,600

Could you please search "simple transformation abap deep structure" and read first 5 results?

Read only

Former Member
0 Likes
1,600

Example code:

CALL TRANSFORMATION Z_YOUR_TRANSFORMATION

   SOURCE XML ls_xml

   RESULT record = ls_deep_structure.


I recommend you to see this article: