<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ABAP CDS - string function to remove spaces? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508872#M2003845</link>
    <description>&lt;P&gt;Are you talking about leading or trailing spaces and other characters? What kind of value is it?&lt;/P&gt;&lt;P&gt;Try these keywords see which one fulfills your requirement- LTRIM or RTRIM, LEFT, RIGHT&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensql_functions_string.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensql_functions_string.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 19:08:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2022-04-22T19:08:16Z</dc:date>
    <item>
      <title>ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508868#M2003841</link>
      <description>&lt;P&gt;I would like to create a CDS that provides a template for creating CDS from tables.&lt;/P&gt;
  &lt;P&gt;For this purpose, I would like to remove the spaces in database field dd04t.scrtext_l (long text of fields).&lt;/P&gt;
  &lt;P&gt;How can I do this?&lt;/P&gt;
  &lt;P&gt;The simple&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;replace( dd04t.scrtext_l, ' ', '' )&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;does not work. Maybe the "trailing spaces" in the second argument are removed.&lt;/P&gt;
  &lt;P&gt;Backquotes to preserve the space are not allowed.&lt;/P&gt;
  &lt;P&gt;Workarounds like the following also did not work:&lt;/P&gt;
  &lt;UL&gt; 
   &lt;LI&gt;cast( '' as abap.char( 1 ) ) ,&lt;/LI&gt; 
   &lt;LI&gt;concat( '', ' ' ), // I found this in SAP course material&lt;/LI&gt; 
   &lt;LI&gt;concat_with_space( '', '', 1 ),&lt;/LI&gt; 
  &lt;/UL&gt;
  &lt;P&gt;Is there no way to do this in CDS? (Of course, I can always use ABAP.)&lt;/P&gt;
  &lt;P&gt;Update: I published the ABAP report for the task here:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2022/04/19/utility-report-to-provide-the-long-field-names-when-creating-a-new-basic-cds/"&gt;Utility Report to provide the long field names when creating a new basic CDS | SAP Blogs&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508868#M2003841</guid>
      <dc:creator>vonglan</dc:creator>
      <dc:date>2022-04-19T10:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508869#M2003842</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; : &lt;/P&gt;&lt;P&gt;1) would you mind explaining how exactly you searched ? I did not find anything related to removing spaces in core data services&lt;/P&gt;&lt;P&gt;2) the approach with char(32) did not work for me (syntax error). Did you mean&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;                         cast( '' as abap.char( 32 ) ) ,&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;That also did not work&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508869#M2003842</guid>
      <dc:creator>vonglan</dc:creator>
      <dc:date>2022-04-19T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508870#M2003843</link>
      <description>&lt;P&gt;I'm so sorry, I completely missed that your question was about CDS, and I was looking at SQL/SQLScript/AMDP (in SQL, replace also didn't work for removing spaces, the SQL function CHAR(32) worked), so please forget my previous comment. I just deleted it to not confuse future readers.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 18:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508870#M2003843</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T18:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508871#M2003844</link>
      <description>&lt;P&gt;In fact, just thinking again, if we create a CDS Table Function whose AMDP does REPLACE( dd04t.scrtext_l, char(32), '' ) (here CHAR(32) OR NCHAR(32) will work, being a HANA SQL function), I think it should work.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 19:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508871#M2003844</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T19:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508872#M2003845</link>
      <description>&lt;P&gt;Are you talking about leading or trailing spaces and other characters? What kind of value is it?&lt;/P&gt;&lt;P&gt;Try these keywords see which one fulfills your requirement- LTRIM or RTRIM, LEFT, RIGHT&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensql_functions_string.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensql_functions_string.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 19:08:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508872#M2003845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2022-04-22T19:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS - string function to remove spaces?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508873#M2003846</link>
      <description>&lt;P&gt;no, it is not about trailing of leading spaces&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 13:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-string-function-to-remove-spaces/m-p/12508873#M2003846</guid>
      <dc:creator>vonglan</dc:creator>
      <dc:date>2022-04-26T13:20:16Z</dc:date>
    </item>
  </channel>
</rss>

