<?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: read in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735419#M899016</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;&lt;STRONG&gt;its present but obselete use it only with internal tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE dbtab [WITH KEY key] &lt;/P&gt;&lt;P&gt;                 [SEARCH {FKEQ|FKGE|GKEQ|GKGE}] &lt;/P&gt;&lt;P&gt;                 [VERSION vers]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variant of the statement READ (not allowed in classes) reads a row from the database table dbtab and assigns the content to the respective table work area. For dbtab, you must specify the name of a database table that begins with "T" and is not longer than five characters. The table work area must have been declared with statement TABLES for database table dbtab. If a database table is specified that does not begin with "T", then the first letter is implicitly replaced by "T". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the addition WITH KEY, the row to be read is determined by the content of the components of the table work area that correspond to the primary key fields of database table dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... WITH KEY key &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;With the addition WITH KEY, the key is determined through the content of data object key for which a flat character-type data type is expected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of the table work area resp. of the data object key is taken from the database table as search key (left-aligned with the length of the key components); then a matching entry is searched in the database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... SEARCH {FKEQ|FKGE|GKEQ|GKGE} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The addition SEARCH determines how the row is searched: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the addition SEARCH and with SEARCH FKEQ, the first row in the database table is searched that matches the withdrawn search key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH GKEQ, you search generically for the first row of the database table that matches the withdrawn search key. The search key treats blanks as if they match all values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH FKGE, the first row of the database table is searched that is larger or equal to the withdrawn search key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH GKGE, you search generically for the first row of the database table that is larger or equal to the withdrawn search key. The search key treats blanks as if they match all values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... VERSION vers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If the addition VERSION is specified, then not the database table dbtab is read, but the table whose name is composed of "T" and the content of vers. For vers, you have to specify a data object of the type c with a maximum length of four characters. If the database table is not available, sy-subrc is set to 12. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of the rows is still assigned to table work area dbtab, on whose type it is also cast onto. If table work area is too short, then sy-subrc is set to 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement is not executed if the database table does not exist or does not comply with the naming conventions stated above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Reading of a row from the database table T100 or another database table that starts with "T". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES t100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p TYPE c LENGTH 4 DEFAULT '100T'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t100-sprsl = 'E'. &lt;/P&gt;&lt;P&gt;t100-arbgb = 'BC'. &lt;/P&gt;&lt;P&gt;t100-msgnr = '010'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t100 SEARCH FKEQ VERSION p. &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Open-SQL-syntax to be used instead reads: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p TYPE c LENGTH 5 DEFAULT 'T100T'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA dref TYPE REF TO data. &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE ANY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA dref TYPE (p). &lt;/P&gt;&lt;P&gt;ASSIGN dref-&amp;gt;* TO &amp;lt;fs&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * &lt;/P&gt;&lt;P&gt;       FROM (p) &lt;/P&gt;&lt;P&gt;       INTO &amp;lt;fs&amp;gt; &lt;/P&gt;&lt;P&gt;       WHERE sprsl = 'E' AND &lt;/P&gt;&lt;P&gt;             arbgb = 'BC' AND &lt;/P&gt;&lt;P&gt;             msgnr = '010'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Apr 2008 05:10:51 GMT</pubDate>
    <dc:creator>prasanth_kasturi</dc:creator>
    <dc:date>2008-04-30T05:10:51Z</dc:date>
    <item>
      <title>read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735417#M899014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can we use an read statement on  a database table&lt;/P&gt;&lt;P&gt;if yes then wat should be the syntax.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735417#M899014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T05:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735418#M899015</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;&lt;STRONG&gt;No we cannot use Read Statement for Database table.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735418#M899015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T05:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735419#M899016</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;&lt;STRONG&gt;its present but obselete use it only with internal tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE dbtab [WITH KEY key] &lt;/P&gt;&lt;P&gt;                 [SEARCH {FKEQ|FKGE|GKEQ|GKGE}] &lt;/P&gt;&lt;P&gt;                 [VERSION vers]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variant of the statement READ (not allowed in classes) reads a row from the database table dbtab and assigns the content to the respective table work area. For dbtab, you must specify the name of a database table that begins with "T" and is not longer than five characters. The table work area must have been declared with statement TABLES for database table dbtab. If a database table is specified that does not begin with "T", then the first letter is implicitly replaced by "T". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the addition WITH KEY, the row to be read is determined by the content of the components of the table work area that correspond to the primary key fields of database table dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... WITH KEY key &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;With the addition WITH KEY, the key is determined through the content of data object key for which a flat character-type data type is expected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of the table work area resp. of the data object key is taken from the database table as search key (left-aligned with the length of the key components); then a matching entry is searched in the database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... SEARCH {FKEQ|FKGE|GKEQ|GKGE} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The addition SEARCH determines how the row is searched: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the addition SEARCH and with SEARCH FKEQ, the first row in the database table is searched that matches the withdrawn search key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH GKEQ, you search generically for the first row of the database table that matches the withdrawn search key. The search key treats blanks as if they match all values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH FKGE, the first row of the database table is searched that is larger or equal to the withdrawn search key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SEARCH GKGE, you search generically for the first row of the database table that is larger or equal to the withdrawn search key. The search key treats blanks as if they match all values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... VERSION vers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If the addition VERSION is specified, then not the database table dbtab is read, but the table whose name is composed of "T" and the content of vers. For vers, you have to specify a data object of the type c with a maximum length of four characters. If the database table is not available, sy-subrc is set to 12. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of the rows is still assigned to table work area dbtab, on whose type it is also cast onto. If table work area is too short, then sy-subrc is set to 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement is not executed if the database table does not exist or does not comply with the naming conventions stated above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Reading of a row from the database table T100 or another database table that starts with "T". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES t100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p TYPE c LENGTH 4 DEFAULT '100T'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t100-sprsl = 'E'. &lt;/P&gt;&lt;P&gt;t100-arbgb = 'BC'. &lt;/P&gt;&lt;P&gt;t100-msgnr = '010'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t100 SEARCH FKEQ VERSION p. &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Open-SQL-syntax to be used instead reads: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p TYPE c LENGTH 5 DEFAULT 'T100T'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA dref TYPE REF TO data. &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE ANY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA dref TYPE (p). &lt;/P&gt;&lt;P&gt;ASSIGN dref-&amp;gt;* TO &amp;lt;fs&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * &lt;/P&gt;&lt;P&gt;       FROM (p) &lt;/P&gt;&lt;P&gt;       INTO &amp;lt;fs&amp;gt; &lt;/P&gt;&lt;P&gt;       WHERE sprsl = 'E' AND &lt;/P&gt;&lt;P&gt;             arbgb = 'BC' AND &lt;/P&gt;&lt;P&gt;             msgnr = '010'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:10:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735419#M899016</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-04-30T05:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735420#M899017</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; No you cannot use read statement for reading the database table as it is obsolete . It is used only to read internal tables.. Use select statement to fetch the data from database tables...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select single * from mara where matnr = p_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:10:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735420#M899017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T05:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735421#M899018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;read table dbtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is helpfull pls reward me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srimanta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:13:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735421#M899018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T05:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735422#M899019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Read Table is used for reading internal tables record line by line&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735422#M899019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T05:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735423#M899020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;No you cannot use READ Statement to read from DB Table.You can use SELECT Statement to read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 05:25:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read/m-p/3735423#M899020</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2008-04-30T05:25:41Z</dc:date>
    </item>
  </channel>
</rss>

