<?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 insert records to data base table from char format into decimal fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170166#M1517153</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 need to insert records into a custom table from an internal table that has all the data in the character format. Few fields in the custom table are in decimal format. It is giving an Unciode not convertible error. How to fix this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using field symbols..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: ZA.&lt;/P&gt;&lt;P&gt;field symbols: &amp;lt;fs_table&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried declaring &amp;lt;fs_table&amp;gt; type standard table it threw me an error.&lt;/P&gt;&lt;P&gt;i_wsmerg is an internal table with the same fields but data all in character format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data is in &lt;/P&gt;&lt;P&gt;loop at i_wsmerg.&lt;/P&gt;&lt;P&gt;  assign i_wsmerg to &amp;lt;fs_table&amp;gt; CASTING TYPE ZA.&lt;/P&gt;&lt;P&gt;      modify ZA from &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;           commit work.&lt;/P&gt;&lt;P&gt;   endloop.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any thoughts how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 19:19:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-18T19:19:24Z</dc:date>
    <item>
      <title>insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170166#M1517153</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 need to insert records into a custom table from an internal table that has all the data in the character format. Few fields in the custom table are in decimal format. It is giving an Unciode not convertible error. How to fix this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using field symbols..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: ZA.&lt;/P&gt;&lt;P&gt;field symbols: &amp;lt;fs_table&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried declaring &amp;lt;fs_table&amp;gt; type standard table it threw me an error.&lt;/P&gt;&lt;P&gt;i_wsmerg is an internal table with the same fields but data all in character format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data is in &lt;/P&gt;&lt;P&gt;loop at i_wsmerg.&lt;/P&gt;&lt;P&gt;  assign i_wsmerg to &amp;lt;fs_table&amp;gt; CASTING TYPE ZA.&lt;/P&gt;&lt;P&gt;      modify ZA from &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;           commit work.&lt;/P&gt;&lt;P&gt;   endloop.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any thoughts how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 19:19:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170166#M1517153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T19:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170167#M1517154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Internal table should have same format as database table.  If not, you should move records from one workarea to other with proper format before update database table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  it_za TYPE STANDARD TABLE OF za,
  wa_za LIKE LINES OF it_za.

LOOP AT i_wsmerg.
* Move fields from i_wsmerg to wa_za.  Do tranformations if you need.
  wa_za = it_wsmerg.
  APPEND wa_za TO it_za.
ENDLOOP.

MODIFY za FROM TABLE it_za.
COMMIT WORK.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 19:42:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170167#M1517154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T19:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170168#M1517155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I insert the record at one go by using some thing like CASTING operation.  I got an error 'Conversion over flow' while reading the data from the work area(character) into the internal table (decimal) format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of records are high,  I was trying to achieve this using field symbols, but the CASTINGoperation to convert the character to decimal did not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 20:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170168#M1517155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T20:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170169#M1517156</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 avoid field symbols in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ls_za type za.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_wsmerg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: i_wsmerg-field1 to ls_za-field1,&lt;/P&gt;&lt;P&gt;          i_wsmerg-field2 to ls_za-field2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          i_wsmerg-fieldn to ls_za-fieldn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify ZA from ls_za.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may help you.&lt;/P&gt;&lt;P&gt;Goodluck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 05:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170169#M1517156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-19T05:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170170#M1517157</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;   if you have fields in character format  and want to push that data in   decimal fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   that is in my sql right  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then do this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :   quantity(13) type c value '1300.00',&lt;/P&gt;&lt;P&gt;DATA : qty(13) TYPE n .&lt;/P&gt;&lt;P&gt;DATA   qty1 TYPE p DECIMALS 3 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;qty = quantity .&lt;/P&gt;&lt;P&gt;qty1 = qty  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 05:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170170#M1517157</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2010-08-19T05:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170171#M1517158</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;Thanks for the response. Both did not work.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 12:25:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170171#M1517158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-19T12:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170172#M1517159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I usually do a little differently....I handle fields at the index level within each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I have a field symbol of type any, I also have some generic variables like lv_p(15) type p decimals 2, lv_i type i, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the &amp;lt;field-symbol&amp;gt; for a field is assigned, the set the LV_ variable equal to &amp;lt;field-symbol&amp;gt;.  compute into other variables if conversion is required, then assign &amp;lt;field-symbol&amp;gt; = the lv_ variable last used.... with casting type whatever.  The original &amp;lt;field-symbol&amp;gt; pointer now points to the data in the correct format....  You can then proceed with putting the data pointed to into the right column in your structure....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has always worked for me when using the assign component sy-index of structure &amp;lt;name&amp;gt; to &amp;lt;field-symbol&amp;gt; approach, utilized inside an internal table loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 12:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170172#M1517159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-19T12:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170173#M1517160</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;Thanks for the response. I might have to change the logic here. it worked when I read the character data into a variable of type p . but the problem is..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I have avalue  var1 = '00176'. and I read the data into decimal variable it reads '176.00' but I want '1.76'.&lt;/P&gt;&lt;P&gt;similarly, I have another var2 = '0123478' if I read the data into decimal variable it has to read  '01234.78'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have five fields withing the internal table to change their values to decimal. Is there an FM for this that would speed up the process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts? Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 13:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170173#M1517160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-19T13:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170174#M1517161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Divide the variable by 100 after putting value into it.... like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_var1 = lv_var1 / 100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No real benefit from calling FM....I use the same local variable over and over again, so long as same data type....just assign back to &amp;lt;fs&amp;gt; and then put into right column in your structure, before putting the next value to be converted into the variable.  Or if you're processing a work area at a time...use 5 fields as it would appear you're doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 14:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170174#M1517161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-19T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: insert records to data base table from char format into decimal fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170175#M1517162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 15:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-to-data-base-table-from-char-format-into-decimal-fields/m-p/7170175#M1517162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-03T15:01:08Z</dc:date>
    </item>
  </channel>
</rss>

