Writing query through SQ01

Dear All,
How to write a Query in a SQ01. Please tell me the steps with an example.
Its very urgent.
Thanks & Regards,
Abhay.

Hi,
Check this out.
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Reward if helpful.
Regards,
Ramya

Similar Messages

  • Transport of infoset Query through Report RSAQR3TR

    Dear Hcm Gurus
    I have created query through sq01 and change functional area sq02 as per requirement in this query
    i have created additional fields in infoset in which i also assigned abap field code on newly created  data fields
    i also assigned new data fields to relavent field group as well
    but when i export and import as per mentioned procedures , additional data field are not imported in target client
    i have follow steps as mentioned
    Step 1
    Run RSAQR3TR in 'old' system. Select EXPORT and specify the objects to be transported. (System includes these in an automatically created transport request)
    Step 2.
    Release this transport and request it be transported to 'new' system. (This results in the entries being populated in transport table AQTDB in 'new' system).
    Step 3.
    Run RSAQR3TR in 'new' system. Select IMPORT and tick the Overwrite checkbox. Specify the transport number in the field labelled 'dataset with imports'.
    Kindly guide me urgently that how additional fields are transported in target client
    Regards
    Barket Ali Zafar
    SAP HCM Consultant
    Siemens Pakistan
    +92-0300-5521524

    yes
    but my question is ? that additional data field defineds in functional area /infoset are not importing ?
    Kindly guide me urgently

  • Require TCode used by user for sap query created through SQ01

    Hi All,
    I have number of SAP Query in production that currently are used by different-2 user & created through SQ01
    My question is how to know the TCode that used by user for SAP Query.
    Thanks In Advance
    Regards
    San

    Charlie
    You did not get the question.
    I knew the TCode of the query which I had created using tcode SQ01. user is using this query to see the report
    Like I created query named 'order_line_details'. This query is basically to see the order & other details. To use this by user one TCode'zncv_ord_item'  has been created.
    So in the system lots of query are available. So i want to know the Tcode for those query that are using by user.
    Thanks in advance
    San

  • SQVI transfer the query to SQ01

    Dear all
    I have created one query through SQVI,now i want to transfer that query to SQ01 .
    is it possible? if yes plz give me detail .
    thx

    Dear Surendra Patil,
    I dont think there's an option for doing this.
    What's the issue in SQVI? why do you want to transfer that to SQ01?
    Also check this link for creating a Query using SQ02 - Info set creation and SAP query creation in SQ01
    and if required user group creation using SQ03.
    [SAP Query|SAP Query]
    Regards
    Mangalraj.S

  • Find SAP Query for SQ01 in transaction ST03N

    Hello Experts,
    My requirement is to find the SAP Queries that were executed through the transaction SQ01 by the user in a given period. I am using transaction ST03N for the same.
    I am able to view the transaction SQ01 and the users who have executed the same in transaction ST03N for a particular period (day, month). But unable to see the SAP Queries executed through SQ01.
    I have checked the standard program RSSTAT26 but it only gives the data for 2 days.
    Please let me know how I can get the SAP Queries run through transaction SQ01 using transaction ST03N.
    Please treat it as high priority.
    Waiting for quick response.
    Thanks and Regards,
    Rahul Sinha

    Hi Danish,
    In the program name, the query name is always attached.
    For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
                           Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
    then you can find the infoset.
    And also you can gernate the program with the help of query name.
    Please try the same and let me know if any details are required.
    Regards,
    Darshana

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Error  while executing query through rsrt

    hello experts,
    I am facing following error while executing one HR query through rsrt.
    "System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01- (see long text) "
    while executing query through rsrt it automatically goes to debug mode, coming out of debug mode i get the screan showing above error message.
    What would be an issue?
    Regards,
    Nirav
    Edited by: Nirav Shah on Apr 21, 2008 8:19 AM

    Hi ramesh,
    I havent kept any execlusion selection. Though i saw long text, it is like this:
    "Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
      Notification Number BRAIN 299 "
    Regards,
    Nirav

  • Sap query report sq01

    Hello all
    I want to create new sap query in sq01 , the requirement is like this eg:- customer a/b/c , I want to generate the  list of last created sales order for the customers a/b/c here I have given 3 customers but I have to execute for 1500 customers
    If customer A creates 3 sales order in that 3 sales orders I want to pick last sales order on 12.09.2010 / 15.09.2010 /17.09.2010 in that I wnat to pick the last sales order 17.09.2010
    So in query report sq01 how to create, plz provide step by step procedure with this logic
    With regards
    Rahul
    Moderator Message: Search.
    Edited by: kishan P on Sep 17, 2010 4:47 PM

    Hi,
      better search in Google with the keyword 'SAP query tutorials',
    you will get lots of tutorials in the net with step by step approach.

  • In the output list Repeating one line always when generating query by sq01

    Hi,
    I have generated a query in sq01 for list material document for movment type 301 (Transfer posting) using below tables :
    MSEG          Material No. MATNR, Movt. - BWART, Qty. -MENGE
    MKPF          Material doc. field  MBLNR
    MARC          Stock in Transit UMLMC
    some times it is generating the output as i want i.e.
    Material document          material no.      qty.     movt.      stock in transit
    4001               1xx          1     301     0
    4002               2xx          2     301     0
    but some time it is repeating the same line in output ie..
    Material document          material no.      qty.     movt.      stock in transit
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    Please let me know the reason. is there any control in sq01.
    Thanks

    Yeah it is clear visible that, the same combination might have available in different plants.
    So to avoid the duplicate entries, always select all the primary key fields available in all the tables in the output.
    If not atleast try restricting based on plant in the selection screen or any possible duplicate entreis.
    So add the key fields at Infoset level in SQ02

  • SPARQL query through Jena adaptor not work when string literals used

    Hi,
    When I executed the following SPARQL query through Oracle Jena adaptor:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName ?name . }
    I got the expected results.
    However it won't return anything when I narrowed the query to match a particular name like below:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName \"Julie\" . }
    I also tried the Filter approach:
    SELECT ?personHasFirstName WHERE {?personHasFirstName foaf:firstName ?name . FILTER (?name =\"Julie\") }
    It still doesn't return any results.
    I saw from the release notes about the bug dealing with "\". My guess is that the above behavior is caused by that bug. What is the suggested way to walk-around this? Thanks,
    Weihua

    Could you please try this? It works as expected on my machine.
    GraphOracleSem graph = new GraphOracleSem( oracle, modelName);
    ModelOracleSem model = new ModelOracleSem(graph);
    Node sub = Node.createURI("http://test.com/employee123");
    Node pre = Node.createURI("http://xmlns.com/foaf/0.1/firstName");
    Node obj = Node.createLiteral("Julie");
    graph.add(Triple.create(sub, pre, obj));
    String queryString =
    " PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
    "SELECT ?person WHERE { ?person foaf:firstName \"Julie\" . } ";
    QueryExecution qexec = QueryExecutionFactory.create(
    QueryFactory.create(queryString), model);
    try {
    ResultSet results = qexec.execSelect();
    while (results.hasNext()) {
    QuerySolution soln = results.nextSolution();
    psOut.println("runQuery: soln " + soln);
    finally {
    if (qexec != null)
    qexec.close();
    output snippet:
    runQuery: soln ( ?person = <http://test.com/employee123> )

  • Getting SQL*Net more data from client waits when running a query through web based interface

    Hi, you all,
    We are having this weird behavior when running query through web based interface, we get a lot of "SQL*Net more data from client" waits, the OEM indicates that the current wait event is SQL*Net more data from client
    It's just a very simple query wich invokes a db link.
    When I execute the same query on any PL/SQL tool like toad or sql developer it works fine, but that query inside an application executed through a web based interface, it hangs for ever.
    Where can I start looking for the problem.
    We are working on a 3 Node RAC 11gr2, both databases are on the same RAC.
    Thanks.

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • Need helping in writing query for finding percentage of duration

    Can any one please help in writing query for this.
    The table is like this :-
    ID     Region     Month     Duration
    I1 R1     Jan     80
    I2     R2     Jan     70
    I3     R1     Jan     70
    I4     R3     Jan     40
    I5     R1     Feb     80
    I6     R2     Feb     30
    I7     R3     Mar     100
    I want to write a query to find
    % of duration for each and every region against each and every month.
    Please help in solving this query. I am in urgent need of this.
    Thanks in advance.

    I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
    Nicolas.

  • "Error #2032" while trying to import BEx query through SAP Netweaver BW connection in Dasboard

    Hi Team,
    BO server version: 4.1 SP3 Edge edition
    Dasboard Version: 4.1 SP3
    BI Version: NW 7.4 SP7 (ABAP only)
    We are getting Error #2032 while trying to import BEx query through SAP
    Netweaver BW connection in dasboard Xcelsius.
    Please suggest to sovle this error.
    Regards,
    Vinay Shrimali

    There are several notes about this error - please see http://service.sap.com/sap/support/notes/1856691
    http://service.sap.com/sap/support/notes/1801130

  • Junk characters displayed when viewing BEx query through WAD

    Hello,
    I am trying to display the results of a web report containing a BEx query through the "Execute in the Browser" option in WAD. But, junk Chinese characters keep showing up in the display. Also, if I try the same with one of the older web reports, they display fine. But, the moment I make a copy of these and execute without any modifications, the junk characters show up again.
    I tried executing through RSRT and there my report works perfectly. So, what could be going wrong or am I missing something?
    Thanks in advance!
    Menaz

    Thanks Emma.
    We figured it was related to the Unicode charset while I was going through the source code. I don't think there is any permanent fix yet. But, I followed the posting below and am trying to temporarily fix the error:
    Web Application Designer Appearing in Unicode (UTF-8)
    Thank you!

  • 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

Maybe you are looking for

  • Create sales order with reference to contract

    Hi, I have to create sales orders with reference to a contract. When I do the recording on lsmw the line items in the sales order are assigned a number from sap. I need to keep the line item numbers the same as per the contract. Any advice appreciate

  • Dv6 - Activating external display for BIOS etc (pre-windo​ws)

    G'day All, Can anyone help me work out how to get a Pavilion dv6 (dv6-3236NR /  LK469UA#ABA) to send BIOS display output to an external VGA monitor? (ie. not just within windows) I would consider it success if you can do the following =>  connect an

  • Alternate to group by clause

    Hi I am using Oracle 8i and one of my queries is getting the data from multiple sources through a dblink from other databases (customer need cannot avoid dblinks). The query is using the group by clause to get the count based on specific columns and

  • Transport G/L Account Groups - OBD4

    Hi - What is the procedure to Transport the entire contents of Table V_T077S from Development through to QA & PRD. Our Clients are inconsistent & wish to update in DEV & then Transport through to all Clients to PRD whislt also overwriting the current

  • Safari shuts down when I try to print a form--says its a pde plug-in.

    Does anyone else have this issue?