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

Abap ST deserialization

Former Member
0 Kudos

Hi there i have read now a lot of things about ST but still i don't grasp certain concept.

I have tho following (simplified) XML and Datastructure:


  clsname TYPE string,

  source TYPE stringtab,

  END OF test.

DATA tab TYPE zst_t_test..

DATA str TYPE string.

str =

'<classes>' &&

'<class name="zcl_umap_exception_object" isException="false">' &&

'<definition>' &&

'abc' &&

  '</definition>' &&

'<publicSection>' &&

'class zcl_umap_exception_object definition INHERITING FROM ZCL_UMAP_CLASS_OBJECT.' &&

'</publicSection>' &&

'<privateSection>' &&

'private section.' &&

'</privateSection>' &&

'</class>' &&


and what i want to achieve is that everything is put into table source. but somehow that doesn't work. i am using this transformation:

<?sap.transform simple?>

<tt:transform xmlns:tt="" xmlns:ddic="" xmlns:def="">

  <tt:root name="ROOT" type="ddic:ZST_T_TEST"/>



      <tt:loop ref=".ROOT">


          <tt:attribute name="name" value-ref="CLSNAME"/>


              <tt:value ref="$ref.SOURCE"/>


          <tt:loop name="b" ref="SOURCE">


              <tt:value ref="$b"/>



          <tt:loop name="b" ref="SOURCE">


              <tt:value ref="$b"/>








first thing that really irritates me is that the syntax check says "type ... is not atomic" for the <definitions> tag. so how to read that specific value?

Next even when i put a loop around <definition> the loop of the <publicSection> is overwriting all previous entries, same for the loop of <privtaeSection>

And worse in my real XML <publicSection itself can contain lots of attributes and other stuff which i have to loop over as well.

so the Questions is: How can i append everything to just on table?



Former Member
0 Kudos

Ok problem solved, anyone stumbling about the same issue, use assign and read..