<?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: Reading any value from table into a string (Especially date etc..) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487561#M838526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select single &lt;/P&gt;&lt;P&gt;           field1 from table &lt;/P&gt;&lt;P&gt;            into v_field&lt;/P&gt;&lt;P&gt;            where field1 = p_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 10:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 14:40:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T14:40:15Z</dc:date>
    <item>
      <title>Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487560#M838525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would I read any value from a table into a string? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently doing the following...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ret_val type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single (wa_map-qes_field) from z_qekko into ret_val&lt;/P&gt;&lt;P&gt; where&lt;/P&gt;&lt;P&gt; angnr = _angnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the source field is a date it bombs though. &lt;/P&gt;&lt;P&gt;The result goes into a BDCDATA-fval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Dylan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:36:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487560#M838525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487561#M838526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select single &lt;/P&gt;&lt;P&gt;           field1 from table &lt;/P&gt;&lt;P&gt;            into v_field&lt;/P&gt;&lt;P&gt;            where field1 = p_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 10:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487561#M838526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487562#M838527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not logged into a system at the moment, so can't check precisely, but you could do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_field TYPE fieldname.

DATA: lp_data TYPE REF TO DATA.
FIELD-SYMBOLS: &amp;lt;value&amp;gt;.

CREATE DATA lp_data LIKE (p_field).
ASSIGN lp_data-&amp;gt;* TO &amp;lt;value&amp;gt;.

SELECT SINGLE (fieldname) FROM table INTO &amp;lt;value&amp;gt; WHERE... &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487562#M838527</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-02-29T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487563#M838528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be I dont understand your solution but, that is even less generic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you notice that the field is determined via select single &lt;STRONG&gt;(field_to_read)&lt;/STRONG&gt; from into &lt;STRONG&gt;generic_type_of some sort&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what data type did you use for v_field ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wouldnt the solution require some type of &amp;lt;fs&amp;gt;?&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;Dylan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:46:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487563#M838528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487564#M838529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That looks good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will try it out now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dylan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487564#M838529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487565#M838530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tables:mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:v_matnr like mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matnr&lt;/P&gt;&lt;P&gt;             from mara&lt;/P&gt;&lt;P&gt;             into v_matnr&lt;/P&gt;&lt;P&gt;             where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ v_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;venkat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 10:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487565#M838530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487566#M838531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1    DATA: lp_data TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt; 2    FIELD-SYMBOLS: &amp;lt;value&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; 3    CREATE DATA lp_data LIKE (wa_map-qes_field).&lt;/P&gt;&lt;P&gt; 4    ASSIGN lp_data-&amp;gt;* TO &amp;lt;value&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; 5    SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO &amp;lt;value&amp;gt; WHERE angnr = _angnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Complains that (wa_map-qes_field) is not defined in line 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think that the bracket thing is only available via SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about CREATE DATA lp_data type ref to object. ? &lt;/P&gt;&lt;P&gt;Would the above declaration work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 14:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487566#M838531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T14:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487567#M838532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REF TO OBJECT won't work.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you do CREATE DATA lp_data &lt;STRONG&gt;TYPE&lt;/STRONG&gt; (wa_map-qes_field). ?  Sorry - I like to check things before posting, but as I said, I've not got a system to log into today!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can probably use RTTS - if your SAP version is high enough - to determine the correct type.  Search on RTTS - there's some good documentation in SDN on it, with worked examples.  [like this one.|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487567#M838532</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-02-29T15:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reading any value from table into a string (Especially date etc..)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487568#M838533</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 changed it to TYPE anyway and it worked. &lt;/P&gt;&lt;P&gt;Thanks, for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dylan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 15:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-any-value-from-table-into-a-string-especially-date-etc/m-p/3487568#M838533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T15:23:30Z</dc:date>
    </item>
  </channel>
</rss>

