‎2009 Sep 16 6:13 PM
Hi,
I created abap query with two tables but i want to mention some conditions ysing where.
SELECT * FROM Table INTO TABLE IT_ZSM
where TARIFTYP in ('PEBGMD',
'PPMD',
'PEBPMDRC',
'PETC',.
this where condition , how should i define in SQ02
Thanks
‎2009 Sep 16 11:04 PM
Sorry, but your question is not clear.
What do you need to do inside SQ02?
Regards.
-Rafael Rojas-
‎2009 Sep 17 1:24 AM
Here my requirement is
developing abap query with two tables but one table has condition to restrict limited records based on where condition,
in select statment where condition will be there, but in SQo2 is there any option to mention where condition values.
Thanks
‎2009 Sep 17 2:47 AM
Well, I think you should use an ABAP program to select information instead of build an Infoset through SQ02 transaction.
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]
By the way, your 0 Forum Points does not help so that others are interested in answering your questions.
Regards.
Rafael Rojas.
‎2009 Sep 17 5:57 AM
Hi Sonarali
Maybe you could try this
Let's say you have two tables VBAK and VBEP defined in your Infoset.
Now what the ABAP Query does basically is to generate a report which has a SELECT ENDSELECT LOOP.
like this
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.To put the code go to SQ02, go to the Code tab and select the record processing section from the drop down list.
Write your filter code here.
However it'd be better if you could make a report program to do all this.
Pushpraj
‎2009 Sep 17 4:46 AM
SQ02 will help you to create infotype. Using SQ01 you can give these values. Refer help to know more
You can also provide select option on the screen , with these four values.
Edited by: harsh bhalla on Sep 17, 2009 9:17 AM