<?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: check for value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583861#M591038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;    SELECT single xchpf
          FROM  marc
          INTO  marc-xchpf
          WHERE matnr = collector-matnr
          AND   werks = collector-werks
          AND   xchpf = 'X'.
if sy-subrc = 0. ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write something like that. What does it mean to do SELECT FROM INTO marc-xchpf. Is it the same as using a variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2007 13:17:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-06T13:17:45Z</dc:date>
    <item>
      <title>check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583856#M591033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a particular matnr and werks, I need to check if the batch management has been switched on. If it is on then execute code, else skip the code. I am looking for the most efficient way of doing this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently what I have is &lt;/P&gt;&lt;P&gt;DATA flag TYPE xchar &lt;/P&gt;&lt;P&gt;    SELECT xchpf &lt;/P&gt;&lt;P&gt;          FROM marc &lt;/P&gt;&lt;P&gt;          INTO flag &lt;/P&gt;&lt;P&gt;          WHERE matnr = collector-matnr &lt;/P&gt;&lt;P&gt;          AND      werks = collector-werks &lt;/P&gt;&lt;P&gt;          AND      xchpf = 'X'.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      PERFORM get_classification_data.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont like this code, perhaps something with READ would be better. Any ideas!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Megan Flores&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 12:59:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583856#M591033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T12:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583857#M591034</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;do like this.&lt;/P&gt;&lt;P&gt;DATA xchpf TYPE xchar&lt;/P&gt;&lt;P&gt;SELECT&amp;lt;b&amp;gt; single &amp;lt;/b&amp;gt;xchpf&lt;/P&gt;&lt;P&gt;FROM marc&lt;/P&gt;&lt;P&gt;INTO flag&lt;/P&gt;&lt;P&gt;WHERE matnr = collector-matnr&lt;/P&gt;&lt;P&gt;AND werks = collector-werks&lt;/P&gt;&lt;P&gt;AND xchpf = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;PERFORM get_classification_data.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:02:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583857#M591034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583858#M591035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using &amp;lt;b&amp;gt;SELECT... ENDSELECT&amp;lt;/b&amp;gt;, you can replace the code as below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA xchpf TYPE xchar&lt;/P&gt;&lt;P&gt;SELECT xchpf&lt;/P&gt;&lt;P&gt;FROM marc&lt;/P&gt;&lt;P&gt;INTO &amp;lt;b&amp;gt;ITAB&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE matnr = collector-matnr&lt;/P&gt;&lt;P&gt;AND werks = collector-werks&lt;/P&gt;&lt;P&gt;AND xchpf = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;PERFORM get_classification_data USING &amp;lt;b&amp;gt;itab-flag&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583858#M591035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583859#M591036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you just want to check the existense of record use the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single xchpf &lt;/P&gt;&lt;P&gt;FROM marc &lt;/P&gt;&lt;P&gt;INTO flag &lt;/P&gt;&lt;P&gt;WHERE matnr = collector-matnr &lt;/P&gt;&lt;P&gt;AND werks = collector-werks &lt;/P&gt;&lt;P&gt;AND xchpf = 'X'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;PERFORM get_classification_data.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583859#M591036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583860#M591037</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;using read statement u can read records only from internal table and not from database tables.&lt;/P&gt;&lt;P&gt;if u wanna use read then u have to select all records into internal table and try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; read table itab with key field xchpf = 'X'.&lt;/P&gt;&lt;P&gt;................&lt;/P&gt;&lt;P&gt;............&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;if useful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh Aluri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583860#M591037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583861#M591038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;    SELECT single xchpf
          FROM  marc
          INTO  marc-xchpf
          WHERE matnr = collector-matnr
          AND   werks = collector-werks
          AND   xchpf = 'X'.
if sy-subrc = 0. ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write something like that. What does it mean to do SELECT FROM INTO marc-xchpf. Is it the same as using a variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583861#M591038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: check for value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583862#M591039</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;Using this statement you can select just one field and place it on marc-xchpf or in a variable like marc-xchpf. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Tables MARC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just define a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA v_xchpf TYPE marc-xchpf.

    SELECT single xchpf
          FROM  marc
          INTO  marc-xchpf "or v_xchpf
          WHERE matnr = collector-matnr
          AND   werks = collector-werks
          AND   xchpf = 'X'. "In this case marc-xchpf always be "X"

if sy-subrc = 0. ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-value/m-p/2583862#M591039</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-08-06T13:29:47Z</dc:date>
    </item>
  </channel>
</rss>

