SQ02 SAP Query
I'm using version 4.7 for a query using SQ02 with 3 table joins. The data is extracted correctly and displayed correctly.
In the extras --> Code area of this infoset transaction I've added in a FM into END-OF-SELECTION (before list) coding area (along with code in DATA declaration and RECORD PROCESSING) to download the data automatically.
The code for E-O-S does not get generated. There doesn't seem to be any notes. Does anyone have any suggestions?
Hi Mark,
i think code for end-of-selection is only generated, when you use a logical database (<b>ldb</b>) in your infoset
Andreas
Similar Messages
-
Debugging in SQ02 (Sap Query Report)
Hi All ;
I want to learn that ,how can I debug a sap query report.I added some fields to the query with code.
How can I reach that code by debugging ?Thanks for your reply.
Regards.
Fırtına.Hi Yigit,
Every Query generated one program like AQZZ/FSCMA/IS===CDM_10_Q1=====
Go To your QuerySQ01 , run your query and From selection screen, check your program name after that you can search your added code. what you added in infoset but your breakpoint and debug your query code.
Regards,
Prasenjit -
Creation of SAP Query in SQ02 with Single Table With Condition
Hi All,
I want to Create SAP Query in SQ02 using single Table MCHA.
ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
i.e Suppose I am having actual data in MCHA table is like this for Material M1.
Plant Material Batch BatchCreationdate
P1 M1 B1 20.06.2007
P2 M1 B1 04.05.2009
P3 M1 B1 04.05.2009
But I want the Output of SAP Query is like this:
Material Batch BatchCreationdate
M1 B1 20.06.2007
That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
Please help me How write the code on single table in the SAP Query.
Thanks,
Kiran ManyamHi,
Your query should be like this:
Select MATNR CHARG HSDAT
from MCHA
into table t_mcha
where matnr = Materlal number from selection screen.
The structure of t_mcha should contain the fields that you select.
Then sort the table by date ascending
Sort t_mcha by HSDAT.
Hope this solves your problem.
Thanks,
Sowmya -
Dear all,
since TWO days Iam working on this .... SAP Query without succes. Now I wanted to ask you here.
I want to make a select-option in the SAP Query. Ok, this is easy! now the customer want to have F4-Help. Iam now in SQ02 where the data coming IN. I crated a Z-Structur. In this Structur I have my field KLART. This field has a domain. In SQ02 I can say take the value from references. This mean its takes the data from TCLA-KLART. But I see in the reference field. It takes data from TCLAT-ARTXT. So my question are:
1) Why does it take the field from TCLAT-ARTXT?
2) I dont see any information in the screen. This mean I dont get an option for this field KLART
Thank u very muchHi,
1)Data Source is direct read of table Mara
2)
you've to place the follow. code in
SQ02-Goto-Code-Record processing:
select count( * ) from mchb into sy-dbcnt
where matnr = mara-matnr.
check sy-dbcnt = 0.
regards Andreas -
Question in SAP QUERY- SQ01,SQ02,SQ03
Hi SAP QUERY Experts,
I have a question for the query. Is it possible using a interface parameter for report-to-report interface? I mean when I double click on one the data record of query, I want to transfer the key information of this record to the query or report or transaction as parameters. Is it possible? If yes, could you tell me how?
This is on SQ01, SQ02,SQ03
Thanks and Regards
Saravanahi all,
i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
pls guide me how to insert additional colum in that standard report or query.
pls guide me
thanks and regards,
sai -
SAP Query (SQ02) - Repeated Data
Hi Gurus,
I'm using the SAP Query tools to build a report.
I have to compare four table but I have a problem: Data comes repeated.
In the outbound delivery, I need to check for one position and material number the stock that I have in two differente storage type in the WM module.
When I execute the query, the item line of the delivery as well as its quantity is repeated as much as storage bin found for this material:
Oubound Delivery Number Item Material Delivery Quantity Storage bin Storage bin quantity
80000000230--1XXXXXXXX1AD1--
60
80000000230--1XXXXXXXX1AD2--
40
80000000230--1XXXXXXXX1AD3--
35
80000000230--1XXXXXXXX1AD4--
60
I would like the result to appear as follows, but i don't any programming knoledge. I know there is an option to put some coding in the query. Could anyone guide me or give me a piece of the code that I would have to put ?
80000000230--1XXXXXXXX1AD1--
60
AD2----
40
AD3----
35
AD4----
60
Best regards,
RemiAssuming that you are outputting your query as an ALV list, use the sorting functionality to get the display to look exactly as you have depicted. In the ALV display, select the first two columns and click on the sort button.
-
Hide columns for ALV list output in SAP Query SQ01/SQ02
Hi All,
I have a requirement to hide the columns which are empty in sap query SQ01 alv list output.
Please let me know this functionality available in Query (SQ01) like normal reports
Regards,
VenkatHi,
We just can't make changes in this case as this are all system generated programs.
WE have to write our own reports to make things flexible to match our requirements.
Things you are asking is not possible.
Regards,
Suvendu -
Transport request for SAP Query - SQ01, SQ02, SQ03
Hi Experts,
I have a doubt, Whether we can have request for SAP Query which have created from Transaction SQ01.If Yes then How to do that....?
Thanks in Advance,
Chetan JoshiHi,
Use the program RSAQR3TR
Thanks
Naren -
Question regarding SAP query (SQ01& SQ02)
Hello everyone,
I have been assigned a task of creating a SAP query in SQ01. The report requires me to incorporate a drill down functionality.
i.e. when I double click on a material I should be able to see the components of that material.
My question is "Is it possible to incorporate a drill down functionality in a Query through SQ01".
If yes then how.
Please provide me with some documentations or example codes for this.
Regards,
Deepti Jain.Deepti,
There are 2 ways to get the output From SAP query.
1.Under record processing :
if you don't write any code in Start of selection event for output
(WRITE statements) we can not have any control on that.
2. Under start of selection event :
If you write any code in START OF SELECTION event like
get the data in internal table and loop the internal table
In loop WRITE statement to display with format and try to use
Interactive report commands Here. I think it will work fine. -
How to find the report for the SAP query (Query exists in table AQLQCAT)
Hello Experts,
I need to find the tables used in the SAP Query but i don't have access to transaction SQ01,SQ02 and SQ03 to check the same.
Therefore i checked table AQLQCAT and got the SAP Queries in the system. Then searched for the reports that would have been generated for the same passing AQusergroupquery name* in transaction SE38.
But unfortunately the program does not exists for the given paramenter.
Could you please let me know how to get the report name for the SAP Query.
Secondly please suggest any other way of checking the tables used in the SAP Query.
Also the table name from where i can download the SAP Queries.
Thanks in advance.
Regards,
Rahul SinhaI suggest you a simple method.
Execute the query. When the selection screen is showed, go to menu and click to SYSTEM->STATUS.
Check the program name and double click it to access the program code.
Search for tables or functions into the source code in order to understand where data are taken.
If you do not find anything , go to the program atttribute and check for logic database, sometimes they are used....
Best regards. -
Could anyone provide the complete manual of SAP Query Creation
Hi,
Now I am learning to create SAP Query.
I viewed many questions and answers about SAP Query.
Some mentioned this,and some did that...
Could anyone provide a complete manual of SAP Query Creation for developers.
I can create SAP Queries step by step with it.http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Step-by-step guide for creating ABAP query
http://www.sappoint.com/abap/ab4query.pdf
ABAP query is mostly used by functional consultants.
SAP Query
Purpose
The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
Features
SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
All the data required by users for their lists can be selected from any SAP table created by the customer.
To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
use either SQ02 ans SQ01
or SQVI tr code
for more information please go thru this url:
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
http://goldenink.com/abap/sap_query.html
Please check this PDF document (starting page 352) perhaps it will help u.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
check the below link will be helpful for u
Tutorial on SQVI
once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
useful
http://www.erpgenie.com/abap/code/abap47.htm
regards,
Prabhu
reward if it is helpful -
SAP Query - Modfication/Changes
Hi Experts,
I am new SAP Query, so i have come up with this issue. Please help.
I have an infoset query with me, also a SAP query and a transaction with some Z transaction code, the program name as taken from System->Status is AQZZZSD=========Z_SD_ORD_WO_ST.
1. Now I can see code in the program, but I cant see that much of code in the SQ02 under extras tab.
2. Moreover, I have to change the code to address new requirements. How can I change the code in a SAP query???
What are the ways to change an existing SAP query's code ???
Thanks,
ChandanHi Chandan,
Go to Infoset (SQ02) in change mode, click on Code icon (Sfift + F8) displayed on Application bar.
You will find, 'Code section' where different events are listed. You can write your code in any of listed events depending on your need.
For ex. if you want declare any variable in u2018DATAu2019 Section, to initialize any variable can use INITIALIZATION event.
If you want to perform operation on selection screen you can use 'AT SELECTION-SCREEN OUTPUT'
And most important event for this tool is Record Processing event like if you want to have any condition and calculation or modification of field value, you can write code in this event.
END OF SELECTION BEFORE LIST--> You can write header information in this event. After this information, your output is displayed. (User WRITE statement to write your information)
END OF SELECTION AFTER LIST--> You can write footer information in this event. After query output, information mentioned in this event is displayed.
Note: END OF SELECTION BEFORE LIST and END OF SELECTION AFTER LIST work only when output format of your query (SQ01) is u2018ABAP LIST'
GET and GET LATE: When you select a logical database as a data source of an infoset, you get this additional event to maintain the code as per your need for LDB.
Please let me know if you need any further details.
Regards,
Dinesh
Edited by: Dinesh Tiwari on Sep 30, 2009 7:21 AM -
Hi,
Is there any way to display Internal table values as output in SAP Query.
I need to develop a query (sq01) which need to dispaly all the sales summary in single line based on customer, means need to do sum of all customer sales for a particular period and dispaly sum in one line eg: customer , total value. i done this in doing coding by passing values into internal table in SQ02 INFOSET -->Extras but i am unable to disaply the internal table as output list. any one have idea pls let me know .
Thank u,
sksk.Hi,
This is not at all possible...
Regards
Abhii... -
SAP Query error for VBAK and KONV tables
Dear Experts,
Want to create SAP Query for below requirement but faced some error
Step1) Extract the data from VBAK table w.r.t. order type , Sale org and date range
and collected the Sales order numbers and doc. condition record (KNUMV)
Step 2)In table KONV (Transactional condition record data) in this table provided input as doc. condition record (KNUMV) with respect to condition type ABCD
Manually i extracted data, there is no problem .
But customer want to generate SAP Query for above requirement
I tried to create but in t.code SQ02 when i tried to join the table VBAK and KONV i faced the below error
Table KONV cannot be used in a join.
How can I create SAP query for above requirement ???
if its not possible then create Z report is the only solution ??????
Thanks in advanceHello
You can not create Query report with joining KONV. But there is one solution for your problem. You can create Query report by using Database VAV. In this logical database you will find all SD tables and also KONV. Use only those tables and fields which you want in your query report. I have checked this and its working
Please try this and update the forum accordingly.
Edited by: moazzamjii on Jun 30, 2011 12:13 PM -
SAP QUERY/INFOSET with OUTER JOIN
Hi,
I have created an infoset (SQ02) using two tables for SAP query.
Table: AGR_TEXTS. Fields: AGR_NAME, SPRAS, LINE, TEXT.
TABLE: AGR_FLAGS. Fields: AGR_NAME, FLAG_TYPE, FLAG_VALUE.
Joined these two tables using outer join. Defined the join condition as AGR_NAME = AGR_NAME. Saved and Generated the infoset.
Created SAP Query (SQ01) using the above created infoset.
In the basic list,
Marked AGR_NAME (AGR_TEXTS), TEXT, FLAG_VALUE as listed fields.
Marked AGR_NAME (AGR_TEXTS), SPRAS, LINE, FLAG_TYPE as selection fields.
Save the query. When execute the query provided the inputs for all the selection fields in the selection screen as given below:
AGR_NAME=Z*
SPRAS=E
LINE=00000
FLAG_TYPE=LICENSE_01
Executed the Query.
Got the results only the matched records as per the selection field FLAG_TYPE.
But I want all the records from table AGR_TEXTS and matched records from table AGR_FLAGS.
I want the report (output) as below,
_AGR_NAME TEXT FLAG_VALUE_
ZCA_BASIC_ACCESS_GLOBAL Non-critical basic access for all users. 53
ZCA_BASIC_ENDUSER_ACCESS UK:CA Basic Enduser Access
ZCA_BASIC_ENDUSER_ACCESS_UK UK:CA Basic Enduser Access UK 52
ZCA_BASIC_ENDUSER_SU52_UK UK:CA Basic Enduser Access to change Parameter ID's
But I got the report (output) as below,
_AGR_NAME TEXT FLAG_VALUE_
ZCA_BASIC_ACCESS_GLOBAL Non-critical basic access for all users. 53
ZCA_BASIC_ENDUSER_ACCESS_UK UK:CA Basic Enduser Access UK 52
Apprecited your help. Thanks.
Code Formatted by: Alvaro Tejada Galindo on Dec 30, 2009 2:20 PMIdentify a KF for which there are non-zero values for all accounts in the cube.
Create the query with Account (from MP coming from both IO and cube) and this KF. KF will have 0 values for accounts not existing in the cube. Create a condition to show only the 0 value for the KF. This should show you all the accounts in the IO which are not in the cube.
Maybe you are looking for
-
Hello, I was wondering if someone could help me with a really weird problem. I have a form I created that hides and shows a lot of different fields it also has some add and remove buttons. This all works great until the user hits the send email. When
-
What is the best camera technique to use for this project?
hi, im making a small thing for my gf on motion. i have it so that certain text appears along with pictures. i want the camera to pause momentarily to read what it says and then begin moving to the next set of text/pictures, then stop there for a lit
-
Exporting tracks problem? Help? Big problems.....
I have a project with 14 narration tracks. I am trying to export each track seperatly. I was told all I had to was "solo" a track and export to iTunes. One by one, I did this for each track. Heres the problem. The fill size for each track is the size
-
Hello! I'm working on a Flash CS3 file (with Actionscript 3.0) and I'm trying to create a slideshow with an audio track. I have 12 slide images and a 12 minute long audio presentation. I want to pause the images for variable times during the presenta
-
Where can I locate my print code?
I have a HP photosmart D110 all in one and im trying to locate my print code so I can link my other laptops. PLEASE HELP !!