SQ01/SQ02

Hi all,
can someone can give a details on how exactly to crean an query, i have tried but get a little consfused, a step by step instructions would be helpful.
regards

Dear Dilip,
Pls go thru following link. I hope this may give you some clear idea.
[ABAP Query|http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp]
Regards,
Abhee.

Similar Messages

  • SAP Query (SQ01/SQ02/SQ3)

    Hi Experts,
    I have created query (SQ01/SQ02/SQ03) to display below fields: Hazard Code, Device Location Number, Hazard Code Description, Loc. Created by, Loc. Created on Date.
    Now in the output list I want to display a summary of all the count of records by the key characteristic for the query. For example, the Device Location by Hazard Codes query should give us a summary of the count of all device locations per each hazard code.
    Practical Scenario:
    Device Location Hazard Code
    40002748              01
    40002751              05
    40002481              07
    40002746              04
    40002749              04
    40002994              01
    Then in this case it should either display additional third column or additional row saying:
    Device Location Hazard Code
    40002748              01
    40002994              01
    Total Hazard Count: 2
    40002746              04
    40002749              04
    Total Hazard Count: 4
    40002751              05
    40002481              07
    or
    Device Location Hazard Code Total Count
    40002748              01                
    40002994              01                 2
    40002746              04
    40002749              04                 2
    40002751              05                 1
    40002481              07                 1
    I checked statistic tab present in SQ01 also URL [http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb4256455611d189710000e8322d00/frameset.htm] but still I am not able to figure out how to display this data.
    Please let me know.
    Thanks

    Hi,
    If you're getting the output in ALV Display, you can simply click on the location column & then click on the Sub-Total button on the ALV toolbar, it will sort all the records according to the location (1 or 2 or...) & give you the total/count of the particular location.
    For any further clarification, let me know.
    Prateek

  • Authority Check in Queries (SQ01 / SQ02)

    Hi Friends.
    When I run a query (sq01 / sq02) , E.G. that contain the table MARC, the user can select all the plants, but he only must have access to plant "1000". In their roles / profiles, the basis only set authorisation to plant "1000".
    I can resctrict the selection via abab code in the RECORD PROCESSING step of the INFOSET, but I want to know if exist a standar way to restrict this kind of authorisations in queries.
    pls, any help will be nice!
    thanks!
    Edited by: ARTURO SENOSAIN on Jan 20, 2009 4:10 PM

    Use the logical database as the data source for the query:
    " < ... > you should always use logical databases as the data source within InfoSets that are used for query-based reporting. Using a logical database as your data source guarantees that the SAP solution is smart enough to know which areas of the data a user is allowed to see so that only the appropriate data will show in an SAP query report. Regardless of what type of security access the person who created the report has, the system is smart enough to display only the appropriate data for the user executing the report. (Note that this is the case only when logical databases are used as the data source if a SAP query is created using an InfoSet that is based on anything other than a logical database (for example, a table, a table join, a program). It is fair to say that no security whatsoever is in place when the query is run because all records within the tables are displayed in the report output.)"
    Edited by: Jelena Perfiljeva on Jan 20, 2009 5:15 PM
    Edited by: Jelena Perfiljeva on Jan 20, 2009 5:15 PM

  • Convert query made u200Bu200Bin SQ01, SQ02 and SQ03 for a transaction set

    Hello people, how do I create a transaction for a report I did in queries with the transaction SQ01, SQ02 and SQ03? ...
    hugs

    Hi Stelio Mucavele
    i had the same issue resolved by below steps
    1>go to SQVI t code and  enter your query name and press enter
    2>In the menu path select Quick view--> additional functions-->Generate Program
    3>After Generating the program In the menu path select Quick view--> additional functions-->Display report Name
    4>Now in se38 enter the report name in Program field and execute
    5>You will get the Initial Selection screen of the report . Go to Menu of System -->Status
    6> Note down the Program name and Screen number
    7>Go to SE93 and Create a Z tcode for the query, Enter the description  and importantly you have to select the 2nd Option radio Button Program and Selection Screen (Report Transaction) and Press enter
    8>In the next screen enter the Report name In Program field and enter the screen number
    9>In the classification Section select Professional user  Transaction
    10>In GUI support section select all the options  i.e SAPGUI for HTML,Java,Windows
    and save
    the system will ask for Package select your package if not there then select local object
    now execute the Z tcode your report will run sucessfully
    Regards
    Vijay hebbal

  • Export & import of query (SQ01/SQ02/SQ03)

    Hi,
    How to export/import SAP Query (SQ01/SQ02/SQ03) without any transport request.
    waiting for ur reply.
    Thanks in Advance,
    Pranab

    Hi,
    If you dont want to create any transport request number then you need to download/upload the query instead of import/export.
    Please follow the below steps for downloading/uploading the query
    (Go to the system from where you wnat to export the query)
    1. Goto transaction SQ02.
    2. Click on ' Transports' icon (CTRL+F3).
    3. In 'Transport action' select 'Download'.
    4. Select 4th radio button 'Transport Queris'.
    5. Enter the name your user group and query and click on execute.
    6. Give the file name and location where you want to save the query backup and click on save.
    (Now goto the system where you want to import your query)
    1. Goto SQ02 and click on 'Transports' .
    2.  In 'Transport action' select 'Upload' and click on execute.
    3. Enter/select the name of the file which you have downloaded before and click open.
    Please let me know if this is helpful.
    Regards,
    Priya Bhat

  • Utilizing SQ01 SQ02 for user report generation of production data

    I am interested in utilizing sap query transactions SQ01, SQ02, and SQ03 to create and customize end user reports that will be used  by our audit team to analyze SAP data in our production environment. My objective would be to have one person with authorization to run SQ01,02,03 and have that user create all the reports that would be required for the team to use. This way there isn't a bunch of users out there using SQ01 indiscriminately or perhaps not using it at all. I currently have authorization to run SQVI but it is limited. From what I understand there is more flexibility with SQ01 because they allow you to create calculated fields and offer more formatting options. Most of these reports would be related to finance, sales, vendor, customer, etc.
    My question is this. How do I create these custom queries and allow multiple users to access and run them? Are the queries created directly in production? Are they created in DEV and then tested in QA before being transported to Prod? I understand you can map an sap query program to a transaction and then add that to a role but isn't the program name generated by SQ01 different in every instance? I would like this code to be reproducible as I have 5 different SAP instances in which these reports would be used. Same reports, different data.
    I am looking to leverage the power of SAP query to produce meaningful reports for our team without having to use programmers to develop them from scratch. What is the optimal approach to doing this without creating a lot of hassles and without creating additional security risks?
    If I create a query based on SAP tables I have access to does the general user also have to have authorization to those tables in order for the query to run for them? In theory the entire team should have authorization to the same standard SAP tables because we all have the same roles assigned but I may have some additional tables assigned to me because I am the IT auditor. Just confirming.
    I appreciate any and all suggestions. I would like to proceed with the best solution as soon as possible.
    Thank you very much.
    Mark

    Hi Mark,
    It is best to create queries in dev rather than doing it in prd directly.
    Query user group can be used to control the access in production.
    You can have one query administrator with access to sq01,2,3 and sqvi who will assign query user group to respective users in prd so they can run these.
    BR,
    Mangesh

  • Infoset Queries SQ01/SQ02/SQ03

    Hi Experts,
    I am designing query using SQ01/SQ02/SQ03 where I will input either installation or rate category (both present in table EANLH). But problem here is Installation is key field for EANLH while tariff type is not. Therefore, it returns multiple rate category for single installation. Now within these multiple rate category I need to retrieve only the latest rate category (this table does contain date field BIS & AB - Date fields by using which I can select latest record).
    But my problem here is how to do this in Infoset Queries? Where I need to make changes or do some config?
    Please let me know.
    Thanks.

    Yes, but I am not able to figure exactly how to implement it? I mean I can do this same code in SE38 where I know names of the internal tables. But when in SQ02 we can't modify/read system tables (I found name of the system tables using report generated by SQ01). So how you will access them, then how you will reflect our changes in output ALV grid?
    Example:
    Data:
    Rate Cat.      Installation     Date
    71     60000984     20/10/2009
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    so in this case I want output:
    Rate Cat.      Installation     Date
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    You will see 71     60000984     20/10/2009 is not the latest one, therefore I don't want that row. I can do the ABAP logic for this, but exactly what and how to implement in SQ02?

  • Interactive report using Infoset quiereis with SQ01,SQ02,SQ03.

    Hi,
             I have to create a report by using the infoset query with SQ01,SQ02 and  SQ03 Tcodes. But problem my requerment is that I have to create one interactive report with these quereis.
    Can any body tell me how to create this interactive report using infoset quereis OR are there any standard quereis which are having interactive nature.
    Pleas send me the solution and thanks in advance.
    regards,
    J.

    Yes, but I am not able to figure exactly how to implement it? I mean I can do this same code in SE38 where I know names of the internal tables. But when in SQ02 we can't modify/read system tables (I found name of the system tables using report generated by SQ01). So how you will access them, then how you will reflect our changes in output ALV grid?
    Example:
    Data:
    Rate Cat.      Installation     Date
    71     60000984     20/10/2009
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    so in this case I want output:
    Rate Cat.      Installation     Date
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    You will see 71     60000984     20/10/2009 is not the latest one, therefore I don't want that row. I can do the ABAP logic for this, but exactly what and how to implement in SQ02?

  • 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
    Saravana

    hi 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

  • Difference bet SQVI & SQ01,SQ02, SQ03

    Hi all
    What is difference been SQVI  and SQ01,SQ02, SQ03????
    I hve alredy developed report using sqvi,
    Please tell me about sq01,sq02, sq03??????
    Regds
    ss

    Hi
    SQVI is user specific whereas SQ01... are not user specific.
    You write a qurey in SQVI and it is accessible only for you.
    But the other way in SQ01...
    Good Luck
    Hari

  • Use of SQ01, SQ02, SQ03

    Hai All,
             May i know that what is the use of SQ01 , SQ02, SQ03.How to use this ? How to create it ? Can we write our requirement in this ( addition to generated one )?
    Plz rely .
    Thanks & Regards
    Prashanth
    Message was edited by: Prashanth Konda

    Check this link
    www.sappoint.com/abap/ab4query.pdf
    Example
    To write ur requirement choose the option
    Data retrieval by program in SQ01.
    First Step is to create a dictionary structure . Include all the fields in this structure that you want to output.
    Then create a report program having the following structure .
    Report XXX .
    TABLES tab . Declare the already created dictionary structure also here.
    Parameters x . Define parameters here
    Select-Options:…….
    DATA :…..
    DATA : BEGIN  OF itab OCCURS xxx
                   END OF itab. Structure tab to hold the records to be evaluated.
    *<Query_head> This comment must always appear after your data declarations
    Code to define the table itab
    Loop to retrieve each record and place it in itab.
    SELECT,DO, LOOP ,….
    If necessary , code to format data
    *<Query_body> This comment must always be the last statement in the loop.
    End of loop
    ENDSELECT , ENDDO, ENDLOOP ,…
    Following is an example report program. Here youtput_struct is the dictionary structure.
    REPORT  yqueryprg                                .
    TABLES: bkpf,youtput_struct.
    DATA : BEGIN OF itab OCCURS 0,
           belnr LIKE bkpf-belnr,
           gjahr LIKE bkpf-gjahr,
           monat LIKE bkpf-monat,
           bukrs LIKE bkpf-bukrs,
           END OF itab.
    SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-t01.
    PARAMETERS: p_code LIKE bkpf-bukrs.
    SELECTION-SCREEN END OF BLOCK input.
    *Query head
    <Query_head>
    Start-of-selection.
    SELECT belnr gjahr monat bukrs FROM bkpf INTO TABLE itab
    WHERE bukrs = p_code.
    LOOP AT itab.
      CLEAR youtput_struct.
      MOVE itab TO youtput_struct.
    Query body
    <Query_body>
    ENDLOOP.
    Save and Activate this report.
    Then go to SQ02 transaction to create an infoset.
    Select the option Data retrival by program
    Enter datastructure name
    Choose External program name as your report name.
    Infoset ->Generate.
    Go to SQ03 to create a user group.
    Enter user group name and click on Create button.
    Enter description and save it in your development class.
    In the next screen , click on ‘Assign Infosets’ button.
    Here you select the infoset that you have created
    Save it.
    Go to SQ01. Select the user group that you have created.
    Then enter the query name and create. It will show the list of infoset that you have created. Choose the infoset you want.
    Choose BasicList Button.
    In the right side of the screen you adjust the output field width, background color etc.
    Go back and select the menu option Query -> Generate Program.
    Then Execute this Query.

  • SQVI SQ01 SQ02 transaction codes

    hi all,
    i am a trainee in SAP HR Payroll. I am required to use the SQVI SQ01 SQ02 t-codes to generate information for the user. i have tried to browse through these myself. but not sure if doing it the correct manner. any kind of documentation or tips would be very helpful.
    regards,
    kaustubh

    first go to Sq02
    On the left hand side there is a field by the name of infoset.
    Give any appropriate name. Then click on create button.
    then a screen will appear , write the name. In data source field click on Logical Database . Here you have to select PNPCE, PAP, PNP according to your requirement.
    If you want to create Query on anything related to applicant select PAP. If ur query is based on Master data select PNPCE.
    After selecting click on tick mark (green in colour) which is given below. A screen with different folders of infotypes will appear. Select the required infotypes which you want accoridng to your requirement. Then click on tick mark again.
    Then click on generate button (red & white in colour) (3rd button from the left). A screen will appear with the name
    create object directory entry. Here you have to click on local object button.. you will now see that the system haas generated a Message saying "Infoset------- generated.
    In sq02 there is a button with the name Role/User Group Assignment . Assign the user group out here.
    Then go to SQ01, click on infoset query. Select ur user group. You can see the name of the query which you have created.

  • Errors using SQ01 SQ02 and SQ03

    Hi ... I have an ECC 6.0 system with NW 7.0 ... our functionals people have to use the SQ01 SQ02 and SQ03 transactions to create an user groups for querys managment ... but in our production system I received the message "Changes to Repository or cross-client Customizing are not permitted"  , obviously our client is closed because its a production system.
    I don't have idea how to resolve this issue ?  I don't know if this issue is about basis or functional problem?
    Can anyone help me?
    Regards
    Subject modified
    Do not use CAPITALS on the subject
    Read the "Rules of Engagement"
    Edited by: Juan Reyes on May 25, 2010 4:08 PM

    Thanks Gagan
    It's working .... just I Inserted parameter AQW as 'blank' in the user parameters and that's all. I didn´t have to open the client in the scc4.
    sq01 sq02 and sqo3 are working
    thanks a lot for your note
    regards

  • Difference b/w RSQ02,SQ01,SQ02

    Hi,
    what are the difference betwween the transcation codes in infoset like RSQ02,SQ01,SQ02,..
    what are uses for tihs t-codes,
    regards,
    goodyear..

    Hi dear,
    take a look to this link http://help.sap.com/saphelp_erp2004/helpdata/en/f6/c39138e4a0341fe10000009b38f8cf/content.htm
    so you can better understand what's the relationship between infoset (SQ02), query (SQ01) and so on...
    then take a look to 486789 'Recommendations for using InfoSets in the BW' also...
    Hope it helps!
    Bye,
    Roberto

  • Download Query SQ01/SQ02

    Hi Experts!!!
    I would like to know if there's a way of downloading or exporting / uploading or importing a query made in SQ01. I need to replicate it in another system.
    Thanks in advance!

    hiii
    for downloading and uploading abap query follow stepps given below
    DOWNLOAD ABAP QUERY
    1. Go to SQ02 .
    Select Environment -> Query Areas..
    Select Standard Area (Client specific)
    (If Query does not exist in Standard Area then You will have to copy that Query From Global Area to Standard Area.)
    For Coping Query From Global To standard first select that query from list.
    2)Now select Environment-> Transports
    3)In next screen select Copy Global to standard radio button.
    Check Overwriting allowed (only with import/upload/copy)
    Remove Check for Test Run
    Select Transport InfoSets and queries radio button
    Fill Infoset and Query with corresponding names.
    4)Now Press Execute button.Copy Log will be displayed.
    Now Query exist in Global & Standard Area.
    5) Go to SQ02 .
    Select Environment -> Query Areas..
    Select Standard Area (Client specific)
    Select Infoset from list.
    6) Select Environment -> Transports
    7)Select Download radio button
    Check Overwriting allowed (only with import/upload/copy)
    Remove Check for Test Run
    Select Transport InfoSets and queries radio button
    Fill Infoset and Query with corresponding names.
    8) Click on Execute button
    Now It will ask you to save file.save it.
    Now Open another system where you want to make copy of that infoset.
    UPLOAD ABAP QUERY
    1. Go to SQ02 .
    Select Environment -> Query Areas
    Select Standard Area (Client specific)
    2. Select Environment -> Transports
    3)Select Upload radio button
    Check Overwriting allowed (only with import/upload/copy)
    Remove Check for Test Run
    Select Transport InfoSets and queries radio button
    Fill Infoset and Query with corresponding names.
    4) Click on Execute button.
    It will ask you for the place for uploading file.
    Select that place (from where you downloaded file).
    Now infoset & query is uploaded.Log will be displayed.
    5)Go to SQ02
      Select Environment -> Query Areas
      Select Standard Area (Client specific)
      SQ02 -> Infoset -> Generate.
      Enter Yes.
    6)Go to SQ01
    Select Environment -> Query Areas
    Select Standard Area (Client specific)
    Enter your Query Name.
    7)Click on Execute button
    regards
    twinkal

  • SQ01, SQ02 & SQ03

    Hi,
    I am creating user groups (SQ03), infosets (SQ02) and reports (SQ01) for different departments which may access the same infosets but have their own reports. The trouble I'm having is that no matter what user logs in to SQ01 they have access to run ALL SQ01 reports regardless of whether they are members of that user group or not.
    Is there a process or a particular order in which you create the user groups, infosets and reports so that any user can only access reports belonging to their user group?
    Thanks,
    Conor

    Hi,
    Generally QUERY's are User Specific (Pertaining to USER GROUP).
    Where as Reports are Global to all, Unless you restrict them with some Explicit Authorizations.
    check this link for Authorization:
    Authorisation check in ABAP Query..

Maybe you are looking for