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: 

Optional XML Tag - Simple Transformation Abap

Lopezs
Explorer
0 Kudos
1,254

Hi Experts. I need a hand. I am really new in this Abap World, I am working with Simple Transformation, I need to get a XML from from internal tables.. some tables has no information (records), so I am trying to make a condition in the Simple transformation, what I need to do is TO HIDE User Tag and its internal tag and atributtes IF THERE ARE NO RECORDS IN TABLES and SHOW IT WHEN THERE ARE RECORDS, but i cant do it....

I’m hoping someone will just see what I’m doing wrong and point out how dumb I am… This is the code what I have tried with:

<tt:cond check="not-initial(ref('.DEPARTAMENT.DOCUMENTINFO.USER.'))">

<User tt:value-ref=".DEPARTAMENT.DOCUMENTINFO.USER."/>
                
   <User>
     <tt:attribute name="UserName" value-ref=".DEPARTAMENT.DOCUMENTINFO.USER.USERNAME"/>
     <tt:attribute name="RFCUser" value-ref=".DEPARTAMENT.DOCUMENTINFO.USER.RFCUSER"/>
     <tt:attribute name="Residence" value-ref=".DEPARTAMENT.DOCUMENTINFO.USER.RESIDENCE"/>
      <Address>
       <tt:attribute name="Street" value-ref=".DEPARTAMENT.DOCUMENTINFO.USER.ADDRESS.STREET"/>
       <tt:attribute name="Num" value-ref=".DEPARTAMENT.DOCUMENTINFO.USER.ADDRESS.NUM"/>
	  [....]
      </Address>
   </User>
        
</tt:cond>
1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
1 REPLY 1

Sandra_Rossi
Active Contributor