<?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 select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738613#M321116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE 
AUFNR
PRIOK
EQUNR
ILOAN
GEWRK
WARPL
LAUFN 
INTO (AFIH-AUFNR, AFIH-PRIOK, AFIH-EQUNR, AFIH-ILOAN, AFIH-GEWRK, AFIH-WARPL, AFIH-LAUFN)
FROM AFIH WHERE AUFNR = S_AUFNR.

IF SY-SUBRC = 0
  T_AUFNR  = AFIH-AUFNR.
  T_PRIOK  = AFIH-PRIOK.
  T_EQUNR  = AFIH-EQUNR.
  T_ILOAN  = AFIH-ILOAN.
  T_GEWRK  = AFIH-GEWRK.
  T_WARPL  = AFIH-WARPL.
  T_LAUFN  = AFIH-LAUFN.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2006 01:31:33 GMT</pubDate>
    <dc:creator>ferry_lianto</dc:creator>
    <dc:date>2006-12-08T01:31:33Z</dc:date>
    <item>
      <title>problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738609#M321112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii frnds ,&lt;/P&gt;&lt;P&gt;when i am executingthis select statement theni am getint this sort of syntax error ,&lt;/P&gt;&lt;P&gt;The list "(T_AUFNR" after "INTO" is not of the form (f1, ...,fn), or contains an undefined field. excludes specification of a field list.	&lt;/P&gt;&lt;P&gt;the select statement is &lt;/P&gt;&lt;P&gt;SELECT SINGLE &lt;/P&gt;&lt;P&gt;        AUFNR&lt;/P&gt;&lt;P&gt;        PRIOK&lt;/P&gt;&lt;P&gt;        EQUNR&lt;/P&gt;&lt;P&gt;        ILOAN&lt;/P&gt;&lt;P&gt;        GEWRK&lt;/P&gt;&lt;P&gt;        WARPL&lt;/P&gt;&lt;P&gt;        LAUFN &lt;/P&gt;&lt;P&gt;        INTO (T_AUFNR,T_PRIOK,T_EQUNR,T_ILOAN,T_GEWRK,T_WARPL,T_LAUFN)&lt;/P&gt;&lt;P&gt;         FROM AFIH WHERE AUFNR = S_AUFNR .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738609#M321112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T01:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738610#M321113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure there are spaces after the comma.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE 
AUFNR
PRIOK
EQUNR
ILOAN
GEWRK
WARPL
LAUFN 
INTO (T_AUFNR, T_PRIOK, T_EQUNR, T_ILOAN, T_GEWRK, T_WARPL, T_LAUFN)
FROM AFIH WHERE AUFNR = S_AUFNR .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738610#M321113</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-08T01:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738611#M321114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii rich , &lt;/P&gt;&lt;P&gt;its still notworking i am getting the same error now also ...&lt;/P&gt;&lt;P&gt;kindly provide some other solution ..&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:16:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738611#M321114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T01:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738612#M321115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure T_AUFNR, T_PRIOK, T_EQUNR, T_ILOAN, T_GEWRK, T_WARPL, T_LAUFN, are variables that you have declared explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me it sounds like these are columns of a table. If that is the case then it should ITAB-AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either Make sure these are individual variables declared&lt;/P&gt;&lt;P&gt;Or replace with the names of the columns along with the workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An easier way could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : WA_ORDER TYPE AFIH .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT .... into corresponding fields of WA_ORDER ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note - Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738612#M321115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T01:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738613#M321116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE 
AUFNR
PRIOK
EQUNR
ILOAN
GEWRK
WARPL
LAUFN 
INTO (AFIH-AUFNR, AFIH-PRIOK, AFIH-EQUNR, AFIH-ILOAN, AFIH-GEWRK, AFIH-WARPL, AFIH-LAUFN)
FROM AFIH WHERE AUFNR = S_AUFNR.

IF SY-SUBRC = 0
  T_AUFNR  = AFIH-AUFNR.
  T_PRIOK  = AFIH-PRIOK.
  T_EQUNR  = AFIH-EQUNR.
  T_ILOAN  = AFIH-ILOAN.
  T_GEWRK  = AFIH-GEWRK.
  T_WARPL  = AFIH-WARPL.
  T_LAUFN  = AFIH-LAUFN.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738613#M321116</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-12-08T01:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738614#M321117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HII FRNDS THAN FOR HELP ITS WORKING NOW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:32:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738614#M321117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T01:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738615#M321118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well, this is syntaxically correct,  it does have spaces after the comma and each field is defined.  This isn't usually how I would do it, but it does work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: t_aufnr type afih-aufnr,
      t_priok type afih-priok,
      t_equnr type afih-equnr,
      t_iloan type afih-iloan,
      t_gewrk type afih-gewrk,
      t_warpl type afih-warpl,
      t_laufn type afih-laufn.

select-options: s_aufnr for t_aufnr.


select single
aufnr
priok
equnr
iloan
gewrk
warpl
laufn
into (t_aufnr, t_priok, t_equnr, t_iloan, t_gewrk, t_warpl, t_laufn)
from afih where aufnr = s_aufnr .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738615#M321118</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-08T01:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738616#M321119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually I would do it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: begin of xafih,
      aufnr type afih-aufnr,
      priok type afih-priok,
      equnr type afih-equnr,
      iloan type afih-iloan,
      gewrk type afih-gewrk,
      warpl type afih-warpl,
      laufn type afih-laufn,
      end of xafih.

select-options: s_aufnr for xafih-aufnr.


select single aufnr priok equnr
              iloan gewrk warpl laufn
                 into xafih
                      from afih 
                          where aufnr = s_aufnr .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 01:38:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1738616#M321119</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-08T01:38:16Z</dc:date>
    </item>
  </channel>
</rss>

