<?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: Select Statement - from Decimal Fields into Char in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146826#M1367848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If LTXW0F02 is your program and form extract_txw_taxcod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  select * from t007a
           into corresponding fields of table t_txw_taxcod.

  sort t_txw_taxcod.
  loop at t_txw_taxcod.
    select single * from t007s
                    where spras = sy-langu
                      and kalsm = t_txw_taxcod-kalsm
                      and mwskz = t_txw_taxcod-mwskz.
    if sy-subrc = 0.
      move-corresponding t007s to t_txw_taxcod.
    endif.
    call function 'TXW_SEGMENT_RECORD_EXPORT'
      exporting
        data_record = t_txw_taxcod.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the function module TXW_SEGMENY_RECORD_EXPORT have implicit enhancements try to use then and make one more select to table t007s using key KALSM and fill the char field TOLERENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 select tolerence from t007a into v_tolerence
          where kalsm = t_txw_taxcod-kalsm.
   write: v_tolerence to t_txw-taxcod-tolerence.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Sep 2009 13:31:25 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-09-02T13:31:25Z</dc:date>
    <item>
      <title>Select Statement - from Decimal Fields into Char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146825#M1367847</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 run a SELECT from table T007A into an internal table which is of type TXW_TAXCOD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T007A has a decimal field in it ( TOLERANCE ) which is of data type DEC, length of 3 and 1 decimal place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code in the standard program -- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from t007a
         into corresponding fields of table t_txw_taxcod up to 20 rows.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to make the TOLERANCE field value in T007A land up in a character field in the structure, I have declared the TOLERANCE field in structure TXW_TAXCOD as a character field of type 5 (infact tried CHAR4 and CHAR8 etc etc) but I face a runtime error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot change the code in standard program, can you please tell me what other data type can I use to make this select work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 13:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146825#M1367847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T13:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement - from Decimal Fields into Char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146826#M1367848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If LTXW0F02 is your program and form extract_txw_taxcod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  select * from t007a
           into corresponding fields of table t_txw_taxcod.

  sort t_txw_taxcod.
  loop at t_txw_taxcod.
    select single * from t007s
                    where spras = sy-langu
                      and kalsm = t_txw_taxcod-kalsm
                      and mwskz = t_txw_taxcod-mwskz.
    if sy-subrc = 0.
      move-corresponding t007s to t_txw_taxcod.
    endif.
    call function 'TXW_SEGMENT_RECORD_EXPORT'
      exporting
        data_record = t_txw_taxcod.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the function module TXW_SEGMENY_RECORD_EXPORT have implicit enhancements try to use then and make one more select to table t007s using key KALSM and fill the char field TOLERENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 select tolerence from t007a into v_tolerence
          where kalsm = t_txw_taxcod-kalsm.
   write: v_tolerence to t_txw-taxcod-tolerence.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 13:31:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146826#M1367848</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-02T13:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement - from Decimal Fields into Char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146827#M1367849</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;The target structure has to have fields having the same type  of the fields of source structure while selecting, and transform the data after selecting them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u need to change the ABAP code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 13:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146827#M1367849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T13:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement - from Decimal Fields into Char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146828#M1367850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well cannot change the ABAP code as it is standard SAP code, so I need to make a select based on primary field in the user exit FTXW0001...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 13:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-from-decimal-fields-into-char/m-p/6146828#M1367850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T13:39:38Z</dc:date>
    </item>
  </channel>
</rss>

