<?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: Data type conversion from packed to numeric in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348278#M1398482</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;You can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT at '.' into v1 v2&lt;/P&gt;&lt;P&gt;concatenate v1 v2 into vv1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZDN_TEST_001 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_var1(15) type p decimals 2 value '123.00'.&lt;/P&gt;&lt;P&gt;data: lv_var2(15) type p decimals 5 value '123.12121'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_varc1(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc2(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc1d(2) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc2d(5) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc11(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc21(15) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_var1.&lt;/P&gt;&lt;P&gt;write:/ lv_var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*1)write &amp;amp; REPLACE.&lt;/P&gt;&lt;P&gt;write lv_var1 to lv_varc1.&lt;/P&gt;&lt;P&gt;write lv_var2 to lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE '.' WITH SPACE INTO lv_varc1.&lt;/P&gt;&lt;P&gt;             CONDENSE lv_varc1 NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE '.' WITH SPACE INTO lv_varc2.&lt;/P&gt;&lt;P&gt;             CONDENSE lv_varc2 NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_varc1.&lt;/P&gt;&lt;P&gt;write:/ lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*2)split &amp;amp; concatinate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write lv_var1 to lv_varc1.&lt;/P&gt;&lt;P&gt;write lv_var2 to lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lv_varc1 at '.' into lv_varc1 lv_varc1d.&lt;/P&gt;&lt;P&gt;concatenate lv_varc1 lv_varc1d into lv_varc11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lv_varc2 at '.' into lv_varc2 lv_varc2d.&lt;/P&gt;&lt;P&gt;concatenate lv_varc2 lv_varc2d into lv_varc21.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_varc11.&lt;/P&gt;&lt;P&gt;write:/ lv_varc21.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Nov 2009 06:59:29 GMT</pubDate>
    <dc:creator>nelsonkarunakar_darla2</dc:creator>
    <dc:date>2009-11-11T06:59:29Z</dc:date>
    <item>
      <title>Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348274#M1398478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have a question on data type conversion. My requirement is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have fields of type packed decimal in my internal table itab. I need to convert the values of packed decimal fields in itab to numeric type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;Data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;            ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;            ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;            menge(15) type p decimals 2,&lt;/P&gt;&lt;P&gt;            netpr(15) type p decimals 2,&lt;/P&gt;&lt;P&gt;          end of itab.  &lt;/P&gt;&lt;P&gt;if itab-menge has a value of 2.00, i need to convert that value to '         200'.  Right justified.&lt;/P&gt;&lt;P&gt;if itab-netpr has a value of 1,234.56, i need to convert that to '         123456'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above internal table itab is passed to the Function module GUI_DOWNLOAD and the itab data is downloaded to a text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to acheive this objective.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:12:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348274#M1398478</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-11-11T06:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348275#M1398479</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;Create one data : var(15) with type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use Write To statment to dis.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WRITE variable TO VAR NO-GAP.
        CONDENSE VAR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE ',' WITH SPACE INTO variable.
             CONDENSE variable NO-GAPS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:22:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348275#M1398479</guid>
      <dc:creator>NAeda</dc:creator>
      <dc:date>2009-11-11T06:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348276#M1398480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i tried your suggestion. &lt;/P&gt;&lt;P&gt;i created 2 variables.&lt;/P&gt;&lt;P&gt;data: v_char(14) type c,&lt;/P&gt;&lt;P&gt;         v_pack(14) type p decimals 2 value '21223.86'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first option is not applicable in ths scenario. i tried the second option too and this is working fine for removing the comma(,) from inbetween the value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to convert the value 21223.86 to 2122386. without any decimals. Can you help me on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:40:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348276#M1398480</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-11-11T06:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348277#M1398481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: var1 type p decimals 2,
      var2 type string.

      var1 = '1234.56'.
      write: var1.
      var2 = var1.

      replace '.' with space into var2.
      replace ',' with space into var2.

      condense var2 no-gaps.

      write:/ var2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348277#M1398481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-11T06:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348278#M1398482</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;You can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT at '.' into v1 v2&lt;/P&gt;&lt;P&gt;concatenate v1 v2 into vv1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZDN_TEST_001 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_var1(15) type p decimals 2 value '123.00'.&lt;/P&gt;&lt;P&gt;data: lv_var2(15) type p decimals 5 value '123.12121'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_varc1(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc2(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc1d(2) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc2d(5) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc11(15) type c.&lt;/P&gt;&lt;P&gt;data: lv_varc21(15) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_var1.&lt;/P&gt;&lt;P&gt;write:/ lv_var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*1)write &amp;amp; REPLACE.&lt;/P&gt;&lt;P&gt;write lv_var1 to lv_varc1.&lt;/P&gt;&lt;P&gt;write lv_var2 to lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE '.' WITH SPACE INTO lv_varc1.&lt;/P&gt;&lt;P&gt;             CONDENSE lv_varc1 NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE '.' WITH SPACE INTO lv_varc2.&lt;/P&gt;&lt;P&gt;             CONDENSE lv_varc2 NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_varc1.&lt;/P&gt;&lt;P&gt;write:/ lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*2)split &amp;amp; concatinate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write lv_var1 to lv_varc1.&lt;/P&gt;&lt;P&gt;write lv_var2 to lv_varc2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lv_varc1 at '.' into lv_varc1 lv_varc1d.&lt;/P&gt;&lt;P&gt;concatenate lv_varc1 lv_varc1d into lv_varc11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lv_varc2 at '.' into lv_varc2 lv_varc2d.&lt;/P&gt;&lt;P&gt;concatenate lv_varc2 lv_varc2d into lv_varc21.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ lv_varc11.&lt;/P&gt;&lt;P&gt;write:/ lv_varc21.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:59:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348278#M1398482</guid>
      <dc:creator>nelsonkarunakar_darla2</dc:creator>
      <dc:date>2009-11-11T06:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion from packed to numeric</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348279#M1398483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vikranth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; thanks for your reply. i was able to perform the desired function with your help. The process of removing '.' is similar to ','. i should have got the idea, but somehow i didnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 07:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-conversion-from-packed-to-numeric/m-p/6348279#M1398483</guid>
      <dc:creator>rnb86</dc:creator>
      <dc:date>2009-11-11T07:03:27Z</dc:date>
    </item>
  </channel>
</rss>

