<?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: getting sy-subrc = 4 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571373#M1432861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check your Ztable whether in Select as well as in where condition same name exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probelm occurs due to field mismatch.&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;Arbind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jan 2010 09:07:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-27T09:07:51Z</dc:date>
    <item>
      <title>getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571372#M1432860</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 my select statement giving sy-subrc = 4.&lt;/P&gt;&lt;P&gt;please tell me why? i am fetchind data from  a view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types:begin of zv_mast_stko,&lt;/P&gt;&lt;P&gt;      matnr type zv_mast_stko-matnr,&lt;/P&gt;&lt;P&gt;      werks type zv_mast_stko-werks,&lt;/P&gt;&lt;P&gt;      stlal type zv_mast_stko-stlal,&lt;/P&gt;&lt;P&gt;      end of zv_mast_stko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:gt_mast type table of zv_mast_stko,&lt;/P&gt;&lt;P&gt;     gs_mast LIKE LINE OF gt_mast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gv_repid = sy-repid.    "report id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r_lkenz-sign = 'I'.&lt;/P&gt;&lt;P&gt;  r_lkenz-option = 'NE'.&lt;/P&gt;&lt;P&gt;  r_lkenz-low = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND r_lkenz.&lt;/P&gt;&lt;P&gt;  clear  r_lkenz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr&lt;/P&gt;&lt;P&gt;       werks&lt;/P&gt;&lt;P&gt;       STLAL&lt;/P&gt;&lt;P&gt;       FROM  zv_mast_stko&lt;/P&gt;&lt;P&gt;        INTO  TABLE gt_mast&lt;/P&gt;&lt;P&gt;       WHERE  matnr IN so_matnr&lt;/P&gt;&lt;P&gt;         AND  werks in so_werks&lt;/P&gt;&lt;P&gt;         AND  stlal EQ po_stlal&lt;/P&gt;&lt;P&gt;         AND  stlst EQ po_stlst&lt;/P&gt;&lt;P&gt;         and  lkenz IN r_lkenz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571372#M1432860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571373#M1432861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check your Ztable whether in Select as well as in where condition same name exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probelm occurs due to field mismatch.&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;Arbind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571373#M1432861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571374#M1432862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at you select query it seems as if you are using parameters from a selection screen. Now your select query is written in the initialization event, that means it is being triggered before the user inputs anything on the selection screen.&lt;/P&gt;&lt;P&gt;Before your select query write the statement start-of-selection, to ensure that your select statement is being triggered after the selection screen is input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
start -of-selection.
SELECT matnr
werks
STLAL
FROM zv_mast_stko
INTO TABLE gt_mast
WHERE matnr IN so_matnr
AND werks in so_werks
AND stlal EQ po_stlal
AND stlst EQ po_stlst
and lkenz IN r_lkenz.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571374#M1432862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571375#M1432863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc = 4 - it mean that entries not found for given conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571375#M1432863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571376#M1432864</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;Data is not found in the database table and returns subrc  value = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to se11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enter the table name ZV_MAST_STKO and see if the data is available for your where condition values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data willnot be available for your select with where condition/&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;Nz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571376#M1432864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571377#M1432865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before select Query Use event&lt;STRONG&gt;At-Selection-Screen&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;One more thing do check the same input values in the table to see if any record exists or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manas M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571377#M1432865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571378#M1432866</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;Please try this code - -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;r_lkenz-sign = 'E'.     " Instead 'I' use 'E'
r_lkenz-option = 'EQ'.         " Instead 'NE' use 'EQ'
r_lkenz-low = 'X'.
APPEND r_lkenz.
clear r_lkenz.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571378#M1432866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571379#M1432867</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 is because a result set is empty (no data was found in the database). You should use event START-OF-SELECTION or END-OF-SELECTION instead of INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571379#M1432867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: getting sy-subrc = 4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571380#M1432868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It means that the data was not selected.&lt;/P&gt;&lt;P&gt;Do you have any data matching your selection criteria?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a parameter if nothing is passed then it will compare with blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the parameters po_stlal and po_stlst do not have any value on the selection screen then they would be compared with blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So check the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 09:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-sy-subrc-4/m-p/6571380#M1432868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-27T09:21:13Z</dc:date>
    </item>
  </channel>
</rss>

