<?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 table return sy-subrc = 4 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034764#M964350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;this is the code. why sy-subrc returns 4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at hbsid where umskz = 'A' and blart &amp;lt;&amp;gt; 'DZ' and&lt;/P&gt;&lt;P&gt;                    rebzg &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;    v_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;      read table hbsid_ind with key rebzg = hbsid-belnr&lt;/P&gt;&lt;P&gt;                                    kunnr = hbsid-kunnr&lt;/P&gt;&lt;P&gt;                                    gjahr = hbsid-gjahr.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      move hbsid_ind-budat to hbsid-budat.&lt;/P&gt;&lt;P&gt;      move hbsid_ind-bldat to hbsid-bldat.&lt;/P&gt;&lt;P&gt;      modify hbsid index v_tabix transporting budat bldat.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2008 12:37:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-20T12:37:12Z</dc:date>
    <item>
      <title>read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034754#M964340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;may i know why the read can map a record but why sy-subrc returns 4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at int_tab.&lt;/P&gt;&lt;P&gt;if int_tab-blart &amp;lt;&amp;gt; 'DZ'.&lt;/P&gt;&lt;P&gt; read table int_t2 with key kunnr = int_tab-kunnr&lt;/P&gt;&lt;P&gt;                                      gjahr = int_tab-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move.....&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 11:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034754#M964340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T11:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034755#M964341</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;In debugging check the int_tab values for int_tab-kunnr&lt;/P&gt;&lt;P&gt;int_tab-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034755#M964341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034756#M964342</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;In your code the sy-subrc checks for the assignment of gjahr as the sy-subrc value is placed after the assignment statement and hence inspite of read statement finding a record sy-subrc may return 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 20, 2008 9:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:03:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034756#M964342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034757#M964343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i checked already and the read table parameter with value assigned but yet return 4.&lt;/P&gt;&lt;P&gt;why?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034757#M964343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034758#M964344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table int_t2 with key kunnr = int_tab-kunnr&lt;/P&gt;&lt;P&gt;gjahr = int_tab-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are not clearing the header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; the first time your if condition is correct you happen to find an entry with your read statement, later on when the if is true again you don't happen to find anything but the header line of int_t2 is still filled with the previous value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So before doing the read, just add a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear int_t2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034758#M964344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034759#M964345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Write gjahr = int_tab-gjahr after the if condition. The if condition should be after the read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:07:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034759#M964345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034760#M964346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your sy-subrc NE 0 that means defenetly its not getting values as per your condition.if its so then it will not move values also.check for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 20, 2008 9:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034760#M964346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034761#M964347</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;in the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at int_tab.&lt;/P&gt;&lt;P&gt;if int_tab-blart eq 'DZ'.&lt;/P&gt;&lt;P&gt;read table int_t2 with key kunnr = int_tab-kunnr&lt;/P&gt;&lt;P&gt;gjahr = int_tab-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move.....&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try doing a clear int_t2 and then see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my opinion the value placed in int_t2 is the previous record's one. The new record does not matches the criteria and hence sy-subrc = 4. But if a data is not found then the previous record's value is not cleared off..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Clear statement and it should confirm ...&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034761#M964347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034762#M964348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure it returns sy-subrc 4 inspite it reads a record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check once again, Clear your work area before the read statement. Check if it is getting filled after READ statement. It might be a case where the workarea already has some data and read actually fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:09:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034762#M964348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034763#M964349</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 possible paste ur code here, so we can check why sy-subrc is not equal to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:20:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034763#M964349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034764#M964350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;this is the code. why sy-subrc returns 4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at hbsid where umskz = 'A' and blart &amp;lt;&amp;gt; 'DZ' and&lt;/P&gt;&lt;P&gt;                    rebzg &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;    v_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;      read table hbsid_ind with key rebzg = hbsid-belnr&lt;/P&gt;&lt;P&gt;                                    kunnr = hbsid-kunnr&lt;/P&gt;&lt;P&gt;                                    gjahr = hbsid-gjahr.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      move hbsid_ind-budat to hbsid-budat.&lt;/P&gt;&lt;P&gt;      move hbsid_ind-bldat to hbsid-bldat.&lt;/P&gt;&lt;P&gt;      modify hbsid index v_tabix transporting budat bldat.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:37:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034764#M964350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034765#M964351</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;read table hbsid_ind with key rebzg = hbsid-belnr&lt;/P&gt;&lt;P&gt;kunnr = hbsid-kunnr&lt;/P&gt;&lt;P&gt;gjahr = hbsid-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this read statement, sy-subrc is not equal to 0, &lt;/P&gt;&lt;P&gt; hbsid-belnr&lt;/P&gt;&lt;P&gt; hbsid-kunnr&lt;/P&gt;&lt;P&gt; hbsid-gjahr &lt;/P&gt;&lt;P&gt;this three fields your getting from another internal table, check  whether your getting the values for this three fields or not in debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if possible paste full code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034765#M964351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034766#M964352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;these 3 fields &lt;/P&gt;&lt;P&gt;hbsid-belnr&lt;/P&gt;&lt;P&gt;hbsid-kunnr&lt;/P&gt;&lt;P&gt;hbsid-gjahr&lt;/P&gt;&lt;P&gt;having value during debug and also hbsid_ind has the same record which can match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i post after the debug and testing. if due to no value, i will not ask here.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 12:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034766#M964352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T12:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034767#M964353</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;    Try by adding BINARY SEARCH in your read statement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; "Read table hbsid_ind with key rebzg = hbsid-belnr&lt;/P&gt;&lt;P&gt; kunnr = hbsid-kunnr&lt;/P&gt;&lt;P&gt; gjahr = hbsid-gjahr  &lt;STRONG&gt;Binary search&lt;/STRONG&gt;. "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034767#M964353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T13:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034768#M964354</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 iam not wrong your trying some thing like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: 
  i_sbook TYPE TABLE OF sbook,
  w_sbook LIKE LINE OF i_sbook.
