title: How to write a SELECT for a field of type "quantity" in SET_GET_ENTITY method?
body: <p>I want to select a single row with all columns from my table <code>zbookings</code>. <code>zbookings</code> table has a structure based on <code>zbooking</code> data structure - see tables below.</p>
  
  <p>Table <code>ZBOOKINGS</code>:
  <a href="https://i.stack.imgur.com/y8VWh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y8VWh.png" alt="enter image description here"></a></p>
  
  <p>Structure <code>ZBOOKING</code>:
  <a href="https://i.imgur.com/gJN7bxi.png?1" rel="nofollow noreferrer"><img src="https://i.imgur.com/gJN7bxi.png?1" alt="enter image description here"></a></p>
  
  <p>My <code>BOOKINGSET_GET_ENTITY</code> method:</p>
  
  <pre><code>method BOOKINGSET_GET_ENTITY.
  
      DATA: ls_keytab TYPE LINE OF /IWBEP/T_MGW_NAME_VALUE_PAIR,
            i_carrid TYPE string,
            i_connid TYPE string,
            i_fldate TYPE string,
            i_bookid TYPE string.
  
      LOOP AT it_key_tab INTO ls_keytab.
        CASE ls_keytab-name.
          WHEN 'Carrid'.
            i_carrid = ls_keytab-value.
          WHEN 'Connid'.
            i_connid = ls_keytab-value.
          WHEN 'Fldate'.
            i_fldate = ls_keytab-value.
          WHEN 'Bookid'.
            i_bookid = ls_keytab-value.
        ENDCASE.
      ENDLOOP.
  
      SELECT SINGLE *
        INTO CORRESPONDING FIELDS OF er_entity
        FROM ybookings AS a
        WHERE
          a~carrid = i_carrid AND
          a~connid = i_connid AND
          a~fldate = i_fldate AND
          a~bookid = i_bookid.
  
  endmethod.
  </code></pre>
  
  <p>I tested it via SAP Gateway Client. It's OK when I remove column <code>luggweight</code> from my <code>SELECT SINGLE *</code> statement. However when I select all columns via <code>SELECT SINGLE *</code>, then it outputs an error </p>
  
  <blockquote>
    <p>Runtime Error: 'SAPSQL_PARSER_TODO_WARNING'`</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;error&gt;
    &lt;code&gt;SAPSQL_PARSER_TODO_WARNING&lt;/code&gt;
    &lt;message&gt;Runtime Error: 'SAPSQL_PARSER_TODO_WARNING'. 
       The OData request processing has been abnormal terminated. If "Runtime Error"
       is not initial, launch transaction ST22 for details and analysis. Otherwise,
       launch transaction SM21 for system log analysis.&lt;/message&gt;
    &lt;timestamp&gt;20190905144432&lt;/timestamp&gt;
  &lt;/error&gt;
  </code></pre>
  
  <p>As you can see the problem is with <code>luggweight</code> field which is of <code>quantity</code> type and its typing method is <code>Type ref to</code>. When I check my <code>BOOKINGSET_GET_ENTITY</code> method via ctr+F2 it outputs a warning: </p>
  
  <blockquote>
    <p>The database field or the result type of the aggregate function LUGGWEIGHT and the component "LUGGWEIGHT" of "ER_ENTITY" are not compatible.</p>
  </blockquote>
  
  <p>How should I modify my <code>SELECT</code> query / <code>BOOKINGSET_GET_ENTITY</code> method for it to work?</p>