Query Result SQ01,SQ02

Hi ,
The scenario is that users requirement is to look AR payment along with invoices against which payment recd including document header text.
I created one query related to AR invoice and recd payment (full payment). I joined 3 tables 1. bkpf 2. bsad and 3 kna1 and  selected all required fields but i am not getting the document header text ( Cheque no) details in invoice line item which i put at the time of payment entry.
Can it be possile through query?
Thanks in advance.
Regards,
Prakash

Hi,
I had a query report for AP review, you can refer to the following link, it works very well, I think for AR is almost same!
/people/tao.zhang/blog/2009/04/07/magical-function-2-of-sap-query
Hope can help you! Good luck
Regards
Tao

Similar Messages

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

  • 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

  • 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

  • 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

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

  • 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

  • Create query in SQ01

    Hello Abap Experts,
    What are the steps to create and execute query in SQ01. I have to create a query for a selected fields on top of vbak, vbap, vbrk, vbrp tables.
    Any suggestions suggestions / pointers / links are highly appreciated.
    Thanks,
    BWer

    First you need to create the infoset which will tie your tables together. Use SQ02 to do this.   Then in SQ01, when you create your query, you specify the infoset that you want to use.  Then its just a matter of pulling in the fields that you want in the output list and setting the selection fields.  Check out SQ02 to create your infoset, then use SQ03 to assign it to a user group.
    Regards,
    Rich Heilman

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

  • 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

  • Problems exporting query results to Excel

    Hi!
    I hope you can help me
    We have a web template that uses the class ZVIG_ART that we created in the transaction SE24, this class display some label in the query
    results, the problem is when we export this report to excel the label disappear. The numbers indicates the stock of the item and the label N/V indicates that the item is not in the  store's catalog. Another case is that we can have N/V items but with stock, for example the ITEM2 of the STORE3 with the label N/V-1piece.  How can we export this label to EXCEL?
               |  STORE1     |    STORE2   |  STORE3
    ITEM1      |  10 PIECES  |    N/V      |  20 PIECES
    ITEM2      |  11         |    20       | N/V-1PIECE
    Thanks in advanced.
    Veronica B.

    Hi Mari,
    Thanks for the reply.
    I can understand the resason for not being able to change the Posting Date. But what are the reasons for not being able to change the Document Date? What is the fiscal reason for not being able to change the Document Date? Please provide an example. Reversing the document doesn't work in this case as the SQ01 report would still include the incorrect date.
    Regards,
    Gary

Maybe you are looking for

  • Multiple 11i instances in 10g OID.

    Hi All, I have added second 11i(11.5.10) instance to OID for SSO(10g ). After adding the second instance in OID, users which are common in both the 11i instances are not able to login thru SSO. Unique users are able to login thru SSO successfully. Bu

  • How do I transfer pictures from an old iPhone to a new one?

    I'm soon going to switch to an iPhone 5S from an iPhone 4S and I want to know the easiest way to transfer my pictures. If this helps, I have a 2012 iMac with iPhoto and OSX Mavericks installed.

  • Can't get the DOM to output XML document tags in correct order.

    I'm trying to output an XML document from the DOM using the DOMWriter class: new DOMWriter(document, filename, outputEncoding, encodingTag, getDocTypeString()); It refuses to output the tags in the correct order so my document always fails validation

  • Illustrator files from China & output issues

    I just need to bounce this off of someone - we received several files (40 in fact) from China for Wal Mart - My Rip would not accept the pdf files created from these Illustrator files. They were created in Ilustrator CS4 in China and opened in Illust

  • F-47 amt field change

    hi gurus Can we change the amount field in T- F-47 ( Advance payment againt a PO)  after the request has been created, if not how to delete such request. Thanx Vivek