<?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: Break the SELECT statement. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140386#M1191400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; If i m not using the fields in where clause as per the occurence in the database table, do i get any kind of message through SE30?..No.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I remember the Code Inspector will let you know about that. But in SE30 you should see all times, so you will know if the SELECT causes problems or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2009 07:57:24 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2009-01-27T07:57:24Z</dc:date>
    <item>
      <title>Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140378#M1191392</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;My requirement is to break the Select statement and get the fields in where clause in one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg: Select VBELN&lt;/P&gt;&lt;P&gt;                      POSNR&lt;/P&gt;&lt;P&gt;                      MATNR  from VBAP into wa_vbap where VBELN = '0000000001' &lt;/P&gt;&lt;P&gt;                                                                          and   POSNR = '000010'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i need to put fields VBELN, POSNR, MATNR in one internal table, table name VBAP in second internal table  and where clause fields  VBELN, POSNR in third internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if anyone has any solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Sunanda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140378#M1191392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140379#M1191393</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;PRE&gt;&lt;CODE&gt;Select VBELN
           POSNR
           MATNR 
from VBAP into table itab 
Where &amp;lt;Condition&amp;gt;.

SELECT *
  FROM VBAP
    FOR ALL ENTRIES IN ITAB
WHERE VBELN = ITAB-VBELN
   AND POSNR = ITAB-POSNR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this way you are looking for ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:18:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140379#M1191393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140380#M1191394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunanda,&lt;/P&gt;&lt;P&gt;1. You have to create an internal table for data selection from table VBAP.&lt;/P&gt;&lt;P&gt;let's suppose it's IT_VBAP.&lt;/P&gt;&lt;P&gt;Select VBELN POSNR MATNR &lt;/P&gt;&lt;P&gt;from VBAP into table IT_VBAP&lt;/P&gt;&lt;P&gt;where VBELN = '0000000001' &lt;/P&gt;&lt;P&gt;and POSNR = '000010'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Apply a loop at IT_VBAP and append the records/fields in the desired internal table.&lt;/P&gt;&lt;P&gt;Loop at IT_VBAP.&lt;/P&gt;&lt;P&gt;move all the required fields in other internal table.&lt;/P&gt;&lt;P&gt;Append the record.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it should be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:18:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140380#M1191394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140381#M1191395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi try this&lt;/P&gt;&lt;P&gt;put VBAP in a field symbol and pass that filed symbol in select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select VBELN, POSNR, MATNR &lt;/P&gt;&lt;P&gt;            into (po_ebeln, po_eindt, po_vbeln)&lt;/P&gt;&lt;P&gt;            from VBAP&lt;/P&gt;&lt;P&gt;            where ebeln in third internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140381#M1191395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140382#M1191396</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 my question is not understood properly.&lt;/P&gt;&lt;P&gt;See, i am writing a code to check the performance of a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I donno at runtime what source code i have and which select query i have..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to check (in the select query of the source code at runtime) if the occurence of where clause fields is according to the table ....if not i have to through error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my requirement is clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sunanda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:38:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140382#M1191396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140383#M1191397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; See, i am writing a code to check the performance of a program.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you not satisfied with the standard tools? I. e. SE30, Code Inspector, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:41:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140383#M1191397</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2009-01-27T07:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140384#M1191398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Through SE30 all the possibilities are not satisfied.&lt;/P&gt;&lt;P&gt;Just like the one I am doing now.&lt;/P&gt;&lt;P&gt;If i m not using the fields in where clause as per the occurence in the database table, do i get any kind of message through SE30?..No.&lt;/P&gt;&lt;P&gt;There are so many performance issues which we need to manually check and are not traced through the available tool, so that is the reason why we are going for a new tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunanda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140384#M1191398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140385#M1191399</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;Check this Fm S_DB_SQL_STATEMENT_ANALYSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Jan 27, 2009 1:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140385#M1191399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T07:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140386#M1191400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; If i m not using the fields in where clause as per the occurence in the database table, do i get any kind of message through SE30?..No.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I remember the Code Inspector will let you know about that. But in SE30 you should see all times, so you will know if the SELECT causes problems or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 07:57:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140386#M1191400</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2009-01-27T07:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140387#M1191401</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;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  YSELECT                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  YSELECT                                 .

*Select VBELN
*POSNR
*MATNR from VBAP into wa_vbap where VBELN = '0000000001'
*and POSNR = '000010'.
*
*Here i need to put fields VBELN, POSNR, MATNR in one internal table,
*table name VBAP in second internal table and where clause fields VBELN,
* POSNR in third internal table.

TABLES: VBAP.

TYPES: BEGIN OF STRUCT1,
      VBELN LIKE VBAP-VBELN,
      POSNR LIKE VBAP-POSNR,
      MATNR LIKE VBAP-MATNR,
       END OF STRUCT1.

TYPES: BEGIN OF STRUCT2,
        TBLNAME(10),
       END OF STRUCT2.

TYPES: BEGIN OF STRUCT3,
      VBELN LIKE VBAP-VBELN,
      POSNR LIKE VBAP-POSNR,
      END OF STRUCT3.

DATA: ITAB1 TYPE TABLE OF STRUCT1 WITH HEADER LINE,
      ITAB2 TYPE TABLE OF STRUCT2 WITH HEADER LINE,
      ITAB3 TYPE TABLE OF STRUCT3 WITH HEADER LINE,
      V_TBLNAME(10).

ITAB3-VBELN = '0000000001'.
ITAB3-POSNR = '000010'.

APPEND ITAB3.

LOOP AT ITAB3.
    SELECT VBELN POSNR MATNR FROM VBAP INTO TABLE ITAB1 WHERE VBELN EQ
ITAB3-VBELN AND POSNR EQ ITAB3-POSNR.
      WRITE ITAB1-VBELN.
ENDLOOP.

WRITE: 'SUBRC=', SY-SUBRC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to find out how to satisfy your second internal table requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayanthi.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 08:08:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140387#M1191401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T08:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140388#M1191402</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;Refer to these 3 demo programs (Source transaction ABAPDOCU ) :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
demo_select_dynamic_columns
demo_select_dynamic_database 
demo_select_dynamic_conditions
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Combine them and I think you will have what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 08:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140388#M1191402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T08:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Break the SELECT statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140389#M1191403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will probably need the (internal only) SCAN ABAP-SOURCE statement to parse ABAP code like you have in mind here. Check F1 help and play around with it a bit.&lt;/P&gt;&lt;P&gt;Like Eric I'm wondering why someone would re-invent code inspector (which can be enhanced by your own checks!), but I'm wondering a lot anyway &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 08:47:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/break-the-select-statement/m-p/5140389#M1191403</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-01-27T08:47:34Z</dc:date>
    </item>
  </channel>
</rss>

