SAP Query - Modfication/Changes

Hi Experts,
I am new SAP Query, so i have come up with this issue. Please help.
I have an infoset query with me, also a SAP query and a transaction with some Z transaction code, the program name as taken from System->Status is AQZZZSD=========Z_SD_ORD_WO_ST.
1. Now I can see code in the program, but I cant see that much of code in the SQ02 under extras tab. 
2. Moreover, I have to change the code to address new requirements. How can I change the code in a SAP query???
What are the ways to change an existing SAP query's code ???
Thanks,
Chandan

Hi Chandan,
Go to Infoset (SQ02) in change mode, click on Code icon (Sfift + F8) displayed on Application bar.
You will find, 'Code section' where different events are listed. You can write your code in any of listed events depending on your need.
For ex. if you want declare any variable in u2018DATAu2019 Section, to initialize any variable can use INITIALIZATION event.
If you want to perform operation on selection screen you can use 'AT SELECTION-SCREEN OUTPUT'
And most important event for this tool is Record Processing event like if you want to have any condition and calculation or modification of field value, you can write code in this event.
END OF SELECTION BEFORE LIST--> You can write header information in this event. After this information, your output is displayed. (User WRITE statement to write your information)
END OF SELECTION AFTER LIST--> You can write footer information in this event. After query output, information mentioned in this event is displayed.
Note: END OF SELECTION BEFORE LIST and END OF SELECTION AFTER LIST work only when output format of your query (SQ01) is u2018ABAP LIST'
GET and GET LATE: When you select a logical database as a data source of an infoset, you get this additional event to maintain the code as per your need for LDB.
Please let me know if you need any further details.
Regards,
Dinesh
Edited by: Dinesh Tiwari on Sep 30, 2009 7:21 AM

