<?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: Convert packed decimal to char/string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235857#M1381357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you already tried this FM : /OSP/GET_DECIMAL_NOTATION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2009 06:01:57 GMT</pubDate>
    <dc:creator>Sandeep_Panghal</dc:creator>
    <dc:date>2009-09-22T06:01:57Z</dc:date>
    <item>
      <title>Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235856#M1381356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would like to convert a packed decimal to character variable, but i dont want to use the users profil defaults, i would like to choose whether i'm getting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.234,56&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1,234.56&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so WRITE TO is not an option (or i missed a parameter somewhere) and i'm unable to find a function module/method where the decimal notation is X or Y.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 05:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235856#M1381356</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T05:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235857#M1381357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you already tried this FM : /OSP/GET_DECIMAL_NOTATION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:01:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235857#M1381357</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2009-09-22T06:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235858#M1381358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following FM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION '/OSP/GET_DECIMAL_NOTATION'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    i_uname                   = 'SAPUSER'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ET_RETURN                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   EV_DECIMAL_NOTATION       = lv_dec_not&lt;/P&gt;&lt;P&gt;   EV_TEXT                   = lv_text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i executed;&lt;/P&gt;&lt;P&gt;lv_dec_not returned 'X' and&lt;/P&gt;&lt;P&gt;lv_text returned 1,234,567.89&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:12:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235858#M1381358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T06:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235859#M1381359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You misunderstood me, i dont wanna know the users defaults, i want to convert indepent from those values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235859#M1381359</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T06:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235860#M1381360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a bit like requirement, and I dealt with ABAP code. Even I wasnu2019t able to find a right FM for that, thus Iu2019ve done with a bit mixture of ABAP code and FM &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code snippet,Please Have a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE * FROM usr01 WHERE bname = sy-uname.
  IF sy-subrc = 0.
    CASE usr01-dcpfm.
      WHEN ' '.
        FIND ',' IN in_par-value.
        IF sy-subrc = 0.
          REPLACE ',' WITH '.' INTO in_par-value.
        ENDIF.

        MOVE in_par-value TO i_kurrf.

      WHEN 'X'.
        FIND ',' IN in_par-value.
        IF sy-subrc = 0.
          REPLACE ',' WITH '.' INTO in_par-value.
        ENDIF.
        CALL FUNCTION 'MOVE_CHAR_TO_NUM'
          EXPORTING
            chr             = in_par-value
          IMPORTING
            num             = i_kurrf
          EXCEPTIONS
            convt_no_number = 1
            convt_overflow  = 2
            OTHERS          = 3.

      WHEN OTHERS.
        FIND ',' IN in_par-value.
        IF sy-subrc = 0.
          REPLACE ',' WITH '.' INTO in_par-value.
        ENDIF.

        MOVE in_par-value TO i_kurrf.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may alter this code according to you.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:12:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235860#M1381360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T06:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235861#M1381361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rainer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try USING EDIT MASK ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235861#M1381361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T06:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235862#M1381362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data num type p decimals 2.
data str type string.

num = '3141.59'.

call some_function_module exporting notation = 'X' num = num importing str.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on the notation X or Y or blank i would like to get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.141,59 or 3,141.59. I'm searching for such a function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235862#M1381362</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T06:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235863#M1381363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where in the edit mask can i put the notation i would like to be used? Besides that, i was unable to find a edit mask which will work for every p typed varaible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235863#M1381363</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T06:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235864#M1381364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Depending on the notation X or Y or blank i would like to get&lt;/P&gt;&lt;P&gt;&amp;gt; 3.141,59 or 3,141.59. I'm searching for such a function module.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the same thing I have done in my code above.&lt;/P&gt;&lt;P&gt;Why not you go with ABAP code instead of FM(Since yet we donu2019t able to find the exact FM)? Or is there any chance to create your own Z Function module which consist the above code inside the FM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:53:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235864#M1381364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T06:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235865#M1381365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry our postings did overlap so i wasnt aware of yours...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess in_par-value is c based variable? Where did you find that snippet? SAP Standard?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 06:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235865#M1381365</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T06:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235866#M1381366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, In_par-value is C based.&lt;/P&gt;&lt;P&gt;And itu2019s not an SAP standard Snippet. I wrote this code from my left hand in one of the Subroutines of SAP Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 07:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235866#M1381366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T07:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert packed decimal to char/string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235867#M1381367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try Function C14N_NUMERIC_FORMAT ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 08:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-packed-decimal-to-char-string/m-p/6235867#M1381367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T08:17:21Z</dc:date>
    </item>
  </channel>
</rss>

