Urgent(sq01) query

Hi friends
  I have generated a report using SAP query(sq01).can any one tell me how can i  make the selection fields obligatory here.
Regards
Bunty.

Hi
I think You can't make them as Obligatory
see this
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
Reward points if useful
Regards
Anji

Similar Messages

  • Output of SQ01 Query to a file in background

    Hello,
           I have created a SQ01 query for a certain specific outpur from my SAP system. I need to get the output of this query to a file. While i have tried executing this report from the frontend; it works smoothly, and based on the variant it creates the output and writes to a file at a remote location. But while i am trying to process the same query using background job, it creates a spool request and doesnt export the data to a file.
           Can someone please help me in getting me right in case i am doing anything wrong.
    Regards,
    V

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    It look exactly like what you see during a spool display.
    Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    Regards,
    Pavan

  • SQ02 Infoset returns different results in SQ01 Query vs. Segment Builder TG

    I want to get Segment Builder to use the same InfoSet and return the same results so, that I can then make a Target Group...but, I'm sure I'm missing some step along the way.
    My SQ01 query returns 79 contact persons, but my segment builder only finds 42, none of which appear to actually be the Contact Person, but are in fact the Business Partner the Contact Person has a Relationship to.
    I started by copying the CRM_MKTTG_BP_ADDR InfoSet and added the BUT051 table to it, which is when the SQ01 began returning the needed results.
    I suspect the problem may be in the Master Group where I am using the B2B/B2C Program, but I don't know if that's the answer or not.  I am not declaring an FM as I am using the BP-GUID in the data source, so I don't 'think' that's the issue...
    Here's what I'm currently trying as my Data Source settings in case that will help:
    Origin Type              03 InfoSet                                                              
    RFC dest.                                                                               
    Name of InfoSet          ZCRM_MKTTG_BP_ADDR                                                      
    Business Partner         BUT000-PARTNER_GUID                                                     
    Function Module                                                                               
    Sampling InfoSet         ZCRM_MKTTG_BP_ADDR_SMP                                                  
    Sample                   BUT000-PARTNER_GUID                                                     
    Object                                                                               
    Partner Function                                                                               
    Description              Z BP Address                                                            
    I already read every Segment Builder forum thread and the Sap Library on the subject, but either I missed something or there is a step not listed.
    Anyone have any suggestions?

    Solved!!
    I was wrongly using AND/OR options to add filters in the segmentation tool...ups!

  • How to add a selection criterion to a SQ01 query based on logical database SDF?

    Hi,
    How should I add a selection criterion to a SQ01 query based on the logical database SDF? Is it possible through additional code? How to make use of the custom selection fields? I need a selection criterion based on BKPF-CPUDT (creation date).
    Thanks.

    Hi John,
    Please check the given below link in addtion to Atul post.
    http://scn.sap.com/community/erp/sd/blog/2012/04/16/query-report-tips-part-2--mandatory-selection-field
    Thanks,
    Senthil Maruthappan.

  • SQ01 query - Drilldown total level larger than 0 and drilldown function

    Hi everybody,
       I have made a sq01 query and set the call up report at "Report assignment" function. The drilldown total level of my query is 1 and I found that this makes the report can't pass the selected data (with cursor) to the receiver report correctly. I can't change the drilldown total level as 0 due to the user requirement. May I ask is there any other way to solve this problem? Thank you.

    Hi everybody,
       I have made a sq01 query and set the call up report at "Report assignment" function. The drilldown total level of my query is 1 and I found that this makes the report can't pass the selected data (with cursor) to the receiver report correctly. I can't change the drilldown total level as 0 due to the user requirement. May I ask is there any other way to solve this problem? Thank you.

  • SQ01-query - how to join MARA and DRAD

    Hi all,
    my problem is that I have to create a sq01 query in which I combine data from the MARA
    with data from DRAD. But I can't join the OBJKY (DRAD) with the MATRN (MARA).
    Hoping for help,
    Barbara

    Hi Barbara,
    As mentioned in the previous post, you cannot join the OBJKY field with MATNR field of MARA.
    But if you want to just read the contents in OBJKY from DRAD, then have a look at the below code:
    Note: In the initial step of creating your infoset, just select direct read from table & select on MARA here.
    SELECT SINGLE DOKNR INTO T_DOKNR
    FROM DRAD
    WHERE OBJKY EQ MARA-MATNR
         AND DOKOB EQ 'MARA'
         AND DOKAR EQ (Specify the type of document for this).
    Now you can combine the fields MATNR, T_DONR & the Z field into the field which you want using the CONCATENATE statement.
    \[removed by moderator\]
    Regards,
    Vivek
    Edited by: Jan Stallkamp on Sep 3, 2008 3:51 PM

  • Error when attempting to download SQ01 query data to Excel

    Hi Experts ,
    I am getting error when attempting to download SQ01 query data to Excel .
    Error message - Contact your system administrator. The following template is missing: sap_om.xls
    Message no. 0K 407
    I have looked through the SAP GUI installation files and can find no record of the missing file
    Help

    Hi
    Please check SAP note 305900 & 803067
    Regards
    Ravinder

  • Adding a function module into a SQ01 Query

    Hi ABAP Gurus,
    I was trying to extract few dates from TSEGE Table, by linking the VTTK - HANDLE. We are trying to look at maintaining dates of shipment that were not previously used in our company.
    When I tried extracting the dates from TSEGE, they come as timestamped UTC. I was told to use the function module IB_CONVERT_FROM_TIMESTAMP with CET in a query by an external consultant we use for our services. I am familiar with creating simple queries in SQVI and convert them to SQ01, also I know to create queries in SQ01 itself. But do not know how to add a function module into an SQ01 Query.
    After checking a few threads, I realise that I should be creating a field and entering the code of the function module.
    Is there any way, anybody could instruct me in simple terms how do I go about adding a function module.
    Your help will be greatly appreciated.
    Thanks in advance!

    Dear Jogeswara,
    I have after reading a few threads, understood this small code and changed to my specification
    To convert UTC Start time from TSEGE
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
      EXPORTING
        I_TIMESTAMP = TSEGE-EVEN_TSTFR
        I_TZONE = CET
      IMPORTING
        e_datlo = date
        e_timlo = time
    To convert UTC Start End from TSEGE
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
      EXPORTING
        i_timestamp = TSEGE-EVEN_TSTTO
        i_tzone = CET
      IMPORTING
        e_datlo = date
        e_timlo = time
    I hope the above codes are correct. If yes, I have a doubt: TSEGE-EVEN_TSTFR & TSEGE-EVEN_TSTTO have different time in the same field, "Actual" & "Forecast", which is determined by TSEGE-EVEN_VERTY wherein 1 is Actual and 0 is Forecast. Is this something I would have to put in the code, or something that would work in the query "Selection Fields"?
    Thanks again!

  • SQ01 query selection

    In SQ01 queries are net getting selected by single click, double clicking can select a query.
    Once i double click a query i cannot select any any other query (even by double clicking) .
    Please help...its urgent......

    There is an OSS Note for this.
    Note 1161464 - SQ01: Unable to double-click to select a query.
    Request to the poster (and in general): It helps community to know the resolution of the issue too. Lets make it two-way street, post problems (we all do) and when resolved, the resolution.
    Thanks.

  • How to add a "Maximum no. of hits" - field in SQ01 query?

    Hi all,
    Is it generally possible to add the field "maximum no. of hits" to a query / quickview in transaction SQ01? And if yes, how?
    I have created a test query but I cannot find any solution. I don't mean the popup asking for database accesses which occurs when trying to test this query. I really want to have it as selection criteria.
    My system is a R/3 Enterprise 4.7 Ext. Set 2.00.
    Thanks in advance!
    Michael

    Well,
    You're talking about COLLECTIVE search help. You won't definie Max No of hit at this level.
    Define an elementary search help and assign to this one a dialog mode (retriction or set of values).
    Regards,
    Bertrand
    PS : Don't forget reward points

  • Urgent Need: Query is taking time

    Hi,
    I have a query which is taking lots of time.Please help me in this regard...
    select subscripti0_.RENTAL_ID as RENTAL1_101_0_, movieprodu1_.product_id as product1_45_1_, moviepacka2_.PACKAGE_ID as PACKAGE1_47_2_, movietitle3_.TITLE_ID as TITLE1_48_3_, subscripti0_.LOGICAL_QUEUE_POSITION as LOGICAL2_101_0_, subscripti0_.STATUS as STATUS101_0_, subscripti0_.RENT_CODE as RENT4_101_0_, subscripti0_.IS_VISIBLE_FLAG as IS5_101_0_, subscripti0_.SHIP_DATE as SHIP6_101_0_, subscripti0_.DATE_CHECK_IN as DATE7_101_0_, subscripti0_.SET_NBR as SET8_101_0_, subscripti0_.ALLOCATION_DATE as ALLOCATION9_101_0_, subscripti0_.USPS_SHIP_DATE as USPS10_101_0_, subscripti0_.CENTRAL_CHECKIN_DATE as CENTRAL11_101_0_, subscripti0_.ESTIMATED_ARRIVAL_DATE as ESTIMATED12_101_0_, subscripti0_.CREATED_BY as CREATED13_101_0_, subscripti0_.CREATED_DATE as CREATED14_101_0_, subscripti0_.UPDATED_BY as UPDATED15_101_0_, subscripti0_.UPDATED_DATE as UPDATED16_101_0_, subscripti0_.SUBSCRIPTION_ID as SUBSCRI17_101_0_, subscripti0_.MOVIE_ID as MOVIE18_101_0_, movieprodu1_.ONLINE_RELEASE_DATE as ONLINE2_45_1_, movieprodu1_.PRODUCT_TITLE as PRODUCT3_45_1_, movieprodu1_.PACKAGE_ID as PACKAGE4_45_1_, movieprodu1_1_.AVAILABILITY_BAND as AVAILABI2_46_1_, movieprodu1_1_.TOTAL_RENTABLE_INVENTORY as TOTAL3_46_1_, NVL(movieprodu1_.ONLINE_FLAG, 0) as formula0_1_, NVL(movieprodu1_.PRIMARY_PRODUCT, 0) as formula1_1_, moviepacka2_.TITLE as TITLE47_2_, moviepacka2_.dvd_release_date as dvd3_47_2_, moviepacka2_.FORMAT as FORMAT47_2_, moviepacka2_.PACKAGE_MPAA as PACKAGE5_47_ 2_, moviepacka2_.T_ARTICLE as T6_47_2_, moviepacka2_.TITLE_ID as TITLE7_47_2_, movietitle3_.TITLE as TITLE48_3_, movietitle3_.THEATRICAL_RELEASE as THEATRICAL3_48_3_, movietitle3_.TITLE_MPAA as TITLE4_48_3_, movietitle3_.LEGACY_ID as LEGACY5_48_3_, movietitle3_.AVERAGE_USER_RATING as AVERAGE6_48_3_, movietitle3_.RUNNING_TIME as RUNNING7_48_3_, movietitle3_.PRIMARY_PACKAGE_ID as PRIMARY8_48_3_, movietitle3_1_.BUY_NEW as BUY2_49_3_, movietitle3_1_.BUY_USED as BUY3_49_3_, movietitle3_1_.RENT_DOWNLOAD as RENT4_49_3_, movietitle3_1_.BUY_DOWNLOAD as BUY5_49_3_, NVL(movietitle3_.HAS_RENTABLE_PRODUCTS, 0) as formula3_3_ from SUBSCRIPTION_RENTAL subscripti0_ inner join ACTIVE_MOVIE_PRODUCT movieprodu1_ on subscripti0_.MOVIE_ID=movieprodu1_.product_id left outer join PRODUCT_AVAILABILITY movieprodu1_1_ on movieprodu1_.product_id=movieprodu1_1_.MOVIE_ID inner join ACTIVE_MOVIE_PACKAGE moviepacka2_ on movieprodu1_.PACKAGE_ID=moviepacka2_.PACKAGE_ID inner join ACTIVE_MOVIE_TITLE movietitle3_ on moviepacka2_.TITLE_ID=movietitle3_.TITLE_ID left outer join MOVIE_TITLE_ATTRIBUTES movietitle3_1_ on movietitle3_.TITLE_ID=movietitle3_1_.TITLE_ID where subscripti0_.SUBSCRIPTION_ID=:1 and subscripti0_.DATE_CHECK_IN>:2 and (subscripti0_.DATE_CHECK_IN is not null) order by subscripti0_.DATE_CHECK_IN DESC
    Explain Plan for this query:
    OPERATION OBJECT_NAME OPTIMIZER COST BYTES CARDINALITY CPU_COST IO_COST
    SELECT STATEMENT ALL_ROWS 148 1570 5 10090819 147
    SORT 148 1570 5 10090819 147
    NESTED LOOPS 147 1570 5 1237900 147
    NESTED LOOPS 142 1530 5 1191042 142
    NESTED LOOPS 141 1470 5 1174111 141
    NESTED LOOPS 129 1398 6 1073114 129
    NESTED LOOPS 117 1062 6 968996 117
    PARTITION HASH 111 732 6 911328 111
    TABLE ACCESS SUBSCRIPTION_RENTAL ANALYZED 111 732 6 911328 111
    INDEX INDX_SUB_RENTAL_SUB ANALYZED 3 10 43164 3
    TABLE ACCESS MOVIE_PRODUCT ANALYZED 1 55 1 9611 1
    INDEX PK_MOVIE_PRODUCT ANALYZED 0 1 1900 0
    TABLE ACCESS MOVIE_PACKAGE ANALYZED 2 56 1 17353 2
    INDEX PK_MOVIE_PACKAGE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE ANALYZED 2 61 1 16833 2
    INDEX PK_MOVIE_TITLE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE_ATTRIBUTES ANALYZED 1 12 1 9331 1
    INDEX PK_MOVIE_TITLE_ATTRIBUTES ANALYZED 0 1 1900 0
    TABLE ACCESS PRODUCT_AVAILABILITY ANALYZED 1 8 1 9371 1
    INDEX PRODUCT_AVAILABILITY_PK ANALYZED 0 1 1900 0
    I need the help very urgently. Kindly give me the solution immediately.
    Edited by: msora on Feb 10, 2009 3:19 AM

    msora wrote:
    Thanks Ozy,
    The query is using joins instead of subquery. The statistics are latest. the query is using indexes too.the optimzer_mode is all_rows.
    Now, you tell me what hint i should use to optimize this query?
    Thanks and Regards,
    MSORAHmm, urgent, immediately, its not Support MSORA. Be patient while asking for help or if its really urgent, open an SR with support.
    Your query is not able to be read. Format it using the { code }( without spaces) and post it. Also there is no such thing that you can just put any hint and query will be tuned. Trace your query with 10046 trace( search this forum for that) and paste its output here.
    Aman....

  • Transaction Code fro Sq01 query

    Dear all,
    i have created a query in Sq01 and assigned a Tr Code for the same. Now thew user i asking for extra fields to be shown in the Query When i changed the query and tried to execute the report thru Tr Code The newly added fields are not seen but when i run it thru SQ01 i see the new fields.
    When i checked in SE93 it says "Transaction contains inconsistencies. Do you want to execute it anyway? "
    Can any body pl tell me how to overcome this ?
    with rgds
    Ranjith Singh

    hi,
    whenevr u do som changes in sq01 ,som program will be internally generated,so u have to change the transaction again,do one thing goto system status of sq01 take program name and create tcode.
    check it then.

  • Urgent Sql Query Problem - -Very Urgent

    Hi Guys,
    I need a urgent solution for a problem.I am
    using the following query
    select ename from emp where deptno =10
    Now I will declare a bind variable and if user passes 'A'
    then the query will run as it is and if he passes B
    then it should run the above query with this additional clause -> birthdate - hiredate >15.
    Please can any one help its very urgent

    Assuming that you have a birthdate column in your emp table, the following will do what you are asking for:
    VARIABLE bind_var VARCHAR2(1)
    EXECUTE :bind_var := '&bind_variable'
    SELECT ename FROM
    (SELECT 'A' AS selection, ename FROM emp WHERE deptno = 10
    UNION ALL
    SELECT 'B' AS selection, ename FROM emp WHERE deptno = 10 AND birthdate - hiredate > 15)
    WHERE selection = :bind_var
    However, the clause "birthdate - hiredate > 15" will only retrieve rows for employees who were born more than 15 days after they were hired. I doubt that this is what you really want, since this is impossible.

  • Report sq01 query

    Hi Gurus,
    Hi,
    Please could you let me know if there is a report either in SQ01 or in SAP in general that shows the following:
    Sales order
    PR00 price (Header level)
    Condition type (ZFRE Freight) and the value
    MWST Output tax and the value
    Net Value of the order
    Basically I need to be able to enter a whole list of sales orders into the report and see if the sales orders had the ZFRE freight as a seperate condition type.
    Thanks
    Bawa

    Hi,
    In your query, you can use the logical database VAV (sales order) or VFV (invoices).
    Another solution : add abap code in SQ02 (in new field) to read table KONV from VBAK-KNUMV.
    For example :
    Clear VAL_ZFRE.
    SELECT kwert
    INTO VAL_ZFRE
    FROM KONV
    WHERE KNUMV = VBAK-KNUMV
    AND KPOSN = VBAP-POSNR
    AND KSCHL = 'ZFRE'.
    Endselect.
    Regards,
    Lionel

  • SQ01 query execution - strange selection screen

    Hi,
    I have created a query using the SQ01 transaction. When I execute the query there is a screen with input selection parameters ("Program selections" box). Fine with that - but above that box there's an additional list of selection parameters. I have no idea where do they come from! Apparently they function with "my" parameters using the AND logic. I would like those parameter input fields to disappear from the screen - how can it be accomplished?

    Lakshmipathi wrote:>
    > Dear Marko
    >
    > Why dont you try with SE16 if you have to fetch the data from one table.  If the data has to be fetched from multiple tables, you can try with SQVI.
    >
    > thanks
    > G. Lakshmipathi
    I use multiple tables and find it difficult to work with SQVI because once I add a table to a join I can't delete it anymore, but have to create another query instead. Moreover, I want the queries to be available to other users as well.

