<?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: problem with sy-subrc in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403850#M535697</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;It means:&lt;/P&gt;&lt;P&gt;Row not found. If the entry was determined with a binary search, then sy-tabix is set to the table index of the entry before which it would have to be inserted with INSERT ... INDEX ..., if you want to keep the sorting order. This is the case if the addition table_key or free_key was specified for a beginning part of the table key of sorted tables, or if the addition BINARY SEARCH was specified explicitly. Otherwise, sy-tabix is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at l_eket_obj .&lt;/P&gt;&lt;P&gt;loop at itab where werks = l_eket_obj-werks and matnr = l_eket_obj-matnr.&lt;/P&gt;&lt;P&gt;itab-zamowione = l_eket_obj-objednane.&lt;/P&gt;&lt;P&gt;modify itab transporting zamowione&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jun 2007 08:23:17 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-06-29T08:23:17Z</dc:date>
    <item>
      <title>problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403848#M535695</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 have part of code:&lt;/P&gt;&lt;P&gt;loop at l_eket_obj .&lt;/P&gt;&lt;P&gt;read table itab with key werks = l_eket_obj-werks&lt;/P&gt;&lt;P&gt;                                   matnr = l_eket_obj-matnr.&lt;/P&gt;&lt;P&gt;if sy-subrc =  0.&lt;/P&gt;&lt;P&gt;itab-zamowione = l_eket_obj-objednane.&lt;/P&gt;&lt;P&gt;modify itab transporting zamowione where werks = l_eket_obj-werks and&lt;/P&gt;&lt;P&gt;                                   matnr = l_eket_obj-matnr.&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;sy-subrc returns value 4. What does it mean? How solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403848#M535695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403849#M535696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the  below sample code  .... here   from work area to  INTERNAL TABLE  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so  you should have and  other internal table  or the work area to  modify your table  ... and ofcus   the  internal table  should be  Unique   also .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_carrid TYPE sflight-carrid, 
            p_connid TYPE sflight-connid, 
            p_plane1 TYPE sflight-planetype, 
            p_plane2 TYPE sflight-planetype. 

DATA sflight_tab TYPE SORTED TABLE OF sflight 
                 WITH UNIQUE KEY carrid connid fldate. 

DATA sflight_wa TYPE sflight. 

SELECT * 
       FROM sflight 
       INTO TABLE sflight_tab 
       WHERE carrid = p_carrid AND 
             connid = p_connid. 

sflight_wa-planetype = p_plane2. 

MODIFY sflight_tab FROM sflight_wa 
       TRANSPORTING planetype WHERE planetype = p_plane1. 



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points if it is usefull ....&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403849#M535696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403850#M535697</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;It means:&lt;/P&gt;&lt;P&gt;Row not found. If the entry was determined with a binary search, then sy-tabix is set to the table index of the entry before which it would have to be inserted with INSERT ... INDEX ..., if you want to keep the sorting order. This is the case if the addition table_key or free_key was specified for a beginning part of the table key of sorted tables, or if the addition BINARY SEARCH was specified explicitly. Otherwise, sy-tabix is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at l_eket_obj .&lt;/P&gt;&lt;P&gt;loop at itab where werks = l_eket_obj-werks and matnr = l_eket_obj-matnr.&lt;/P&gt;&lt;P&gt;itab-zamowione = l_eket_obj-objednane.&lt;/P&gt;&lt;P&gt;modify itab transporting zamowione&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:23:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403850#M535697</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-29T08:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403851#M535698</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;sy-subrc = 4 means there is no record found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you think the record is there then jus make sure that in the read stmt &lt;/P&gt;&lt;P&gt;where you u have put with key  ..the fields shud be in same order as it is in internal table. if the order differs the o/p will be 4. fst sort itab by werks matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use binary serch with ur stmt.&lt;/P&gt;&lt;P&gt;then it will definately work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AZAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 10:00:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403851#M535698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T10:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403852#M535699</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 sy-subrc eq 4 after read statement, that particular data is not in itab.Here important thing you can have sy-subrc values for most of the statements.So you should be careful while debuggin that whether you are getting the sy-subrc = 4 immediately after read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using read statement, it is always a good progrmaming practice to clear the workarea.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 10:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403852#M535699</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-29T10:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403853#M535700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks u all for help.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Joanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 11:38:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sy-subrc/m-p/2403853#M535700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T11:38:29Z</dc:date>
    </item>
  </channel>
</rss>