DATA:
  i_sflight TYPE TABLE OF sflight,
  w_sflight LIKE LINE OF i_sflight.

SELECT carrid connid
  FROM sbook
  INTO CORRESPONDING FIELDS OF TABLE i_sbook.

SELECT carrid connid fldate seatsmax seatsocc
  FROM sflight
  INTO CORRESPONDING FIELDS OF  TABLE i_sflight.

LOOP AT i_sbook INTO w_sbook.

  SORT i_sflight BY carrid connid.
  READ TABLE i_sflight INTO w_sflight WITH KEY
                                carrid = w_sbook-carrid
                                connid = w_sbook-connid.
  IF sy-subrc EQ 0.
*move.......
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so run this code and check sy-subrc value.&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;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034768#M964354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T13:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034769#M964355</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;Something is wrong in your code, if SY-SUBRC is equal to 4 it means the matching is fails and so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- or there isn't the record you're searching&lt;/P&gt;&lt;P&gt;- or the keys used for reading are wrong&lt;/P&gt;&lt;P&gt;- or the way you're using to read the table is wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;read table hbsid_ind with key rebzg = hbsid-belnr
                                           kunnr = hbsid-kunnr
                                           gjahr = hbsid-gjahr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now are u sure the code above is right? If you're looking for the document linked to the current document, it can be the documents belong to different fyscal years, I think the correct code should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;read table hbsid_ind with key KUNNR = hbsid-kunnr
                                           REBZG = hbsid-belnr
                                           REBZJ  = hbsid-gjahr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034769#M964355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T13:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034770#M964356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks. resolved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:46:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034770#M964356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T13:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: read table return sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034771#M964357</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;Where is the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:47:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-return-sy-subrc-4/m-p/4034771#M964357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T13:47:49Z</dc:date>
    </item>
  </channel>
</rss>