Maybe you are looking for

  • IF THEN ELSE STATEMENT IN BeX Query designer

    Hi, I want to write a query as follows: IF <Value a> is available THEN <Value a> ELSE <Value b> I have written it as follows: (X>0)X+(X<=0)Y The problem with this equation is,  in case X = 0(number Zero) then Y is not getting displayed. But In case X

  • Alert or Popup in Modules

    Hi, i'm developing an applicatin who uses Modules. The modules load and unload well and after unload a module, i can see in the profiler, the garbage collection remove the instance. so far so good. now, i'm using a popup or alert in my modul (for dat

  • Is there any way to forward/archive/access regular text messages if you have to erase your phone and re-set it as a new phone?

    I have some major errors in my operating system and was told that I have to erase my phone and then set it up as a new phone.  I have a lot of messages I'd like to be able to keep and have access to after the reset.  Is there any way to copy/sore/arc

  • Clarification regarding RFC destination

    Hi Ramesh, Thanks for your information, can you please tell me do we need to create port and logical system name for creating RFC destination. Thank siva

  • Help me about the problem of acrobat 9.0 pro extended.

    I was upgraded Acrobat Reader 9 to Acrobat 9 Pro Extended. But I didn't knew why, everytime I opened the Acrobat to read some PDF files, and then, after about 9-10s, the program automatic closed with no error screen or some thing like that?! I tried