ABAP QUERY(sq02)

Hi friends,
     I am using PNP LDB in SQ02 .
     i am selecting AT SELECTION-SCREEN in "CODE tab" but it's not selected
     How to use "F4 help function module" in ABAP Query(SQ02).
Thanks & Regards,
Vallamuthu.M

Hi
Why you are using SQ01/02 query? you can't get all the facilities what you use in general abap program report
Query is basically intended for functional consultants to get the data by joining the tables
it is Client specific and user specific
You can't use all the events and F4 help like thing in them.
see the doc
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
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Create a report from ABAP Query (SQ02)

    Hi, guys.
    I must create a SE38- report that simulate the selection of a query in sq02.
    How can I do for call the query in my own report? (I know all...user group, name, structure name)
    I can do other elaboration from data after the calling of the query data?
    Thanks a lot for who answer me.
    Have a nice day.
    Edited by: Alessio Cantarelli on Feb 22, 2012 10:00 AM

    Thanks to all, it's allright.
    I found the program using the other function in 'Query' menù and copy with all the includes in my own report.
    Than, it was easy.
    Have a nice day

  • ABAP QUERY - SQ02 addition of logic in infoset (END-OF-SELECTION)

    I guys I have read this discussion: http://scn.sap.com/message/8193608#8193608
    but solve partially my problem.
    In particular I need special logic to interpret the single field from field symbol, for example:            
         loop at <goo> assigne <goo_wa>.                  
               tot_qty = tot_qty + <goo_wa>vbap-zmeng.
         endloop.
    I would like to add new row, with my logic into stracture of query %G00.
    thanks for any idea Omar

    resolved, it is must to use for all filed-symbols
    example
    types: beging of l_summary,
         matnr type matnr,
    end of l_summary.
    data: lt_summary type standard table of l_summary,
             ls_summary type line of lt_summary,
             lf_string type string.
    fiel-symbols: <gt> type standard table,
    <ls> type any,
    <lf> type any.
    lf_string = '%G00[]'.
    unassign <gt>
    assign (lf_string) to <gt>.
    if <gt> is assigned.
    loop at <gt> assigning <ls>.
    lf_string = '<ls>-vbap-matnr'.
    unassign <lf>.
    assign (lf_string) to <lf>.
    if <lf> is assigned.
    ls_summary-matnr = <lf>.
    endloop

  • ABAP Query - SQ02 and SQ01 - custom selection criteria

    Hello
    I am on 46C. In my infoset I need to define three custom fields for selections. I am able to do that. Once I create my query these appear on the selection screen. So far so good.
    1. I need to use these custom selection fields as selection criteria for the tables in the join. How do I do that ?
    2. If I need to default some values for these selection criteria, I can do that in the definition. However I need the values to be greyed out to prevent the user from editing the values entered. How do I do that ?
    Thanks
    Hari

    1. I see that the standard variant assigned at the query level in SQ01. actually protects the selection field. There is no coding to make it only display. This answers part 2 of my question.
    2. I am positive that the additional SELECTION that was created is being used in the main join that retrieves data in the query (in addition to being used for other things). I am not sure why somebody would define it that way instead of just creating a regular selection field in SQ01. Could it be because there is custom coding present for additional fields and there is reference to the selection variables needed for the additional field ?
    How does one make this additional SELECTION also a criteria on the join ? I have attached the actual join Query generates - WRK, VKO and VTW are additional selection criteria.
    FYI - this is an existing query, that I need to enhance
    Thanks
    Hari
    SELECT MBEWBWKEY MBEWMATNR MBEWPEINH MBEWSTPRS MBEW~VERPR
           MBEWVPRSV MBEWZPLP1 MARAMATNR MARAMEINS MARA~MSTAE
           MARAMTART T001KBUKRS T001KBWKEY T001BUKRS T001~SPRAS
           T001WAERS MARCMATNR MARCMMSTA MARCPRCTR MARC~WERKS
           MVKEMATNR MVKEPRODH MVKEVKORG MVKEVMSTA MVKE~VTWEG
    INTO (MBEW-BWKEY , MBEW-MATNR , MBEW-PEINH , MBEW-STPRS , MBEW-VERPR
         , MBEW-VPRSV , MBEW-ZPLP1 , MARA-MATNR , MARA-MEINS , MARA-MSTAE
         , MARA-MTART , T001K-BUKRS , T001K-BWKEY , T001-BUKRS , T001-SPRAS
         , T001-WAERS , MARC-MATNR , MARC-MMSTA , MARC-PRCTR , MARC-WERKS
         , MVKE-MATNR , MVKE-PRODH , MVKE-VKORG , MVKE-VMSTA , MVKE-VTWEG )
    FROM ( MBEW
           INNER JOIN MARA
           ON MARAMATNR = MBEWMATNR
           INNER JOIN T001K
           ON T001KBWKEY = MBEWBWKEY
           INNER JOIN T001
           ON T001BUKRS = T001KBUKRS
           INNER JOIN MARC
           ON MARCMATNR = MBEWMATNR
           AND MARCWERKS = MBEWBWKEY
           INNER JOIN MVKE
           ON MVKEMATNR = MARAMATNR )
           WHERE MBEW~MATNR IN SP$00002
             AND MARA~MTART IN SP$00001
             AND MARC~WERKS IN WRK
             AND MVKE~VKORG IN VKO
             AND MVKE~VTWEG IN VTW
             AND MVKE~PRODH IN SP$00003.

  • Pnp- logical db in abap query

    hi.
    i need to create an ABAP/sap query. when i created the InfoSet i used logical db-pnp.
    if i want to get only the employees which entered my organization during the last month where should i add the ABAP code,  under which section => extras -> code. i have there several options - data, initialization, at selection-screen output etc, what to choose??????????
    thanks,
    Ami

    Hi
    Welcome to SDN forum
    query has got some limitatins compared to Reports which we write using SE38
    these queries are user specific and client specific and can't be transportable and you can't write your own code as you wish like reports
    see the doc
    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
    Regards
    Anji

  • Creation of ABAP query

    Dear All,
    This may be a technical question.  I am trying to create the ABAP query by using 2 tables.  Went to SQ02, entered the  description of Infoset and given the first table name in the "Table join in the basis table" row.  When i entered to type the second table name, the program is getting terminated. (If I want to create a query by using one table, then the system accepts)
    If possible, can anybody explain me what could be the proble,?
    Regards
    Manivannan R

    You can post u r req in Expert Forums  » Application Server  » SAP GUI forum
    7.10 is now released, you can get it at
    ftp://ftp.sap.com/pub/sapgui/win/710/compilation1/
    and on
    ftp://ftp.sap.com/pub/sapgui/win/710/patches
    there are the newest patches available.
    http://iris.tennessee.edu/sapgui_vista.htm
    Message was edited by:
            SHESAGIRI.G

  • ABAP Query - Sorting Issue in Basic List (SQ03)

    Hi,
        I have developed a ABAP Query. I want to sort some of the fields, for which I need to add some output fields to the sort sequence box in the Basic List page in SQ03/SQ01. But, I am not able to drag and drop the fields directly. Please suggest how can this be done? Thanks in advance.
    Best Regards,
    Tejas Savla

    Hi Abhishek,
    There are three things related to Query.
    1) You have to create the USER GROUP in SQ03.
    2) You have to create the Infoset in SQ02. In this infoset you can write the logic of the program/Query what ever you want to perform.So you can sort the table in the infoset in the program logic.you have to create the output table of the query.
    3) you have to create the Query in SQ01 and you have to associate the User group and infoset . you have to design the layput of the output you want to have.this output fields would be same as you have defined in infoset(step 2).
    hope this will help you.
    thanks
    Tanmaya

  • Internal table in ABAP Query

    Hi all,
    Can we use internal table in ABAP/SAP Query (Infoset - SQ02)? If yes, Pls guide me on the same.
    Thanks in advance
    Regards
    Madhumathi A

    to my knowledge u can't use internal tables in ABAP query...it is a mix of tables...

  • Help in the ABAP query

    Hi Friends,
    I am having issue in the ABAP query in the HR report, i can able to change the column Heading in the report, but the same header is not coming in the layout details fields(after executing the ALV report we have layout options where we could not see the same header as in the coulmn heading)
    pls help me to solve this issue,
    Regards,
    boobalan.v

    Hi,
    Once you have made some changes to the infoset/query, You need to adjust the infoset(SQ02) and then regenerate the query(SQ01)
    >Menu->Query/Infoset->More functions->Adjust/Generate program.
    Letme know if this is still not reflecting..
    Reward if useful
    Regards
    Shiva

  • Hide/Delete lines from ABAP Query output when Quantity is 0

    Hi all,
    I'm changing an existing abap query. My requirement is to delete the rows from the report output where qantity = 0.
    I tried the following ways.
    1. In SQ01, select the quantity field and check the checkbox for "Display only field <> 0", but this didnt worked as it will 
         supress the zero from display.
    2. I tried to write code in the Infoset SQ02->Edit->Code. I wrote the following code "CHECK vbep-wmeng IS NOT INITIAL".
        Here  the problem is, the code is not executing in the test client. When I open the Infoset in test(i mean development test) 
        client the code is there, but when i execute the program its not working. I tried using "BREAK-POINT", program executions
        does not stop at the break point. There is existing code in the event "START-OF-SELECTION", this code I'm able to see in the
        query program opened through SE38. I edited the existing code and kept a break point in between, and now checked in the
        program in SE38, but the changes are not reflected. I'm able to see old code only(even after save n generate).
    3. Gave search in SCN, google etc.
    Please note.
    1. I'm not using any Logical Database in the Infoset. Its a simple join of 4 tables.
    2. Query is created in the Global Area (cross client) not client specific.
    Can anybody tell me what could be the problem and how can Over the above issues and achive the requirement.
    Thanks in advance.
    Edited by: Mr A on Feb 25, 2010 1:39 AM

    Dear Mr A,
    Can i know how did u solve the issue even i'm facing the same problem.
    Regards,
    Karan Bhasin

  • ABAP Query Doubt

    Hi All,
           I am using the ABAP query using the infoset Logical database PNPCE.
    When i select the fields for the output i am getting it. But i need to make some of the fields as mandatory in the selection screen.
    How can i make it.
    Regards,
    Yogesh

    Hello,
    Go to the info set of the query.
    SQ02 -> Enter the infoset name  -> click on 'Change'
    Go to the 'Selections' tab.
    There you will find all the selction screen parameters. Double click on the selection parameter which you want to make it a mandatory field.
    It will pop-up a dialog screen. On  this dialog screen on the input field 'Extras'
    enter the key word OBLIGATORY. Than don't forget to regenarate the infosets again.
    This will solve your problem.
    Regards,
    A.Singh

  • Abap query issue.

    Hi ,
    I have an existing abap query whose infoset has logical database ADA.
    Now I have to add a new table ANLC to this existing query .
    My main task is to add 3 new fields in the output of the existing abap query  One is a direct field from the ANLC table namely  Acquisition value and 2 other fields will be derived from the following formula :
    anlc-Acc ordinary depreciation + anlc-Ord. depreciation posted = Total accumulated depreciation.
    NBV = Acquisition value u2013 Total Acc depreciation
    Could you please sugest:
    1.  how to add  the ANLC table in the query?
    2.  How to calculate the above two fields and populate the output in an abap query?
    Thanks,
    Suchi.

    No, above mentioned is not the solution for your problem.
    I believe you want to write ABAP Query (i.e. Tcode SQ01), NOT the SQL Query in a normal program.
    Now, if you want to put abap code behind a field in your SQ01 query then you need to create custom field in your infoset. To learn how to create custom fields I have written a blog: SAP Adhoc Query SQ01 SQ02 SQ03
    Good news is that you do not need to create custom fields for the requirement that you mentioned.
    i want to fetch data where one field begins with 1* or 2* or 3* or 4* .
    For this, simply put the field on the selection screen by selecting appropriate check box and just use 1, 2, 3* or 4* in on the selection screen.
    Where should i COUNT the data selected and display it .
    when you execute the report, click on the 'Layout' icon, and select 'Column for number of rows'. It will give you last row with count. You can then save the layout as default layout so that it appears automatically.
    If you want to do anything different than above then you need to create custom fields, see my blog for that.

  • ABAP Query Selection screen

    Hi,
    I have an existing ABAP Query, my req is to add new Radio buttions block after the current seelction paramertes.
    i created radiobuttons in SQ02 infoset query with radiobuttons but when i run the report, selections screen has radio buttons first and then  previous selection criteria fields displaying...
    my req is first previous selection fields then radio buttons.
    how to change the sequence of the fields in selection screen?
    and based on the radio buttons, i need to filter the output data...
    in which event i have to write the code?
    Thanks
    Giri

    Sudheer,
    it is ABAP Query report... from SQ02... i cant modify those in SE38...
    current selection parameters are from table fields selected in SQ01 Query.... and radio buttons are in SQ02 Infoset.
    Giri

  • ABAP Query Selection screen parameters

    I need to add an additional selection screen parameter  in existing ABAP Query. How to modify the selection screen fields in existing ABAP query ? Kindly help me.

    Hi,
    GO to info set transaction SQ02
    Give the infoset
    Press change
    Press the selections button..Shift F7
    In the right hand side you will get a table control to enter the selection screen parameters..
    Press create button on top of the table control to create new parameters
    Thanks,
    Naren

  • Hyperlink on field in Basic list of ABAP Query

    Dear All,
    Could somebody tell me, if its possible to have a hyperlink on a field in the Basic list of ABAP Query (SQ01,SQ02).
    Example :- There is a basic list which has the field MARA-MATNR displayed.There should be a hyperlink on this field, such that when the user clicks on it , the transaction MM03 is called.
    Thanking You.
    Ranu

    Hi,
    Loop at itab.
    write:/ itab-matnr hotspot,
              itab-maktx.
    hide: itab-matnr.
    endloop.
    data: c_field(16).
    at line-selection.
      get cursor field c_field.
      if c_field  = 'ITAB-MATNR'.
        check not itab-matnr is initial.
        set parameter id 'MAT' field itab-matnr.
        call transaction 'MM03' and skip first screen.
      endif.
    This is one example to call the transaction.
    If this helps you award points.
    Thanks,
    Deepak.

Maybe you are looking for

  • Sax parse xml bug , I can't figure it out!

    (1) orginal xml file as followings: <row> <field name="productBundleId">22456</field> <field name="localPath">/products/01092008/RealArcade/STD_StonesOfKhufu_NOK6030_EN_v1_0_12.jar</field> <field name="description">/products/01092008/RealArcade/STD_S

  • Can't get pandora to play on Safari says missing plug-in.  What do I do?

    Can't get pandora to play on Safari says missing plug-in.  What do I do?

  • Sequence settings for mixed 24f,30f

    I shot a friend's wedding on a HVX in 24p on tape (not cards) and a 2nd camera 30fps on a consumer DV camera. I want to edit these together; I do not know what the Sequence settings should be or what challenges are involved. My final output is a DVD.

  • Error 3194 on windows on itunes updating ipod touch 5g

    i have ipod touch 5g 32gb running 7.0.1 then update it to 8.0 then update to 8. something i cant remember then after screen has a connect to itunes logo forever!. i connect to itunes then click recover then and after an update it says error 3194.

  • Logic 9.0 won't run on osx 10.7.3

    macbook pro, core 2, 2.4 gig just installed logic 9.0 on osx 10.7.3, error says that this version of logic wont run on this os. any clues? scott