title: ABAP: Use if-condition in string template
body: <p>My Problem is to integrate an if-statement into a string template.</p>
  <pre><code>TYPES: BEGIN OF ty_field,
           name   TYPE string,
           label  TYPE string,
           result TYPE string,
         END OF ty_field.
  DATA: mt_fields TYPE TABLE OF ty_field.
  
  mt_fields = VALUE #(
          ( name = 'HI'      label = 'Greeting' )
          ( name = 'PERSON'  label = 'Who' )
          ( name = 'RESULT'  label = 'Sentence'  result = |Say \{HI\} to \{PERSON\}.| ) ).
  </code></pre>
  <p>Unfortunately the line 3 of <code>mt_fields</code> has <code>result</code> set to <code>Say {HI} to {PERSON}</code> but I'd expect <code>Say Greeting to Who</code>.</p>
  <p>More importantly, <strong>what I want to get</strong>:
  Some times there is no data for <code>PERSON</code>. In that case, the result variable will get the string <code>'Say hello to .'</code> (if <code>'hello'</code> is the value for <code>HI</code>).</p>
  <p>I dont want to have this. If there is no person, I want to get an empty string as result. So I have to filter first, whether there is some value for <code>PERSON</code> or not. I need to get an if-condition into the string assignment.</p>
  <p>In Python I would write something like</p>
  <pre><code>( name = 'RESULT'  label = 'Sentence'  result = 'Say {HI} to {PERSON}.' IF PERSON != '' ELSE '' )
  </code></pre>
  <p>But how to do this in ABAP?</p>
  <p>Thanks a lot!</p>