<?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 ABAP Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384939#M529910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please see my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT   land1 adrnr&lt;/P&gt;&lt;P&gt;               FROM vbpa INTO (lf_land1 , lf_adrnr)&lt;/P&gt;&lt;P&gt;               WHERE vbeln = l_likps_wa-vgbel AND&lt;/P&gt;&lt;P&gt;               parvw  = 'WE' AND&lt;/P&gt;&lt;P&gt;               land1 IN im_land1 AND&lt;/P&gt;&lt;P&gt;               posnr = '000000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          SELECT   land1 adrnr&lt;/P&gt;&lt;P&gt;                   FROM vbpa INTO (lf_land1 , lf_adrnr)&lt;/P&gt;&lt;P&gt;                   WHERE vbeln = l_likps_wa-vbeln AND&lt;/P&gt;&lt;P&gt;                   parvw  = 'WE' AND&lt;/P&gt;&lt;P&gt;                   land1 IN im_land1 AND&lt;/P&gt;&lt;P&gt;                   posnr = '000000'.&lt;/P&gt;&lt;P&gt;          ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to debug it ....the cursor is just jumping from select to endselect after the first select is sy-subrc = 4.&lt;/P&gt;&lt;P&gt;I tried commenting each part of the where condition ...&lt;/P&gt;&lt;P&gt;the problem is with the              &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  land1 IN im_land1 AND&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here im_land1 is comming from the selection screen.&lt;/P&gt;&lt;P&gt;what can I do to avoid this?&lt;/P&gt;&lt;P&gt;please help ASAP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 16:17:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-14T16:17:30Z</dc:date>
    <item>
      <title>ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384939#M529910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please see my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT   land1 adrnr&lt;/P&gt;&lt;P&gt;               FROM vbpa INTO (lf_land1 , lf_adrnr)&lt;/P&gt;&lt;P&gt;               WHERE vbeln = l_likps_wa-vgbel AND&lt;/P&gt;&lt;P&gt;               parvw  = 'WE' AND&lt;/P&gt;&lt;P&gt;               land1 IN im_land1 AND&lt;/P&gt;&lt;P&gt;               posnr = '000000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          SELECT   land1 adrnr&lt;/P&gt;&lt;P&gt;                   FROM vbpa INTO (lf_land1 , lf_adrnr)&lt;/P&gt;&lt;P&gt;                   WHERE vbeln = l_likps_wa-vbeln AND&lt;/P&gt;&lt;P&gt;                   parvw  = 'WE' AND&lt;/P&gt;&lt;P&gt;                   land1 IN im_land1 AND&lt;/P&gt;&lt;P&gt;                   posnr = '000000'.&lt;/P&gt;&lt;P&gt;          ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to debug it ....the cursor is just jumping from select to endselect after the first select is sy-subrc = 4.&lt;/P&gt;&lt;P&gt;I tried commenting each part of the where condition ...&lt;/P&gt;&lt;P&gt;the problem is with the              &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  land1 IN im_land1 AND&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here im_land1 is comming from the selection screen.&lt;/P&gt;&lt;P&gt;what can I do to avoid this?&lt;/P&gt;&lt;P&gt;please help ASAP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 16:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384939#M529910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T16:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384940#M529911</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;  Give in the select option Land1 the correct entry then execute. May be with the country u r giving u dont have data in the database table and also check with the other condition which u gave with and option, check in the database table by giving these 2 values whether u have entries with these two values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 16:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384940#M529911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T16:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384941#M529912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I don't have data ...I should see the cursor going to the next select..I can't...that is what is my problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        ramana peddu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 16:23:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384941#M529912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T16:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384942#M529913</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;U've to place the second SELECT out of the first one, because if it fails the system'll not run the code beetween SELECT/ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
                                                  WHERE vbeln = l_likps_wa-vgbel AND
                                                               parvw = 'WE' AND
                                                               land1 IN im_land1 AND
                                                              posnr = '000000'.
*  IF sy-subrc &amp;lt;&amp;gt; 0.
*
*    SELECT land1 adrnr
*    FROM vbpa INTO (lf_land1 , lf_adrnr)
*    WHERE vbeln = l_likps_wa-vbeln AND
*    parvw = 'WE' AND
*    land1 IN im_land1 AND
*    posnr = '000000'.
*    ENDSELECT.
*
*  ENDIF.
ENDSELECT.
IF sy-subrc &amp;lt;&amp;gt; 0.
  SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
                                                    WHERE vbeln = l_likps_wa-vbeln AND
                                                                 parvw = 'WE' AND
                                                                 land1 IN im_land1 AND
                                                                 posnr = '000000'.
  ENDSELECT.

ENDIF.&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>Thu, 14 Jun 2007 16:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code/m-p/2384942#M529913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T16:24:27Z</dc:date>
    </item>
  </channel>
</rss>

