Creating SAP Query in SQVI/SQ01

Hi Everyone,
I am planning to prepare a report on Auhtorization which will provide a mapping on the following:
Composite Role --> Single Role --> Transaction --> User
I am trying to prepare this using SQVI.
Could you please suggest how can I prepare that. Specifically how to establish 1-to-many or many-to-many relationship in SQVI/SQ01.
Thanks & Regards,
Sandipan

Hi,
find all tables (probably in S_PROFGEN package) you need and add them in SQVI.
Relations between them should appear automatically - but you can also set it manually.
It will create link between two tables - you can change it properties.
First try to find some standard report, which does the same.
Regards,
Przemysław

Similar Messages

  • SAP Query in SQVI transaction

    Hi All,
    I have created a Query in SQVI transaction, How to assign a transaction code for it.
    Thanks in advance
    Raju

    hi,
    follow the link:
    http://help.sap.com/saphelp_erp2005/helpdata/en/b7/26ddebb1f311d295f40000e82de14a/frameset.htm
    you will get full information about SAP Query.
    There is no SQV1 transaction.
    SQ01 --> maintain query
    SQ02 --> maintain info set
    SQ03 --> maintain user groups
    he SAP Query application is used to create reports not already contained in the default. 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 reports and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    The SAP Query comprises five components: Queries, InfoSet Query, InfoSets, User Groups and Translation/Query.
    hope this may help you,
    regards,
    srinivas

  • How to find the program name of the created sap query ?

    how to find the program name of the created sap query ?

    Hi avinash,
    Try in this way..
    Go to SE16 and then go to table TSTC.
    in that give program name as <b>*followed by your query name</b>
    (for example *TESTQUERY)
    and run , that will give progname======queryname.
    this way you can find program name.
    vijay

  • How to create sap query with "or" relationship

    dear experts,
    I need a report to display the employee whoese WSR is
    changed in the month for infotype 0007.
    that is ,we want to search with selection
    begda OR endda between 2008-01-01 and 2008-01-31.
    how to create sap query with "or" relationship?

    hi use like this,
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 =  p_pernr
        infty                   =  '0007'
       BEGDA                =  p_date1
       ENDDA                 = p_date2
      TABLES
        infty_tab             = itab .
    hi use this by passing the pernr to fm and giving the dates low and high in the p_date1 and p_date2.
    loop at itab where condition.
    endloop.
    may it helps u,
    regards,
    venkat.

  • How to create sap query

    how to create sap query if any one has the documentation pls foward to this mail id [email protected]
    thanks
    avinash

    check these links...
    http://www.sap-basis-abap.com/sapquery.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    http://help.sap.com/saphelp_nw04/helpdata/en/25/8f4dd72b0f9f4fa6712fcf2f65f505/frameset.htm

  • Creating SAP QUERY - question about tables in buisness transactions.

    Hello.
    I am pretty new to SAP.
    I want to create a query, as i so far have successfully done by creating a join in transaction SQVI.
    I am useing several tables;
    CRMD_ORDERADM_H
    CRMD_ORDERADM_I
    CRMD_ORDER_INDEX
    I have two questions.
    1: I try to join CRMD_ORDER_INDEX-PARTNER_NO with BUT000-PARTNER, but it won't do the trick. After a join like this i would like to join BUT000 with ADRC . Can someone explain how i could do this?
    2: I want join CRMD_ORDERADM_I with all the partners for the specific Item. (sold-to-party, shipping-party and so on). Can anyone tell me which table(s) i can find this in, and what fields to join.
    I will appreciate any answer to this

    Hi,
    For the second question, enter your transaction number ( Object ID ) into <b>CRMD_ORDERADM_H</b>  table. Pass the guid to table <b>CRMD_LINK.</b>
    Take set guid from CRMD_LINK and pass it to <b>CRMD_PARTNER</b>.
    You will get all the partners in that transaction
    regards,
    Prashant
    <b>Kindly Reward the points if helpful !</b>

  • Logical Database QNQ not working when creating a query in SQVI

    Hi All,
    When i try creating a Quick Viewer Query using SQVI on Logical Database QNQ, I do not get any output.
    What am i doing wrong? 
    Regards,
    Jr.

    Hi,
    The blank row that you get from your second select statement would appear at the end of the report. Put that statement first and it should be at the top of the first page
    Andy

  • Call screen in SAP Query selection screen (SQ01)

    Hi experts , in sq01 selection screen my requirement is: for one field  when the user call F4 the small screen should be appear and when they fill
    those 3 fields I should concatenate them and send it as a single field to query for process , the important thing is those 3 fields should be in '
    one line beside each other , is there a way like call screen or ... in  sq01 for this issue ??
    the screen that should be appear is something like this

    Hi,
    I dont think that ALV double click can be handles via SAP query. One possibility is that you can modify the report program that SAP generates for the query. Change the program to handle the double click evet on the ALV grid and call transaction ME23n using the PO number on the line selected.
    Regards
    Ajith

  • Duplicate records in the Results of SAP Query thru SQVI

    Dear All,
    I formed a query and joined EKKO, EKBE, EKET & EKES tbls to fetch information on the PO Item-Qty, Delivery Dt., Vendor's Confirmed qty, etc.
    However, in the results I get repeated records.
    Pls advise the possible reasons for above.
    Rgds,

    Shekhar,
    Using a join on these tables is illogical.
    EKBE, EKET & EKES each have many-to-one relationships to EKKO.  Joining all four tables will typically give you multiple output records with redundant data.  Also, using straight inner joins will exclude certain data that you will certainly want to see.
    Try instead using Logical Database MEPOLDB.  It will sort most of these things out for you.
    If you elect to use the logical database, beware of trying to use multiple selection criteria from the lower level tables (EKBE, EKET & EKES).  You will not always get the results you expect.   Better to only place EKKO fields as selection parameters.  Save the other table fields for display.
    Rgds,
    DB49

  • SAP Query thorugh SQVI not working

    I tried SQVI for some non-standard reports by Table-Join method. but i find very few times I succeed. Most of the times though the syntax is correct, when the selection screen is executed no data displays (with 'No data selected' message).
    What could be going wrong.
    Kindly help
    Regards
    Jogeswara Rao

    Hello,
    there can be few reasons for this:
    1. Your user authorization is low (maybe tables you have selected are not in your authorization profile)
    2. Maybe you have used incorrect join condition (inner/left outer join)
    3. Tables you are trying to join does not share the same information (watch for key fields as well)
    Best regards,
    Gabriel.

  • SQ01 Sap Query - additional fields doesn't appear

    Hi everybody,
    i've created a SAP Query with transaction SQ01 but one of my additional fields doesn't appear when i execute my Query.
    My query shows the G/L account number and the field status Group (table SKB1)
    I just need to display equally the text field of "field status Group" but it doesn't work.
    When i look at the parameters i can see that it makes the link between the table T004G and SKB1 in order to find the textfield but the field stay blank.
    For information T004g is a Pooled table.
    Is someone could help me?
    Thank you

    Hi,
    First you need to create a structure in Data Dictionary - SE11. This structure will contain all the fields that you want to display in the query output.
    Example - Name the Strucutre as zz_infoset01
    fields of the structure( for your requirement )
    BUKRS
    SAKNR
    FSTAG
    FSTTX
    Go to T-code SQ02
    1) Enter the Infoset name - zinfoset01 press create
    2) Enter a Short Description - G/L Infoset - 01
    3) select radio button - "Data retrieval by program"
                   and in "data structure" enter   zz_infoset01
    4) select "Integrated program" radio button
    5) In the next screen click on the "Data reading program" push button(on the application toolbar)
    6) An Editor will open with the following code
    REPORT  rsaqdvp_template .
      declarations
      (insert your declarations in this section)
    DATA:
      zz_infoset01                          TYPE zz_infoset01                          ,
      it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.
      selection screen statements
      (define your selection-screen here)
    !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_HEAD>
      read data into IT_DATA
    (select your data here into internal table IT_DATA)
      output of the data
      (this section can be left unchanged)
    LOOP AT it_data.
      zq01  = it_data.                        .
    !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_BODY>
    ENDLOOP.     
    7) when you insert your code in the sections it will look like this
    REPORT  rsaqdvp_template .
      declarations
      (insert your declarations in this section)
    Tables:SKB1,
              t004g.          
    DATA:
      zz_infoset01                          TYPE zz_infoset01 ,
      it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.
      selection screen statements
      (define your selection-screen here)
    !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_HEAD>
    *These will be the input parameters for the query
    parameters: sp_bukrs like skb1-bukrs,
             sp_saknr like skb1-saknr.     
      read data into IT_DATA
    (select your data here into internal table IT_DATA)
    *get all the G/L for com code and G/L in selection screen
    SELECT bukrs saknr fstag
                INTO TABLE it_data
                FROM skb1
                WHERE bukrs = sp_bukrs
                AND   saknr = sp_saknr.
      output of the data
      (this section can be left unchanged)
    *for every G/L get the status text from t004g for lang 'EN'
    LOOP AT it_data.
    SELECT SINGLE fsttx
                    FROM t004g
                    INTO it_data-fsttx
                    WHERE spras = 'EN' "Language
                    AND   bukrs = it_data-bukrs
                    AND   fstag = it_data-fstag.
      zz_infoset01  = it_data.                        .
    !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_BODY>
    ENDLOOP.     
    8) Save and generate the Infoset.By clicking on the generate button.
    9) Now assign the Infoset to the query in SQ01 and select the output list fields.
    let me know if you need more info. Also award points if helpful.
    Regards,
    Santosh

  • 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

  • How to call SAP query in a program

    Hi experts
      I have created a query in SQVI its gives a result. Now i want this query to be used in my program. Is there any FM which gets the quary name and populates the result in iternal table. So that i can use that result.
       I know without query you can write using the tables you can fetch the records but i just want to explore a new way to do things. If any body done such type let me know and also give some sample code or process how to achieve it.
    Regards
    Vijay

    Hi Siva
      My final option is that only. That you can do any how. But my intension is to learn something new way. How to do copy the query and where to inject the code is there any example in wiki or artical for that. I want to something new. Old way of creating a report program is possible i want to do this way. If some body could help me out.
    @ karthik
       I have generated the SAP query and i got the program but when i view the code i dont find any select statment or where storing my input data. How to identity that i did in debug mode but am not sure where it pulls the data and where it put in internal table. Can you throw some light with example code or an article.
    Regards
    Vijay

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

    Identify 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.

  • SAP query for SPRO table

    HI experts, Im about to create a Sap query using SQVI tcode. I want to have listing of certain master data created in customizing(SPRO) like the catalogs and list of code groups and task codes in Service Notification. What is the best data source or the table should I use to capture this data? Or is this possible? If not, can you give me some ways how to have listing report for those information.

    Hi,
    Have you checked with t-code QS42 ?
    Tables - QPGR, TQ15.
    Regards,
    Vivek

Maybe you are looking for