<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086375#M1357849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sonarali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you could try this&lt;/P&gt;&lt;P&gt;Let's say you have two tables VBAK and VBEP defined in your Infoset.&lt;/P&gt;&lt;P&gt;Now what the ABAP Query does basically is to generate a report which has a SELECT ENDSELECT LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT VBAK~ERDAT VBAK~VBELN ....... VBAP~POSNR VBAP~VBELN VBAP~MATNR ....
INTO ( VBAK~ERDAT VBAK~VBELN ....... VBAP~POSNR VBAP~VBELN VBAP~MATNR .... )
FROM VBAK INNER JOIN VBAP
ON VBAK~VBELN = VBAP~VBELN
WHERE ...... (this has the conditions fom the selection screen)

************************************
"Filter Code
"Now what you can do is to put a code between this SELECT and ENDSELECT to filter out values you don't want.
"Say
IF VBAK~VBELN = '13432435345'.
CONTINUE.
ENDIF.
************************************

ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To put the code go to SQ02, go to the Code tab and select the record processing section from the drop down list.&lt;/P&gt;&lt;P&gt;Write your filter code here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However it'd be better if you could make a report program to do all this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Sep 2009 04:57:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-17T04:57:39Z</dc:date>
    <item>
      <title>ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086370#M1357844</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 created abap  query with two  tables but  i want to mention  some  conditions   ysing  where.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM Table INTO TABLE IT_ZSM &lt;/P&gt;&lt;P&gt;  where TARIFTYP in ('PEBGMD',&lt;/P&gt;&lt;P&gt;                       'PPMD',&lt;/P&gt;&lt;P&gt;                       'PEBPMDRC',&lt;/P&gt;&lt;P&gt;                       'PETC',.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this  where  condition , how  should i define in SQ02&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2009 17:13:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086370#M1357844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-16T17:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086371#M1357845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but your question is not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you need to do inside SQ02?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rafael Rojas-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2009 22:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086371#M1357845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-16T22:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086372#M1357846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here my requirement is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;developing  abap query with  two tables but one table  has  condition  to  restrict  limited records based on  where condition,&lt;/P&gt;&lt;P&gt;in select  statment where condition will be  there, but  in  SQo2  is there any option to mention  where condition  values.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 00:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086372#M1357846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-17T00:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086373#M1357847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think you should use an ABAP program to select information instead of build an Infoset through SQ02 transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the following link [SAP Query (BC-SRV-QUE) Retrieving Data with Programs|http://help.sap.com/saphelp_46c/helpdata/en/d2/cb45b2455611d189710000e8322d00/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, your 0 Forum Points does not help so that others are interested in answering your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafael Rojas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 01:47:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086373#M1357847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-17T01:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086374#M1357848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SQ02 will help you to create infotype. Using SQ01 you can give these values. Refer help to know more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also provide select option on the screen , with these four values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: harsh bhalla on Sep 17, 2009 9:17 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 03:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086374#M1357848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-17T03:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086375#M1357849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sonarali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you could try this&lt;/P&gt;&lt;P&gt;Let's say you have two tables VBAK and VBEP defined in your Infoset.&lt;/P&gt;&lt;P&gt;Now what the ABAP Query does basically is to generate a report which has a SELECT ENDSELECT LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT VBAK~ERDAT VBAK~VBELN ....... VBAP~POSNR VBAP~VBELN VBAP~MATNR ....
INTO ( VBAK~ERDAT VBAK~VBELN ....... VBAP~POSNR VBAP~VBELN VBAP~MATNR .... )
FROM VBAK INNER JOIN VBAP
ON VBAK~VBELN = VBAP~VBELN
WHERE ...... (this has the conditions fom the selection screen)

************************************
"Filter Code
"Now what you can do is to put a code between this SELECT and ENDSELECT to filter out values you don't want.
"Say
IF VBAK~VBELN = '13432435345'.
CONTINUE.
ENDIF.
************************************

ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To put the code go to SQ02, go to the Code tab and select the record processing section from the drop down list.&lt;/P&gt;&lt;P&gt;Write your filter code here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However it'd be better if you could make a report program to do all this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 04:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-query/m-p/6086375#M1357849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-17T04:57:39Z</dc:date>
    </item>
  </channel>
</rss>

