<?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: ABAP query issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816637#M1127281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, above mentioned is not the solution for your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you want to write ABAP Query (i.e. Tcode SQ01), NOT the SQL Query in a normal program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you want to put abap code behind a field in your SQ01 query then you need to create custom field in your infoset. To learn how to create custom fields I have written a blog: &lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="46622"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good news is that you do not need to create custom fields for the requirement that you mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;i want to fetch data where one field begins with 1* or 2* or 3* or 4* .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, simply put the field on the selection screen by selecting appropriate check box and just use 1&lt;STRONG&gt;, 2&lt;/STRONG&gt;, 3* or 4* in on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Where should i COUNT the data selected and display it .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you execute the report, click on the 'Layout' icon, and select 'Column for number of rows'. It will give you last row with count. You can then save the layout as default layout so that it appears automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do anything different than above then you need to create custom fields, see my blog for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2008 07:15:43 GMT</pubDate>
    <dc:creator>Shafiq_Rehman1</dc:creator>
    <dc:date>2008-11-25T07:15:43Z</dc:date>
    <item>
      <title>ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816633#M1127277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While creating ABAP query to fetch data from a table ,  i want to fetch data where one field begins with 1* or 2* or 3* or 4* . If it possible to write select stmt while creating query thru SQ01 , where should i write it ? Where should i COUNT the data selected  and display it . i'm using SAP 6.0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816633#M1127277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816634#M1127278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually you can get report for the query.May be be you can write in that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search the forum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816634#M1127278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T12:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816635#M1127279</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;  I think you can write a report to fetch data and count data, then display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  For select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select field1 field2 ...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   from db_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   into table i_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   where condition_field like '1%' &lt;/P&gt;&lt;P&gt;      or condition_field like '2%' &lt;/P&gt;&lt;P&gt;      or condition_field like '3%' &lt;/P&gt;&lt;P&gt;      or condition_field like '4%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at i_tab into w_tab.&lt;/P&gt;&lt;P&gt;    write:/ w_tab-field1, w_tab-field2, ... .&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: alex yu on Nov 25, 2008 6:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 13:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816635#M1127279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T13:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816636#M1127280</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 hope Alex is right.please close the thread &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;rasheed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 04:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816636#M1127280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T04:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816637#M1127281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, above mentioned is not the solution for your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you want to write ABAP Query (i.e. Tcode SQ01), NOT the SQL Query in a normal program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you want to put abap code behind a field in your SQ01 query then you need to create custom field in your infoset. To learn how to create custom fields I have written a blog: &lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="46622"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good news is that you do not need to create custom fields for the requirement that you mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;i want to fetch data where one field begins with 1* or 2* or 3* or 4* .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, simply put the field on the selection screen by selecting appropriate check box and just use 1&lt;STRONG&gt;, 2&lt;/STRONG&gt;, 3* or 4* in on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Where should i COUNT the data selected and display it .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you execute the report, click on the 'Layout' icon, and select 'Column for number of rows'. It will give you last row with count. You can then save the layout as default layout so that it appears automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do anything different than above then you need to create custom fields, see my blog for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 07:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816637#M1127281</guid>
      <dc:creator>Shafiq_Rehman1</dc:creator>
      <dc:date>2008-11-25T07:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP query issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816638#M1127282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank  you all , the issue solved .&lt;/P&gt;&lt;P&gt;Thanks Shafiq this is  very useful one .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:13:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query-issue/m-p/4816638#M1127282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T08:13:04Z</dc:date>
    </item>
  </channel>
</rss>