Similar Messages

  • SAP query SQ01 change not reflecting in Querys ABA program

    Hi Guys,
    Need your opinion on this issue. We have modified an existing query in SQ01. Added a new selection field and re-arrranged the selection criteria in general. However, I do not see any change in the generated ABAP report. The timestamp on the report in SE38 is from almost a year ago. Am i missing a step here?
    Thanks.

    Hi.
    Please try.
    SQ01
    Input query ID.
    menu-Query-More functions-Generate program

  • SAP Query, user groups, revoking 'change' rights

    Hi,
    I have a problem regarding SAP Queries and revoking the change rights. This is what I have done:
    1. Created the new user group in SQ03
    2. Created the new InfoSet (SQ02), assigned it to the above UG (SQ03)
    3. Created the new user, assigned it to the UG in SQ03 and removed the Change checkbox (revoke change rights)
    4. Logged on as the new user
    5. Started SQ01, switched user group to the new one
    6. Created the new SAP query based on the new InfoSet, run the query
    As I understand the principles of user groups and queries, I wasn't supposed to be allowed to do the step 6 as the new user, as it was revoked the change rights. Why wasn't I stopped?
    I searched for reply in previous posts - everybody agrees on principles, but I didn't find explanation on why it doesn't work.
    Thanks in advance!
    KR,
    Igor

    The table AQGDBBN seems to display a mapping of User Group with use rindeed but the results are less than the actual assignment. And the mapping does not have the Z query usergroups that have users assigned in SQ03.
    Anything that I may be missing?
    Thanks,
    Kashif

  • Change the description of a field in a SAP QUERY

    Can i change the description of a field in a SAP QUERY report in the output of the report.or only the standard descriptions can be displayed.
    Edited by: mysap query on May 12, 2009 7:23 AM

    HI,
    in query maintenance (sq01) you can change the text of the field at the selection screen (change the selection text in the screen where you choose the selection fields) and the header text in the output list (basiclist maintennace , go to "basic list header", double-click each header field to maintain the text). This change is only for the particular query. No ABAP-er required to do so.
    BR Christian

  • Change header text of currrency field in sap query

    Hi,
    I have a sap query , fetching data from VBAP, one of the feild fetched is VBAP-WAVWR(cost) , for this feild query automaticaaly fetched the currency field , which i can not see in basic list in Transaction SQ01.
    I need to change the header text of this currency field which by default is 'CURR.'. TO 'COST CURR.'

    hello Kummr,
       in sq01, you can always change the field text as you want , go to sq01 ->change-> basic list , on the right hand side box click the field of "Curr" and change.
    rgds
    Mu

  • Problem Change SAP Query in Crystal Reports

    Hi,
    i have a problem with changing a SAP Query in an Crystal Reports.
    I build a Report with a Query(1) and Design the Report complet everything works fine.
    I make a new Query(2) and if i make a new Crystal Report with this new Query everything works fine.
    Now my problem is i would like to use the design of the first report. Therefore i open the first report and save it under a new name. Delete all Database fields and delete the database connection.
    Now i gave in the new database connection to the new query(2) and in the Database fields i see a lot of Fields but not the right ones. Its completly wrong. Is there anybody how know this problem?????

    Hi i solved my problem by myself.
    I have to set Query as external available and have to use the MDX Query.
    Its strange because if i build a new report the query dont have to be set as external available.

  • Change infoset in sap query

    Hi ,
    I want to change infoset name in sap query sq01.
    I dont want to create new query to change infoset name.
    Any other option?
    Regards,
    Satyen Trivedi

    Dear Satyen,
    Go to  menu Edit-->Other user group, choose the user group, where u have assigned the infoset no give the name of ur query and press create button, it will display all the infosets those are assigned with that user group. Now select ur infoset and start developing the query.
    see useful tips:
    10 Useful Tips on Infoset Queries
    Regards,
    Abbas.

  • SAP Query - Application Bar Changes

    Hi All,
    This is Regarding SAP Query -> Application Bar Changes...
    Go to T.Code SQ01-->
            Choose: Query  (Ex:- UserGroup:/SAPQUERY/ME & Query: MEPO ) -->
                 Execute(F8)-->u201CDynamic Selection Button(Shift+F4) u201D on Application Bar needs to removed from here..
    Kindly help where can I need to do the changes for Deactivating the u201CDynamic Selectionu201D Button.
    suggest me if any userexits/ Enhancements..???
    Best Regards,
    KALAM.A

    Hi
    Just as I said u should manage it in your DB in order to delete the free selection, if u can't do it u can try to suppress the pushbutton DYNS in AT SELECTION-SCREEN OUTPUT event in the INFOSET.
    U can use the fm to do it RS_SET_SELSCREEN_STATUS:
    DATA: T_EXCL TYPE TABLE OF SY-UCOMM.
      APPEND 'DYNS' TO T_EXCL.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          P_STATUS  = SY-PFKEY
        TABLES
          P_EXCLUDE = T_EXCL.
    Max

  • SAP BW Query in CR2008: only tech names displayed when query is changed

    Hello Experts,
    we have the following constellation / problem:
    SAP Query BW 7.0
    a report built upon this query with Crystal Reports 2008
    the report is currently not using any of the Database fields, is just consists of the layout
    Now we want to change / add the underlying query. But either if we add the new query or replace the old query by the new query, the result is the same:
    only the technical names of the query structures (UIDs) are shown, neither the descriptions nor the technical names (concerning SAP BW) are shown.
    The 'new' query is a slightly changed copy of the old query, I don´t think that is has to do anything with the query.
    As mentioned, everything seems to be perfect as long as we just do 'Create Report upon query', then the descriptions and technical names (not the UIDs) are shown, but not if we add / replace the existing query through another.
    Many thanks for your help in advance !
    Frank

    So the solution seems to be:
    Open the Query Designer and tick 'Allow External Access to this Query' on the Advanced Tab to allow access with OLE DB for OLAP to the query.
    Then the query appears in Crystal Reports under the source system and 'Queries' whereas before it is only accessible directly under the source system.
    If a query is accessible under the source system, the BW Query Driver is used, which seems not to be able to cope correctly with the technical names.
    If accessed via 'Queries', the BW MDX Driver comes into action and not only the tech names but also the description etc. is displayed.

  • How to change order of columns in SAP Query

    Hi,
    I am working on SAP Query for first time using txn SQ01. Have some doubts on it.
    ->  If i want to change the order of the fields in the output in an existing sap query, i could not find any
       way other than deselecting the fields and again selecting them in the order they want to be. Is there any
       other way for this ? By the way, can we create an SAP query without an info set.
    Thanks in Advance.

    Hi Prasad,
    Please take notice of the [Forum Rules of Engagement |https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] ]
    here you can read
    Step 3: Provide Feedback and an Update
    Finally, it's nice to follow up with a brief update if you found the solution. People may try to help not because they know the answer, but because they are interested in solving the same problem; or people may just encounter the same issue in the future and be searching the archives. It's a good way to give back to the community, irrespective of whether you are a beginner or an expert.
    We are interested not so much that but much more how you solved your question.
    Thank you for cooperation.
    Clemens

  • SAP Query; change the name of the selection fields

    Hi,
    I created a SAP query using SQ01. When I execute the report, the selection field are the names of the table fields. As an example, I would like to change the selection field name «Customer number 1» for «Customer number». How can I change this selection field name in a SAP Query?
    Thanks,
    Julien

    Check Page Number 8 of this below mentioned document
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c

  • How to change code in SAP Query

    Hi Experts !!
    In SAP QUERY I am getting the  PO  with  all delivey dates & deliveried Qty  but I have to select only  single PO with latest delivery date  & qty. If there r more than one record for latest delivery date than deliveried QTY must be sum of  all QTY (for the  latest delivery date). for example :
    this is coming
    Po                delivery date                 qty
    10001         30.06.2009                   4
    10001         30.06.2009                   5
    10001         01.05.2009                   4
    we want
    Po                delivery date                 qty
    10001          30.06.2009                   9
    Thanks in advance.
    Thanks & Regards
    Navneet Singhal

    >
    navneet singhal wrote:
    > There is an internal table  %G00 in  query generated program (AQCSZPCWMM======Z_PCW_ORDER_V2) when I use this table in Code section (END-OF-SELECTION ) system thro msg %G00 is not defined . if I define this table in DATA  section than  run the query , It gives the  DUMP  with error %G00 is already decleared.
    >
    > How can I use %G00 internal table  in my code section.
    I have the same problem as the OP. I need to get rid of the duplicates and have all sumarized in just one row. I was thinking about this same solution, but when I add code to the END-OF-SELECTION event, this doesn't appears anywhere (but if I add code to any calculated field, yes).
    And the problem of the quoted message. I tried using field-symbols but I have errors saying that it's nos a valid table, etc...
    Any ideas???
    Thanks!!!

  • Change Production order thru a SAP Query

    Hello,
    i have a SAP Query to recalculate some conversion factors in the routing of a production order.
    Because the header unit of the routing is M2 and the routing operation is PC for example.
    No i need a idea how it is possible to update the fields in the production order thru this query. I would like to put some codeing in an addidional field which update this values for me.
    I found this function module CLOI_CHANGES_UPL_31, but i am not sure if i can update the conversion factors with it.
    Also my ABAP knowledge is not the best so it would assist my greatly if you can give me some help.
    kind regards,
    Bernhard

    Solved.
    I use first SM35 to create a record for batch input and after this i use this record in the coding in the query.

  • SAP Query- Reporting on SOD

    Hello everyone,
    I need some help in creating a report in SAP Query based on user's processing Vendor Invoices and also Vendor Payments?
    I would like to have the following columns to report on:
    USNAM u2013 User Name (from BKPF)
    BLDAT u2013 Document Date (from BKPF)
    BELNR u2013 Document Number (from BKPF)
    BUKRS u2013 Company Code (from BKPF)
    BLART u2013 Document Type (from BKPF)
    LIFNR u2013 Vendor Number (from BSEG)
    NAME1 u2013 Vendor Name (from LFA1)
    WRBTR u2013 Amount (from BSEG)
    Vendor Invoice- I would like to restrict to only document type fields that are KA,KR,RC,RE,RN and ZE
    Vendor Payment- I would like to restrict to only document type fields that are ZV,ZS,ZP,ZH and KZ
    I have a few questions:
    First is i am using a logical database (BRM as BSEG cannot be joined) to select my columns however i do not know how to pull the 'Vendor Name' from LFA1. I understand that this table is not in BRM but is there a way to add any extra tables to work along side the logical database?
    Secondly, i have managed to report on all columns except the vendor name (from LFA1) and although i can restrict my output data based on document type fields, i need the report to only show the user's that have process vendor invoices & vendor payments only?
    At the moment i have a list of restricted document type but cannot seem to jsut show only those users who have processed both in both processes. For example User A has processed a vendor invoice (which is shown) and the same user may have processed vendor payment (after searching through the long output list!)
    I want all users who have doen one of the other process and only interested in those that have done both?
    Any feedback is much appreciated and pelase let me know if i have not explained this problem properly (as i am a newbie in this area)
    Many thanks
    Amar

    Hi Pascal,
    Since the IT2501 is a "Simulated Time Infotype" you cannot look at the data in it, but you can confirm the data from the ZL cluster and the data from the employee.  Since it is only this employee or a few employees, it is probably not the configuration of the time buckets for the IT2501, but you may want to make sure all time times are captured as you want.  Then look at the time entries for this individual or individuals.  Did they enter a time type that was not expected or configured?  Is all their time approved and passed through Time Evaluation?  Finally check the Master Data for the employee - is the Planned Working Time (IT0007) infotype correct or has it been recently changed?  Is he in a special Cost Center (IT0027) or Project that is captured differently for time purposes? 
    Since it just one or a few individuals, I would suspect the Master Data and some inconsistant entry that affects the time cummulation for the IT2501.
    Paul

  • Assigning a SAP Query to Transport Request

    Hi Friends
    I have a SAP Query, now I want it to transport to the other system, while saving the query it is not prompting for transport request. Is there any possibility to assign that SAP Query to a transport request, if yes, please let me know the process.
    Regards
    Praveen

    Dear All,
    This regarding creation of SAP Query .
    Situation:
    Infosets and User Groups were created in a DEV SERVER CLIENT 200 and saved in a request ie.REQ01
    Now i wanted to create a Query QU01 in the Same User Group  in DEV SERVER CLIENT 210  so i tried creating a Infoset but i get this error message
    Note: I am not able to create & save an Infoset.
    Message no. TK414
    Diagnosis
    You cannot edit request D01K901880 of user X00012, since this request is reserved for changes in client 200. You are logged on to client 210.
    Can anyone clear this error? what is the solution?
    Thanking You
    Andrew

Maybe you are looking for