Debugging a query

Hello,
Sombody provide me how to debug a query
I could not find good link in sdn
I am looking step by step Instructions how to debuging a query?
Advance thaks

Hi Roy,
why do you need to debug the query? do you search for information why a specific result appears? If yes, you can execute the query in web or rsrt right click on keyfigure cell and choose keyfigure definition. In that case you will get an explanation about the way the keyfigure is calculated.
If you would like to find out how queries are executed and how OLAP works, choose the option already provided in the other response.
best regards,
Kai

Similar Messages

  • How to debug Infoset Query in ABAP?

    Hi
       I have an Infoset Query created by another user, please let me know how to debug this?
    Thanks
    Naga

    Nagarani - For debugging a infoset query, you have to create a query in SQ01 for the infoset which you are planning to debug. Once the query in transaction SQ01 is generated, Activate the same. Use the following path to generate program for created query from SQ01  QUERY--> MORE FUNCTIONS > GENERATE PROGRAM. Once the program is generated use the path QUERY>MORE FUNCTIONS --> DISPLAY REPORT NAME to get the report name generated. Copy the report name displayed.
    While using the menu paths for generating program or displaying report name, make sure the query is selected.
    In transaction SE38, give the report name and maintain break points whereever required in display mode and execute the report from se38.
    Edited by: Santhoshi Guttula on Jan 6, 2012 7:44 AM

  • Debugging Bex query

    Hi All,
    I have a scenario where an Bex query is called in an webdynpro application using a standard method. I would like to debug the generated program of this query (got it from RSRT) to understand the variables passed.
    But I am having difficulty in understanding this standard code. Can anyone help me in finding out the exact place where I have to set the breakpoing to see the input variables passed to this query.
    Thanks
    Jeevitha

    Hi,
    Have you tried to execute report in RSRT with Execute + Debug >> in Debug option select Variables and execute.
    It will open ABAPdebuggerm then press F6 and will take you to various Methods like VARIBLE_START, SET, PROCESS VARIABLES.. etc.
    At last it will take to method CONSTRUCTOR and then an event START-OF SELECTION. Their you have a start of Create object .
    I guess here you can set a breakpoint.
    Or try by setting breakpoint on statement "CALL SCREEN 200" in START-OF-SELECTION. After this statement is will take you to input screen.
    Thanks,
    Jitender.

  • How to debug a query in Apex

    Hi all,
    I have written a query under region source in interactive reports
    select getTextColumnByID(:ID,OHR_PARAMETERS,VALUE) as Description,max_mark from max_marks where
    employee_id='Z901234';and it throws error as ORA-00904: "VALUE": invalid identifier
    How do i debug and locate the probelm?
    thanks

    No it does not work,,It throws the same error.I found the problem its because the query throws multiple rows where only one row is expected.
    the query should be like
    select getTextColumnByID('ID','OHR_PARAMETERS','VALUE') as Description,max_mark from max_marks where
    employee_id='Z901234';to get compiled.

  • How to debug a query that BI Publisher refuses to accept in a data set.

    Paste query and hit OK.
    Read useless error message.
    Remove all report parameters.
    Remove all function calls.
    Place pairs of parethesis around random bits of code.
    Delete one line at a time from query and attempt to hi OK each time.
    Whittle down your query until it looks something like this:
    SELECT 1 FROM DUAL
    Go to Oracle Open World with a sign reading:
    END THE ORACLE BUG ARMAGEDDON!

    with
    search_box_information_view as
    (select 1 box_id,111222332 control_number,'In Use' status,to_date('1/1/2015','mm/dd/yyyy') destroy_after_date,55 facility_key_fk from dual union all
    select 1,111222333,'In Use',to_date('1/1/2015','mm/dd/yyyy'),1153 from dual union all
    select 2,111222334,'In Use',to_date('1/5/2015','mm/dd/yyyy'),1153 from dual union all
    select 3,111222335,'In Use',to_date('1/7/2015','mm/dd/yyyy'),1153 from dual union all
    select 2,111222336,'In Use',to_date('1/9/2015','mm/dd/yyyy'),55 from dual union all
    select 3,111222337,'In Use',to_date('1/12/2015','mm/dd/yyyy'),55 from dual union all
    select 4,111222338,'In Use',to_date('1/15/2015','mm/dd/yyyy'),55 from dual union all
    select 4,111222339,'In Use',to_date('1/15/2015','mm/dd/yyyy'),1153 from dual
    select box_id,control_number,destroy_after_date,facility_key_fk,
           count(*) over (partition by facility_key_fk) cnt
      From search_box_information_view
    where status = 'In Use'
    order by facility_key_fk,control_number
    BOX_ID
    CONTROL_NUMBER
    DESTROY_AFTER_DATE
    FACILITY_KEY_FK
    CNT
    1
    111222332
    01/01/2015
    55
    4
    2
    111222336
    01/09/2015
    55
    4
    3
    111222337
    01/12/2015
    55
    4
    4
    111222338
    01/15/2015
    55
    4
    1
    111222333
    01/01/2015
    1153
    4
    2
    111222334
    01/05/2015
    1153
    4
    3
    111222335
    01/07/2015
    1153
    4
    4
    111222339
    01/15/2015
    1153
    4

  • Plz help me debug this query

    query
    create table third_party
    (customer_id varchar2,
    third_party varchar2,
    foreign key (third_party) references account(type),
    foreign key (customer_id) references customer(customer_id),
    primary key(customer_id,third_party));
    Error
    ORA-00906: missing left parenthesis

    Please see this ..these are done
    create table account
    (account_no number primary key,
    type varchar2(10),
    balance number(20) );
    create table registered_account
    ( account_no number primary key,
    customer_id varchar2(10),
    foreign key (account_no) references account(account_no),
    foreign key (customer_id) references registered_users(customer_id) );
    create table registered_users
    (customer_id varchar2(20) primary key,
    user_id varchar2(10),
    login_password varchar2(10),
    foreign key (customer_id) references customer(customer_id));
    create table transaction
    (transaction_id number primary key,
    to_account number,
    from_account number,
    tr_date date,
    amount number,
    customer_id varchar2(10),
    foreign key (to_account) references account(account_no),
    foreign key (from_account) references account(account_no),
    foreign key (customer_id) references customer(customer_id));
    create table has
    (customer_id,
    account_no,
    foreign key (customer_id) references customer(customer_id),
    foreign key (account_no) references account(account_no),
    primary key(customer_id,account_no));
    create table customer
    (customer_id varchar2(20)primary key,
    name varchar2(15),
    address varchar2(50),
    city varchar2(20),pin number(6),
    dob varchar2(10),ph_no number(10));
    The following is nt working
    create table third_party
    (customer_id varchar2(20),
    third_party varchar2(10),
    foreign key (third_party) references account(type),
    foreign key (customer_id) references customer(customer_id),
    primary key(customer_id,third_party));

  • Try to debug the query when save button pressed

    Hi, could some body tell me how can I see the SQL statement when the trigger is executed. I have a save button, when it is pressed it does a commit to insert data to database. I would like to see a sql statement something like : "insert into xxxx (xxx,xx,...) values (xxx,xx,...). I checked the System.last_query but it still shows the select statement to get into the form. Not the actural LAST STATEMENT. please help!

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • Debugging in SQ02 (Sap Query Report)

    Hi All ;
    I want to learn that ,how can I debug a sap query report.I added some fields to the query with code.
    How can I reach that code by debugging ?Thanks for your reply.
    Regards.
    Fırtına.

    Hi Yigit,
    Every Query generated one program like  AQZZ/FSCMA/IS===CDM_10_Q1=====
    Go To your QuerySQ01 , run your query and From selection screen, check your program name  after that you can search your added code. what you added in infoset but your breakpoint  and debug your query code.
    Regards,
    Prasenjit

  • Cisco WSA S170 AsynOS 7.5.2 LDAP group query debug

    Dear support forum members,
         I have some problems with the Cisco WSA S170 (AsynOS 7.5.2). It looks like a bug. I have two users in my Active Directory(AD), both of them are members of the InternetGrp6 AD group, both of them are in the same organization unit in the AD tree, but WSA could not identify that one of them member of the InternetGrp6.
         I understand that WSA do this over the LDAP query to AD controller, but I could not found the way how do I debug LDAP query. This will give me ability to find out what happened during the user group LDAP query.
    Thanks in advance!
    Best regards,
    Alexander.
    P.S. Sorry for my English.

    Hi,
    First of all I would like to thank you for assistance!
    It is a pity, but I received  "Unknown command: ldapsearch" in the SSH CLI session.
    AsyncOS 7.5.2 for Web build 304 installed.
    Best regards,
    Alexander.

  • Text Variables are not being Displayed in the Output of the Query

    Hi All ,
    We have some column headings , which are populated through the Text Vaiables , But in the Query Ouptput only the tech names of the Text variables are being displayed . can anyone tell me why its happening like this . I want to debug the Query , please guide me in this regard
    Thanks in Advance.. Pls reply me as soon as possible

    Hi Nagarjuna reddy,
    Click on the properties of the infoobject enter the name of the description and next to that you can see the X/? buttion click on the this button and select the field/if the proper field is not there then create a field descriton and select. i hope this is works and correct me if i am wrong. for debuggin the query use a transaction code- RSRT.
    regs,
    Vachan

  • Error executing a query (validity interval problem in variable)

    Hi all,
    I have an issue in a query.
    While executing the query  i am getting following error
    "THE VALIDITY INTERVAL HAS THE INITIAL VALUE AS LOWER LIMIT"
    There are two CALMONTH variables that are being used in the query and are also used as selection variables
    1) interval characteristic mandatory variable
    2) single value characteristic mandatory variable
    Please suggest me what might be the problem.
    Any suggestions are welcome.
    Thanks
    Mudit

    Hello,
    I tried debugging my query in RSRT and i have found a possible reason for that.
    My query was built on a multiprovider in which data was not loaded in one of the cube.Since no request was loaded in the infocube initial fields of all time characteristics were empty which was the reason for the error.
    Thanks once again for your valuable inputs.
    Mudit

  • Error in BW3.5 query execution

    Hi,
    I am trying to execute BW3.5 reports and facing below error on them.
    *Specify a value for variable 0P_FPER
    System error in program SAPLRRK0 and form APPEND_KHANDLE_1-01- *
    I executed same in Dev. system and error remains same.
    Specify a value for variable 0P_FPER : this is a SAP exit variable maintaining in Fiscal year Object where these properties are Optional and not selected Read for input (Checked in Dev.)
    *System error in program SAPLRRK0 and form APPEND_KHANDLE_1-01- * : verified this issue  in SAP market place and we have adequate OSS notes in SAP system.
    Let me know any further information required?
    It is apreciated any one could help on this and very very urgent for us.
    Thanks,
    Praveen

    Hi,
    check following thread
    http://forums.sdn.sap.com/thread.jspa?threadID=141178
    also try looking at following options
    1. try to generate query in RSRT and see if it runs
    2. Put breakpoint on some exit variable in query and try debugging the query through RSRT again.
    see if there is any specific sap note if 1 and 2 doesn't solve your issue.
    Thanks and regards
    Kiran

  • Need help in framing an SQL query

    Hi ,
    Requirement is that
    Let’s say I have a table say X
    I am passing two input params from UI and in DAO i am querying these input prams against the table X(has c1,c2 as columns ) (as it has two columns mapping the input params A,B from UI).
    if either one or Both of the input params matches ,only then i should fetch the records accordingly. It's understood that there won't be a scenario that both input params are null from UI.
    I have three conditions here,
    1.     A match against X, B doesnt Match
    2.     B match against X, A doesnt Match
    3.     Both A & B match against X
    if i use let's say,
    SELECT *FROM X WHERE (c1= A OR c2= B) .
    •     if A match against X B doesnt Match It is fetching all the records matching A - requirement fullfilled
    •     B match against X A doesnt Match It is fetching all the records matching B- requirement fullfilled.
    •     Both A & B match against X It is fetching all the records from the table matching the first condition (which here is A) . requirement not fullfilled.
    I am thinking of using the following query but I need to frame it in a way that based on ACHK & BCHK we need to add the conditions.
    SELECT CASE WHEN C1 = A THEN 0 ELSE 9 END AS ACHK, CASE WHEN C2 = B THEN 0 ELSE 9 END AS BCHK FROM X
    Based on ACHK & BCHK append the conditions. i.e.
    IF ACHK = 0 AND BCHK = 0 THEN
    AND C1 = A AND C2 = B
    ELSE
    AND (C1 = A OR C2 = B)
    Please help.

    Hi,
    963022 wrote:
    Would be glad if you can shed some light on role of DENSE_RANK here (ofcourse i did read the forums but i am confused on what basis a row is ranked).Complicated queries and expressions are usually built of smaller, simpler parts. To understand how the big, complicated thing works, look first at the smaller, simpler components of it, and make sure you understand how they work.
    In this case, the query is composed of a sub-query and a main query. Start by looking at the sub-query only. Display all rows and all columns of the sub-query.
    Break apart the complicated components of that sub-query. Rnk depends on an ORDER BY clause, but the expression used in that ORDER BY clause isn't displayed anywhere. Copy and display just that expression. (I called this case_1_2 in the query below.) Even that may be too complicated to understand, so break it apart. Case_1_2 is formed by adding 2 smaller CASE expressions; in the query below, I displayed each of the in separate columns (case_1 and case_2).
    So here's a query you might use to understand and debug the query I posted:
    WITH     targets          AS
         SELECT     'ABC' AS c1, 10 AS c2  FROM dual     UNION ALL
         SELECT     'ABC',          20            FROM dual     UNION ALL
         SELECT     'FOO',          10            FROM dual     UNION ALL
         SELECT     'FOO',          20            FROM dual     UNION ALL
         SELECT     'FOO',          99            FROM dual
    ,     got_rnk          AS
         SELECT     x.c1, x.c2
         ,     t.c1          AS target_c1
         ,     t.c2          AS target_c2
         ,     DENSE_RANK () OVER ( PARTITION BY  t.c1, t.c2
                                   ORDER BY          CASE
                                                 WHEN  x.c1  = t.c1
                                         THEN  1
                                         ELSE  0
                                             END
                                   + CASE
                                                 WHEN  x.c2  = t.c2
                                         THEN  2
                                         ELSE  0
                                             END
                             DESC
                           )          AS rnk
    --     *****  DEBUGGING SECTION  *****     The following columns are included only
    --                                       to see how the function above works.
         ,                               CASE
                                                 WHEN  x.c1  = t.c1
                                         THEN  1
                                         ELSE  0
                                             END
                                   + CASE
                                                 WHEN  x.c2  = t.c2
                                         THEN  2
                                         ELSE  0
                                             END           AS case_1_2
         ,                               CASE
                                                 WHEN  x.c1  = t.c1
                                         THEN  1
                                         ELSE  0
                                             END           AS case_1
         ,                            CASE
                                                 WHEN  x.c2  = t.c2
                                         THEN  2
                                         ELSE  0
                                             END           AS case_2
    --     *****  END OF DEBUGGING SECTION  *****
         FROM     targets  t
         JOIN           x  ON   x.c1     = t.c1
                       OR   x.c2     = t.c2
    --     The following main query is only for debugging
    SELECT       *
    FROM       got_rnk
    ORDER BY  target_c1, target_c2
    ,            rnk
    ;Output:
                  TARGET TARGET          CASE
    C1         C2 _C1       _C2    RNK   _1_2 CASE_1 CASE_2
    ABC        10 ABC        10      1      3      1      2
    ZZZ        10 ABC        10      2      2      0      2
    ABC         5 ABC        10      3      1      1      0
    ABC         6 ABC        10      3      1      1      0
    ABC         7 ABC        10      3      1      1      0
    ABC         1 ABC        10      3      1      1      0
    ABC         3 ABC        10      3      1      1      0
    ABC         2 ABC        10      3      1      1      0
    ABC         8 ABC        10      3      1      1      0
    ABC         9 ABC        10      3      1      1      0
    ABC         4 ABC        10      3      1      1      0
    ZZZ        20 ABC        20      1      2      0      2
    ABC        10 ABC        20      2      1      1      0
    ABC         2 ABC        20      2      1      1      0
    ABC         1 ABC        20      2      1      1      0
    ABC         9 ABC        20      2      1      1      0
    ABC         8 ABC        20      2      1      1      0
    ABC         7 ABC        20      2      1      1      0
    ABC         6 ABC        20      2      1      1      0
    ABC         5 ABC        20      2      1      1      0
    ABC         4 ABC        20      2      1      1      0
    ABC         3 ABC        20      2      1      1      0
    ABC        10 FOO        10      1      2      0      2
    ZZZ        10 FOO        10      1      2      0      2
    ZZZ        20 FOO        20      1      2      0      2Study this output to see how the different components work.
    For example, the first 12 rows of output show what we found when we were looking for ('ABC', 10). There were 12 rows in table x that had either ca='ABC' or c2=10 (or both). We used the rnk column to find the best match: lower numbers mean better matches. How did we do that? By using the DENSE_RANK function with a DESCending order by clause, that is, we used <tt> DENSE_RANK () OVER (... ORDER BY exp DESC) </tt>, which means that higher values of exp produce lower values from DENSE_RANK. What is exp? It's the column I called case_1_2. As you can see, when there was a perfect match ('ABC', 10), then case_1_2 had the value 3. Less perfect matches got lower values of case_1_2; for example ('ZZZ', 10) only had 2 in the case_1_2 column, and ('ABC', 5) only had 1. Why did case_1_2 have values of 3, 2 or 1 on those rows? Well, it's the sum of case_1 and case_2, so look at those individual columns, and see how they are computed.

  • Problem in select query in QUERY INFOSET

    Hi All
    I have requirement to find the sales text maintained for sales order in mass in production. By using the FM READ_TEXT i can pass the necessary values to get the sales text. We dont want to write a program and then transprot to P01. So what i did in SQ02 i create a infoset and worte code in the infoset. Here i am facing the problem that in the select query where clause what ever  on the selection screen values, for that the query need to fetch the records. But selection screen is dymically selected based on SQVI t-code.
    In select query if i write like this
    SELECT TDOBJECT TDNAME TDID TDSPRAS
           FROM STXH
           INTO TABLE IT_TEXT_DETAIL
           WHERE TDOBJECT     EQ C_KNMT .
    Here i have hardcoded KNMT so it will fetch only that value irrespective of any values on the selection screen. How to get the values based on the selection screen. I debugged the query it automatically generates the code for selection screen which i am not able to pass in the program.
    SAP has generated this code
    select-options SP$00004 for STXH-TDOBJECT.
    select-options SP$00005 for STXH-TDNAME.
    select-options SP$00006 for STXH-TDID.
      If i pass SP$00004 on where clause its giving me error. So how to pass it dynamically. Waiting for experts answer.
    Regards
    Vijay

    Hi Vijay,
    In this case concatenate 'TDOBJECT' 'EQ' C_KNMT INTO V_WHERE (Say) SEPERATED BY SPACE.
    DATA : v_where(90) type c.
    clear v_where.
    CONCATENATE  'TDOBJECT'
                               'EQ'
                               C_KNMT
                               INTO V_WHERE
                               SEPERATED BY SPACE.
    SELECT TDOBJECT TDNAME TDID TDSPRAS
           FROM STXH
           INTO TABLE IT_TEXT_DETAIL
           WHERE (V_WHERE) .
    Try to do this and let me know in case of any.
    Regards,
    SRinivas

  • ESYU: R12 - R12 Trace/Debug file을 생성하는 방법

    Purpose
    Version: 12.0
    Information in this document applies to any platform.
    R12에서 Trace와 Debug file 생성 방법을 알아본다.
    Solution
    1. Navigate Responsibility: System Administrator> Profile> System>Query
    User: Trace를 생성할 user 명을 입력
    Profile: Initialization SQL Statement - Custom
    2. User columne에 아래의 내용을 입력
    begin fnd_ctl.fnd_sess_ctl('','','TRUE','TRUE','LOG','ALTER SESSION SET EVENTS='||''''||'10046 TRACE NAME CONTEXT FOREVER,LEVEL 12'||''''); end;
    3. 입력한 내용을 저장
    FND debug messages를 생성:
    4. Navigate Responsibility: System Administrator> Profile> System>Query
    User: Debug를 생성할 user 명을 입력
    Profile: FND:%Debug%
    5. 아래 profile options 값을 user level로 set
    FND: Debug Log Enabled Yes
    FND: Debug Log Filename <empty>
    FND: Debug Log Level STATEMENT
    FND: Debug Log Mode Asynchronous with Cross-Tier Sequencing
    FND: Debug Log Module %
    6. 입력한 내용을 저장
    Example:
    7. Navigate: Payables Responsibility> Other> Request> Run> Select and Submit the Report
    (특정 Report를 실행한다)
    8. Trace 와 FND Debug messages를 disable
    9. FND Debug message를 찾기위해 아래 query를 실행
    select log_sequence, timestamp, module,message_text
    from fnd_log_messages fnd
    where trunc(timestamp) = trunc(sysdate)
    and (module like '%xla.%' or module like '%ap.%')
    and trunc(timestamp) = trunc(sysdate)
    order by timestamp;
    SELECT log_sequence, message_text,substr(module,1,100)
    FROM fnd_log_messages msg
    , fnd_log_transaction_context tcon
    WHERE msg.TRANSACTION_CONTEXT_ID = tcon.TRANSACTION_CONTEXT_ID
    AND tcon.TRANSACTION_ID= /*Give the request id of accounting program*/
    ORDER BY LOG_SEQUENCE desc
    Debugging의 활성화를 위해 아래 profile option을 사용:
    FND: Debug Log Enabled : Yes
    FND: Debug Log Level : Statement
    Debug message를 얻기 위해 아래 query 문을 사용:
    SELECT substr(module,1,70), MESSAGE_TEXT, timestamp, log_sequence
    FROM fnd_log_messages msg, fnd_log_transaction_context tcon
    WHERE msg.TRANSACTION_CONTEXT_ID = tcon.TRANSACTION_CONTEXT_ID
    AND tcon.TRANSACTION_ID = <your child request ID>
    ORDER BY LOG_SEQUENCE
    10. 아래 SQL을 이용해 trace file이 생성되는 위치를 확인, raw trace와 tkprof'd trace
    file을 upload
    select value
    from v$parameter
    where name = 'user_dump_dest';
    Reference
    Note 458371.1

Maybe you are looking for

  • IOS 8 Calendar : Time to leave / travel time alert does not show

    iPhone User Guide: For iOS 8.1 Software Calendar at a glance: pg. 78 "Add an event. Tap  +, then fill in the event details.  If you add a location and choose Alert > Time to leave, Calendar reminds you of the event based on the current travel time to

  • Grid installtion failing with error  Cannot connect to Node Manager. : Conf

    I am trying to install Grid, however its failing with following error I installed Weblogic server 10.3.4 and 11g R2 database ============================================================== Code of Exception: Error occured while performing nmConnect :

  • Return (122) and Reverse (102) the same document

    Hi, I made an goods receipt  mov 101, but the stock was wrong, then reversal document with 102 mov, then I can make a return (mov 122) for the same document that was reversed. Can anyone help me, how can I block mov 122 for the documents that have 10

  • Dropped MacBook; hinge doesn't close properly

    Yesterday I dropped my MacBook while open backward on the floor and it fell flat on the back of the screen. Now if I want to close the screen (or open) in one of the corners the hinge does not close properly so the edge squeeks against the back of th

  • How to customize the Application Express Homepage

    Would like to know how to customize the Application Express Home Page that user goes to when they login to APEX. Specifically, I'd like to present a SQL Workshop only Home Page by disabling the "Application Builder" and "Utilities" icons/tabs. So the