title: Delete/extract last character from the string
body: <p>Of course, question was discussed thousand times (<a href="https://archive.sap.com/discussions/thread/696015" rel="nofollow noreferrer">1</a>, <a href="https://archive.sap.com/discussions/thread/963412" rel="nofollow noreferrer">2</a>, <a href="https://archive.sap.com/discussions/thread/1229493" rel="nofollow noreferrer">3</a>) but nothing was offered except this ugly snippet:</p>
  
  <pre><code>data: str type string value 'abcd#',
        len type i.
  
  len = strlen( str ).
  len = len - 1.
  str = str+0(len).
  </code></pre>
  
  <p>Is there any elegant one-liner to do this? The only prominent way I found so far is</p>
  
  <pre><code>SHIFT str RIGHT DELETING TRAILING `,`.
  </code></pre>
  
  <p>However, it requires that you know what the last char is (TRAILING mask) and mask doesn't support regexp or wildcards. Or I am wrong? </p>
  
  <p>This variant doesn't work for me for some reason </p>
  
  <pre><code>SHIFT string RIGHT BY 1.
  </code></pre>
  
  <p>Maybe somebody knows more beautiful syntax to do this in one line? Anything new in ABAP 7.40 or 7.50? </p>