<?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>Question Re: REPLACE function is not working in AMDP script to remove symbol from string. in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522342#M4693759</link>
    <description>&lt;P&gt;I don't understand "it's not working", please explain what you get.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 07:24:48 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-04-19T07:24:48Z</dc:date>
    <item>
      <title>REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaq-p/12522341</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
  &lt;P&gt;My requirement is to remove $ symbol from a string in AMDP method.&lt;/P&gt;
  &lt;P&gt;Example : if input lv_material = $$$$$$$$12345.&lt;/P&gt;
  &lt;P&gt; output should be lv_material = 12345&lt;/P&gt;
  &lt;P&gt;I am trying to replace $ symbol with space in AMDP but its not working. So please help me with a solution.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2037906-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
  &lt;P&gt;Chhanda Sarkar&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 06:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaq-p/12522341</guid>
      <dc:creator>chhanda_sarkar</dc:creator>
      <dc:date>2022-04-19T06:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522342#M4693759</link>
      <description>&lt;P&gt;I don't understand "it's not working", please explain what you get.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 07:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522342#M4693759</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T07:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522343#M4693760</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;using replace function I am getting the same string as an output. ie : $$$$$$$$12345.I should get : 12345.&lt;/P&gt;&lt;P&gt;I have attached my code screenshot also.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522343#M4693760</guid>
      <dc:creator>chhanda_sarkar</dc:creator>
      <dc:date>2022-04-19T11:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522344#M4693761</link>
      <description>&lt;P&gt;Please post the code as text instead of image, so that one can easily answer by testing your code. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:24:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522344#M4693761</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T12:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522345#M4693762</link>
      <description>&lt;P&gt;No issue at my side:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS zzsro_amdp DEFINITION PUBLIC FINAL CREATE PUBLIC .
  PUBLIC SECTION.
    INTERFACES: if_amdp_marker_hdb.
    CLASS-METHODS test EXPORTING VALUE(material) TYPE matnr.
ENDCLASS.
CLASS zzsro_amdp IMPLEMENTATION.
  METHOD test
        BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT
        OPTIONS READ-ONLY.
    SELECT REPLACE( '$$$$1', '$', ' ' ) material into MATERIAL FROM dummy;
  ENDMETHOD.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Test class:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS ltc_main DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
  PRIVATE SECTION.
    METHODS test FOR TESTING.
ENDCLASS.
CLASS ltc_main IMPLEMENTATION.
  METHOD test.
    zzsro_amdp=&amp;gt;test( IMPORTING material = data(material) ).
    cl_abap_unit_assert=&amp;gt;assert_equals( act = material exp = '1' ).
  ENDMETHOD.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:38:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522345#M4693762</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T12:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522346#M4693763</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;  could you check if your method return an exception ? &lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522346#M4693763</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-04-19T12:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522347#M4693764</link>
      <description>&lt;P&gt; Hello &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;METHOD get_quota_based_on_duration_t BY DATABASE PROCEDURE&lt;/P&gt;&lt;P&gt;                                     FOR HDB LANGUAGE&lt;/P&gt;&lt;P&gt;                                     SQLSCRIPT OPTIONS READ-ONLY&lt;/P&gt;&lt;P&gt;                                     USING ekko ekpo ekpo_distr /VWKS/NLP_CTR_QT dd07t but0id lfa1.&lt;/P&gt;&lt;P&gt;    declare lv_material "$ABAP.type( matnr )" := substring( :iv_quota_duration_where, 1, 40 );&lt;/P&gt;&lt;P&gt;    declare lv_bsakz "$ABAP.type( bsakz )" := substring( :iv_quota_duration_where, 41, 1 );&lt;/P&gt;&lt;P&gt;    declare lv_valid_from "$ABAP.type( sy-datum )" := substring( :iv_quota_duration_where, 42, 8 );&lt;/P&gt;&lt;P&gt;    declare lv_valid_to "$ABAP.type( sy-datum )" := substring( :iv_quota_duration_where, 50, 8 );&lt;/P&gt;&lt;P&gt;    declare lv_plant "$ABAP.type( werks_d )" := substring( :iv_quota_duration_where, 58, 4 );&lt;/P&gt;&lt;P&gt;    SELECT replace( lv_material,  '$', ' '  )  "replace" from dummy;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;This is my piece of code in that method.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 12:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522347#M4693764</guid>
      <dc:creator>chhanda_sarkar</dc:creator>
      <dc:date>2022-04-19T12:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522348#M4693765</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer and for your valuable time to answers my query.&lt;/P&gt;&lt;P&gt;I am able to solve it by following your code.&lt;/P&gt;&lt;P&gt; I have replaced my piece of code with the below line and now I am getting my expected result. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select replace ( lv_material, '$', ' ' ) material into lv_MATERIAL from dummy; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chhanda Sarkar&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 13:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522348#M4693765</guid>
      <dc:creator>chhanda_sarkar</dc:creator>
      <dc:date>2022-04-19T13:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522349#M4693766</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt;&lt;/P&gt;I usually test my code before answering, it was the case here so there was no exception. Because of "using dummy" missing?</description>
      <pubDate>Tue, 19 Apr 2022 13:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522349#M4693766</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522350#M4693767</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;chhanda.sarkar&lt;/SPAN&gt;&lt;P&gt;Each time you forgot to indicate the name of the exporting parameter (you didn't post the code METHODS ...), and I understand from your 2 last posts that you named it the same as the variable. Try to not use the same names the variables and parameters to avoid this kind of issue !&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522350#M4693767</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522351#M4693768</link>
      <description>&lt;P&gt;I cannot test your code  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;, but I think, when you catch an execption and after put the ASSERT.. method, as SAP not run your ASSERT method, and not return an error, the test is considered as SUCCESS&lt;/P&gt;&lt;P&gt;I already had this kind of problem, in a project &lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522351#M4693768</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-04-19T14:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522352#M4693769</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;, &lt;/P&gt;&lt;P&gt;      get_quota_based_on_duration_t IMPORTING VALUE(iv_quota_duration_where) TYPE gty_quota_duration_where&lt;/P&gt;&lt;P&gt;                                    exporting VALUE(et_quota_data)           TYPE gty_t_quota_amdp_output,&lt;/P&gt;&lt;P&gt;This is the method declaration part.&lt;/P&gt;&lt;P&gt;I Think problem was I did not use  "Into"  while using REPLACE function.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2037919-method-declaration.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522352#M4693769</guid>
      <dc:creator>chhanda_sarkar</dc:creator>
      <dc:date>2022-04-19T14:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function is not working in AMDP script to remove symbol from string.</title>
      <link>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522353#M4693770</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt; Got it, sorry for the bad catch. Let me edit my code/remove try/catch/endtry. But anyway it works.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 19:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/replace-function-is-not-working-in-amdp-script-to-remove-symbol-from-string/qaa-p/12522353#M4693770</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-04-19T19:13:46Z</dc:date>
    </item>
  </channel>
</rss>

