Complicated SQL

Dears,
I 'd like to create a SQL to return group data. I guess I don't create a procedure for manage this result, but I don't manage to create a SQL for this.
My strutuct is alike this:
create table t(c1 varchar2(1), c2 date, c3 number);
insert into t (c1,c2,c3) values ('X', '01/02/2004',1.2);
insert into t (c1,c2,c3) values ('X', '01/02/2004', 1.8);
insert into t (c1,c2,c3) values ('Y', '02/02/2004', 1.1);
insert into t (c1,c2,c3) values ('Z', '03/02/2004', 2.2);
insert into t (c1,c2,c3) values ('Z', '03/02/2004', 1.2);
insert into t (c1,c2,c3) values ('A', '04/02/2004', 1.9);
insert into t (c1,c2,c3) values ('A', '04/02/2004', 2.3);
insert into t (c1,c2,c3) values ('A', '04/02/2004', 0.2);
insert into t (c1,c2,c3) values ('A', '04/02/2004', 0.2);
insert into t (c1,c2,c3) values ('T', '04/02/2004', 1.3);
insert into t (c1,c2,c3) values ('T', '05/02/2004', 1.7);
insert into t (c1,c2,c3) values ('A', '06/02/2004', 0.9);
insert into t (c1,c2,c3) values ('T', '07/02/2004', 0.9);
insert into t (c1,c2,c3) values ('A', '07/02/2004', 0.0);
insert into t (c1,c2,c3) values ('X', '07/02/2004', 2.2);
insert into t (c1,c2,c3) values ('W', '08/02/2004', 4.7);
insert into t (c1,c2,c3) values ('X', '09/02/2004', 1.5);
insert into t (c1,c2,c3) values ('X', '09/02/2004', 0.15);
insert into t (c1,c2,c3) values ('X', '09/02/2004', 0.7);
(The inserts are according with the groups)
My problem is group result by condition c3<2 and so always that break this condition I have to do the sum rows preceding until last condition c3<2.
In short, I need the follow result, grouping by condition "c3 < 2", according order by date c2 :
|Last Line c1 | Number of days | Number of Rows
|of the Group | | (COUNT)
| Y | 2 | 3
| Z | 0 | 1
| A | 1 | 2
| A | 0 | 1
| A | 4 | 7
| X | 0 | 1
| W | 0 | 1
| X | 0 | 3
Anyone can help me?
Thanks.

The first group you have defined starts 01/02/2004 and ends 02/02/2004 and you say this is two days. However the third group you define starts 03/02/2004 and ends 04/02/2004 yet you record this as one day. What is the rule for determining the total days?
Neither am I entirely clear on this '<2' rule. If groups are determined by whether c3 is greater or less than two (in order of c2) why do these two rows constitute two groups and not one?
insert into t (c1,c2,c3) values ('X', '07/02/2004', 2.2);
insert into t (c1,c2,c3) values ('W', '08/02/2004', 4.7);
To separate rows into groups based on events which occur as you pass through the result set in a given order I generally use the LAG or LEAD analytic functions to identify the boundaries with (for example) the value 1 and then SUM () OVER (RANGE UNBOUNDED PRECEDING) to assign an number to each group in turn.
I suspect you can get this done with something similar to the following. You will notice my results do not tally exactly because of the reasons I have given above.
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> CREATE TABLE t(c1 VARCHAR2(1), c2 DATE, c3 NUMBER);
Table created.
SQL> ALTER SESSION SET cursor_sharing = FORCE;
Session altered.
SQL> INSERT INTO t (c1,c2,c3) VALUES ('X', '01/FEB/2004',1.2);
1 row created.
SQL> INSERT INTO t (c1,c2,c3) VALUES ('X', '01/FEB/2004', 1.8);
1 row created.
(snip)
SQL> INSERT INTO t (c1,c2,c3) VALUES ('X', '09/FEB/2004', 0.15);
1 row created.
SQL> INSERT INTO t (c1,c2,c3) VALUES ('X', '09/FEB/2004', 0.7);
1 row created.
SQL> SELECT c1,
  2         MAX (c2) - MIN (c2) total_days,
  3         COUNT (*) total_rows
  4  FROM  (SELECT LAST_VALUE (c1) OVER (
  5                  PARTITION BY grp) c1, c2, grp
  6         FROM  (SELECT c1, c2,
  7                SUM (
  8                  CASE
  9                    WHEN c3 < 2 AND prv_c3 >= 2
10                      OR c3 >= 2 AND prv_c3 < 2
11                    THEN 1
12                  END)
13                  OVER (
14                    ORDER BY c2
15                      ROWS UNBOUNDED PRECEDING) grp
16                FROM (SELECT c1, c2, c3,
17                             LAG (c3) OVER (ORDER BY c2)  prv_c3
18                      FROM   t)))
19  GROUP BY c1, grp
20  ORDER BY MIN (c2), MAX (c2);
C TOTAL_DAYS TOTAL_ROWS
Y          1          3
Z          0          1
A          1          2
A          0          1
A          3          7
W          1          2
X          0          3
7 rows selected.
SQL> Padders

Similar Messages

  • How should I pass complicated sql statements to a function ?

    Hello
    Some built-in functions, such as dbms_advisor.quicktune accepts sql statements as in parameters. Those parameters are treated as varchar2, but if the sql statement is complicated and contain " ' " characters then its hard to pass those params, Sometimes they arent parsed correctly.
    How should I pass a complicated statement (with subqueries, strings and so) to a function ?
    Thanks
    Guy

    user11973359 wrote:
    Hello
    Some built-in functions, such as dbms_advisor.quicktune accepts sql statements as in parameters. Those parameters are treated as varchar2, but if the sql statement is complicated and contain " ' " characters then its hard to pass those params, Sometimes they arent parsed correctly.
    How should I pass a complicated statement (with subqueries, strings and so) to a function ?
    Thanks
    GuyWhats your db verzion. To over come the single quotes issue in string you can use q'[]' representation of string.
    select q'[Karthick's]' from dual

  • My lovely complicated SQL crashes with ORA-00600: internal[qerpfAllocateX2]

    ORACLE 9201
    Hi all
    I wrote a nice query to look for combinations of transactions using a "connect by prior" to arrange a half-cartesian join, then look for all connected paths that were a certain depth and whose nodes added up to a certain value. It works great and has tested out fine in the debug runs I've given it, but it is falling over in live with the following weird error:
    ORA-00600: internal error code, arguments: [qerpfAllocateX2], [4038], [4028], [], [], [], [], []
    I was originally getting this and I solved it during debug, using a WITH statement rather than twice doing a nested select on my source table.. I double checked and I'm using the WITH verison (in PL/SQL)
    What I dont get, is I can run it straight from e.g. Visual Studio just fine, but when my PL/SQL code calls into the function, it all falls apart with this error. Is there anything I can do to help investigate the cause or to fix?
    The original thread, where you guys helped me write the SQL, is: Re: A little help writing an SQL please? May need some advanced functionality..
    Regards
    cj
    Edited by: charred on Sep 15, 2008 8:05 AM

    If you are running on 9i this could be as a result of a known database bug.
    "A query may fail with ORA-600[qerpfAllocateX2] when the prefetch size exceeds the sort buffersize."
    Bug: 2277191
    Fixed in 10g or > v9202
    With most ORA-600 errors, the only solution available is to contact Oracle Support or try and re-write the query to use different access methods (plans).
    Christopher Soza
    Oracle BI DBA
    Orix Consultancy Services Ltd
    http://sozaman.blogspot.com

  • SQL query error

    I have a complicated SQL query which looks like the following:
    UPDATE SeqPick
    SET SeqPick.AceTopAge = SEQS.TopAge, SeqPick.AceBaseAge = SEQS.BaseAge
    FROM T_Well_SeqPick SeqPick INNER JOIN (SELECT TOPS.Sequence_Name, TOPS.Sequence_ID, TOPS.TopAge, BASES.BaseAge FROM (SELECT dd.Sequence_Name, dd.Sequence_ID, Age_Top+(Age_Base-Age_Top)*Top_Ratio As TopAge FROM T_Sequences dd, T_Stages WHERE(dd.SeqScheme_ID
    = 3) And T_Stages.Stage_Name_ID=Top_Stage_ID And T_Stages.Timescale_ID=1) TOPS INNER JOIN (SELECT BaseSeq.Sequence_Name, BaseSeq.Sequence_ID, Age_Top+(T_Stages.Age_Base-T_Stages.Age_Top)*Base_Ratio As BaseAge FROM T_Sequences BaseSeq, T_Stages Where SeqScheme_ID=3
    AND Stage_Name_ID=Base_Stage_ID AND Timescale_ID=1) BASES ON TOPS.Sequence_ID=BASES.Sequence_ID ORDER BY TopAge, BaseAge) SEQS ON SeqPick.Seq_ID = SEQS.Sequence_ID
    When I run it on a SQL Server 2008, I get the following error message:
    SQL Server Exception Error:
    System.Data.SqlClient.SqlException: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
    Are there any other ways of re-writing the above query to resolve the issue?

    As Erland said, query should be readable. You can easily format it by using
    http://poorsql.com/
    It formats your query like below:
    UPDATE SeqPick
    SET SeqPick.AceTopAge = SEQS.TopAge
    , SeqPick.AceBaseAge = SEQS.BaseAge
    FROM T_Well_SeqPick SeqPick
    INNER JOIN (
    SELECT TOPS.Sequence_Name
    , TOPS.Sequence_ID
    , TOPS.TopAge
    , BASES.BaseAge
    FROM (
    SELECT dd.Sequence_Name
    , dd.Sequence_ID
    , Age_Top + (Age_Base - Age_Top) * Top_Ratio AS TopAge
    FROM T_Sequences dd
    , T_Stages
    WHERE (dd.SeqScheme_ID = 3)
    AND T_Stages.Stage_Name_ID = Top_Stage_ID
    AND T_Stages.Timescale_ID = 1
    ) TOPS
    INNER JOIN (
    SELECT BaseSeq.Sequence_Name
    , BaseSeq.Sequence_ID
    , Age_Top + (T_Stages.Age_Base - T_Stages.Age_Top) * Base_Ratio AS BaseAge
    FROM T_Sequences BaseSeq
    , T_Stages
    WHERE SeqScheme_ID = 3
    AND Stage_Name_ID = Base_Stage_ID
    AND Timescale_ID = 1
    ) BASES ON TOPS.Sequence_ID = BASES.Sequence_ID
    --ORDER BY TopAge
    -- , BaseAge
    ) SEQS ON SeqPick.Seq_ID = SEQS.Sequence_ID
    -Vaibhav Chaudhari

  • Problem with native SQL cursor in generic data source

    Hi, All!
    I am implementing generic data source based on FM.
    Because of complicated SQL I canu2019t use Open SQL and RSAX_BIW_GET_DATA_SIMPLE-example u201Cas isu201D.
    So, I have to use Native SQL. But Iu2019ve got a problem with a cursor. When I test my data source in RSA3, everything is Ok. But, if I start appropriate info-package, I get error u201CABAP/4 processor: DBIF_DSQL2_INVALID_CURSORu201D. It happens after selecting of 1st data package in line u201CFETCH NEXT S1 INTOu2026u201D. It seems to me that when system performs the second call of my FM the opened cursor has already been disappeared.
    Did anyone do things like this and what is incorrect?
    Is it real to make generic data source based on FM with using Native SQL open, fetch, closeu2026

    Hi Jason,
    I don't think this SQL is very valuable It is just an aggregation with some custom rules. This aggregation is performing on info-provider which consists of two info-cubes. Here we have about 2 billion records in info-provider and about 30 million records in custom db-table Z_TMP (certainly, it has indexes). I have to do this operation on 21 info-providers like this and I have to do this 20 times for each info-provider (with different values of host-variable p_GROUP)
    SELECT T.T1, SUM( T.T2 ), SUM( T.T3 ), SUM( T.T4 )
            FROM (
                    SELECT F."KEY_EVENT06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                      FROM "/BIC/VEVENT0608F" F,
                           Z_TMP G,
                           "/BIC/DEVENT06085" D
                      WHERE F."KEY_EVENT06088" = G.ID
                            AND F."KEY_EVENT06085" = D.DIMID
                            AND G.GROUP_NO = :p_GROUP
                            AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                            AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                    UNION
                    SELECT F."KEY_EVNA06088" AS T1,
                            F."/BIC/EV_COST" + F."/BIC/EV_A_COST" AS T2,
                            DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_COST") +
                              DECODE( D.SID_EVENTTYPE, 23147, 0,
                                                          23148, 0,
                                                          23151, 0,
                                                          23153, 0,
                                                          23157, 0,
                                                          23159, 0,
                                                          24896734, 0,
                                                          695032768, 0,
                                                          695029006, 0,
                                                          695029007, 0,
                                                          695036746, 0, F."/BIC/EV_A_COST") AS T3,
                            DECODE( D.SID_EVENTTYPE, 23147, F."/BIC/EV_DURAT",
                                                          23148, F."/BIC/EV_DURAT",
                                                          23151, F."/BIC/EV_DURAT",
                                                          23153, F."/BIC/EV_DURAT",
                                                          23157, F."/BIC/EV_DURAT",
                                                          23159, F."/BIC/EV_DURAT",
                                                          24896734, F."/BIC/EV_DURAT",
                                                          695032768, F."/BIC/EV_DURAT",
                                                          695029006, F."/BIC/EV_DURAT",
                                                          695029007, F."/BIC/EV_DURAT",
                                                          695036746, F."/BIC/EV_DURAT", 0) AS T4
                    FROM "/BIC/VEVNA0608F" F,
                         Z_TMP G,
                         "/BIC/DEVNA06085" D
                    WHERE F."KEY_EVNA06088" = G.ID
                          AND F."KEY_EVNA06085" = D.DIMID
                          AND G.GROUP_NO = :p_GROUP
                          AND ( F."/BIC/EV_COST" < 0 OR F."/BIC/EV_A_COST" < 0 )
                          AND D.SID_EVENTTYPE <> 695030676 AND D.SID_EVENTTYPE <> 695030678
                 ) T
            GROUP BY T.T1

  • Error in SQL Expression

    Hello All,
    I am having crystal reports XI and I am using OLE DB ADO connection for oracle driver to the DB.
    I took a correct SQL expression from a previous report which is working fine and then paste it in a new created SQL Expression in the new report. The exact tables are there. But when clicking on the tick button to check of there are some errors, a message is shown that : ORA-00942 table or view does not exist.
    Here is the SQl Expression:
    (select  MAX(intrates.RATE_DT)
    FROM INTRATES,SECTYPE,DEALS,SECISSUE
    WHERE sectype.thekey = "posnrpt"."SECTYPE"
    AND SECISSUE.THEKEY = SECTYPE.SECISSUE_ID
    AND LTRIM(RTRIM(UPPER(intrates.ISSUER_DETAIL_ID))) =LTRIM(RTRIM(UPPER('ID'||secissue.ISIN)))
    AND INTRATES.RATE_DT <= "posnrpt"."POSN_DT"
    I am wondering why it is working in a previous report which is created long time ago and now it is not working?
    Is it from the driver or I have to do further modifications!!!
    I am looking forward for your help.

    Good question, Jason.  The only officially supported use would be of the functions and operators explicitly listed within the editor.  The SAP Note referenced in my presentation gives a little more information:
    [1217871 - What is the intended use of 'SQL Expression' fields?|http://www.google.com/url?sa=t&source=web&cd=1&sqi=2&ved=0CBIQFjAA&url=http%3A%2F%2Fwww.sdn.sap.com%2Firj%2Fscn%2Fgo%2Fportal%2Fprtroot%2Fdocs%2Foss_notes_boj%2Fsdn_oss_boj_erq%2Fsap(bD1lbiZjPTAwMQ%3D%3D)%2Fbc%2Fbsp%2Fspn%2Fscn_bosap%2Fnotes%257B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333833373331%257D.do&ei=FtWHTMrpCoTQ8wTutsHfDg&usg=AFQjCNFZG-Ta5JiZFAzXf2HC5GE7-QkJug]
    I'm sure the reason the SELECT statements aren't officially supported is that they aren't written in Crystal syntax.  What one is able to do with a SELECT statement depends on the database (Access, Oracle, MS SQL Server, etc..), type of database connection (Native, ODBC, etc..) the flavor of SQL being used, which is dependent on the previous two, etc.. Even the functions and operators available in the editor depend on the above conditions. What you see as available may not be what I see..
    So, while SAP can support the feature as a whole, they can't necessarily provide syntax support, nor guarantee effectiveness.  There's also very little documentation on them, as a result. A lot of what I've learned to do with SQL Expressions has been through trial and error.
    Personally, I prefer to build reports against Views, if possible, and Commands or Stored Procedures, if necessary. SQL Expressions are great, though, in a pinch against existing reports with performance or design issues.  In the case of the report above, I was able to dramatically increase performance and eliminate sub-reports  in an existing report that was written by another individual.  Without the SQL Expressions, I would have had to write even more complicated SQL and rebuild the report.
    Since I can use them and I know how powerful they can be, I'll keep using them until I can't. At this point in time, they work with Crystal Reports 2008, which has a very low adoption rate, and I haven't heard of them being deprecated in Crystal Reports 2011, which I expect to be around for several years, so I'm not too concerned.
    ~Kurt

  • Tuning a sql to remove cpu intensive operations

    Along the simliar lines of the other thread but we want to tune a sql to reduce cpu impact. Its a complicated sql, joins subqueries, with etc.
    What tools/web pages/blogs should I focus on for this topic?
    An explain plan shows cpu .. is that showing the best picture? Is it that obvious? The i/o and overall cost is quite good at under 1000 and it seems the performance is okay at 1-2s .. but multiply that by a 1000 calls a second and we see cpu climb.
    Trying to get every last bit out of the boxes before tipping over the 96 cpus.
    I think I will take a stab at a complete re-write of the developers sql to see what can be done with a new set of eyes.
    I guess tkprof will show me cpu - if its large enough to show .. I suppose I can run it for all the variations that look promising.
    Daryl.

    Hi,
    Along the simliar lines of the other thread but we want to tune a sql to reduce cpu impact. Its a complicated sql, joins subqueries, with etc.
    What tools/web pages/blogs should I focus on for this topic?SQL plan will be best for you to understand what your query is doing.
    An explain plan shows cpu .. is that showing the best picture? Is it that obvious? The i/o and overall cost is quite good at under 1000 and it seems the performance is okay at 1-2s .. >but multiply that by a 1000 calls a second and we see cpu climb.How can you say that cost under 1000 is a good cost? You can have a query with a cost of 100 having execution time of 2 hours and a query with cost of 100000 retuning you within a few seconds. So, don't concentrate on the cost.
    If a query is returning in one second, and you are executing same query 1000 times within a seconds than query might not have a problem, rather you need to concentrate that how can you reduce the number of executions.
    I guess tkprof will show me cpu - if its large enough to show .. I suppose I can run it for all the variations that look promising.Do a 10046 tracing for your SQL and tkprof the trace file to see the time spent on each step of the query execution. Actually there are thousands of advices which you can take to improve your particular SQL and for this you will need to do a google.
    Salman

  • CX_SY_OPEN_SQL_DB Need Help !

    Hi I'm Getting this Dump
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Date and Time          01/25/2008 05:30:05
    Short text
    SQL error in the database when accessing a table.
    What can you do?
    Note which actions and input led to the error.
    For further help in handling the problem, contact your SAP administrator
    You can use the ABAP dump analysis transaction ST22 to view and manage
    termination messages, in particular for long term reference.
    How to correct the error
    Database error text........: "POS(4477) Too complicated SQL statement (too much
    data)"
    Internal call code.........: "[RSQL/OPEN/ZBBP_CONF_VIEW ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "SAPLZ3P_CLC_FG01" or "LZ3P_CLC_FG01U01"
    "Z3P_CLC_CONFIRMATION_DETAILS"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "Z3P_CLC_CONFIRMATION_DETAILS" "(FUNCTION)", or its possible occurrence must be
    declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    System environment
    SAP-Release 700
    Application server... "pwdf1918"
    Network address...... "10.17.99.25"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 1
    Shortdump setting.... "full"
    Database server... "pwdf4324"
    Database type..... "ADABAS D"
    Database name..... "IBP"
    Database user ID.. "SAPR3"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Oct 1 2007 00:34:30"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "SQLDBC 7.6.1.015 CL 147649 "
    Patch level. 130
    Patch text.. " "
    Database............. "MaxDB 7.6, MaxDB 7.7"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
    NT 6.0"
    Memory consumption
    Roll.... 16192
    EM...... 4189840
    Heap.... 0
    Page.... 0
    MM Used. 1496416
    MM Free. 2690800
    User and Transaction
    Client.............. 001
    User................ "EBP_ISP"
    Language Key........ "E"
    Transaction......... " "
    Transactions ID..... "FCF9CADCE4F4F16DB8ED0017A44BD489"
    Program............. "SAPLZ3P_CLC_FG01"
    Screen.............. "SAPMSSY1 3004"
    Screen Line......... 2
    Information on caller of Remote Function Call (RFC):
    System.............. "ISP"
    Database Release.... 700
    Kernel Release...... 700
    Connection Type..... 3 (2=R/2, 3=ABAP System, E=Ext., R=Reg. Ext.)
    Call Type........... "synchron and non-transactional (emode 0, imode 0)"
    Inbound TID.........." "
    Inbound Queue Name..." "
    Outbound TID........." "
    Outbound Queue Name.." "
    Client.............. 001
    User................ "I802084"
    Transaction......... "SE38"
    Call Program........."Z3P_CLC_MAIN01"
    Function Module..... "Z3P_CLC_CONFIRMATION_DETAILS"
    Call Destination.... "EBP_IBPCLNT001"
    Source Server....... "pwdf4106_ISP_33"
    Source IP Address... "10.21.24.140"
    Additional information on RFC logon:
    Trusted Relationship " "
    Logon Return Code... 0
    Trusted Return Code. 0
    Note: For releases < 4.0, information on the RFC caller are often
    only partially available.
    Information on where terminated
    Termination occurred in the ABAP program "SAPLZ3P_CLC_FG01" - in
    "Z3P_CLC_CONFIRMATION_DETAILS".
    The main program was "SAPMSSY1 ".
    In the source code you have the termination point in line 410
    of the (Include) program "LZ3P_CLC_FG01U01".
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    procedure "Z3P_CLC_CONFIRMATION_DETAILS" "(FUNCTION)", but it was neither
    handled locally nor declared
    in the RAISING clause of its signature.
    The procedure is in program "SAPLZ3P_CLC_FG01 "; its source code begins in line
    307 of the (Include program "LZ3P_CLC_FG01U01 ".
    Source Code Extract
    Line
    SourceCde
    380
    END OF TAB1 .
    381
    DATA DAT1 TYPE STANDARD TABLE OF ZBBP_WF_STRUC WITH HEADER LINE .
    382
    DATA OUT_DATES2 TYPE STANDARD TABLE OF Z3P_STR03 WITH HEADER LINE .
    383
    384
    DATA : TAB2 LIKE TAB1 OCCURS 10 WITH HEADER LINE.
    385
    DATA : TAB3 LIKE TAB1 OCCURS 10 WITH HEADER LINE.
    386
    387
    RANGES : REF_DOC FOR BBPD_PD_INDEX_H-REF_DOC_NO.
    388
    389
    CHECK NOT IN_TAB IS INITIAL.
    390
    *Appending the range
    391
    LOOP AT IN_TAB INTO WA_IN.
    392
    *out_dates-dedat = '19791003'.
    393
    *Append out_dates.
    394
    395
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    396
    EXPORTING
    397
    INPUT         = WA_IN-CONFIRMATION
    398
    IMPORTING
    399
    OUTPUT        = WA_IN-CONFIRMATION
    400
    401
    402
    REF_DOC-SIGN = 'I'.
    403
    REF_DOC-LOW(10) = WA_IN-CONFIRMATION.
    404
    REF_DOC-OPTION = 'EQ'.
    405
    APPEND REF_DOC.
    406
    ENDLOOP.
    407
    408
    *Select Query
    409
    >>>>>
    SELECT REF_DOC_NO itm_vper_start Z_VPER_START Z_VPER_END itm_product_type zexpensetype zinvo
    411
    OBJECT_TYPE
    412
    OBJECT_ID
    413
    V~GUID
    414
    FROM zbbp_conf_view AS v "
    415
    LEFT OUTER JOIN bbp_pdisc AS b
    416
    ON vclient  = bclient
    417
    AND vitm_guid  = bguid
    418
    INTO CORRESPONDING FIELDS OF TABLE   TAB1
    419
    WHERE
    420
    object_type   = 'BUS2203'
    421
    AND
    422
    itm_itm_type ne 'HIER'
    423
    and
    424
    ref_doc_no  IN REF_DOC.
    425
    426
    *LOOP AT REF_DOC.
    427
    *SELECT REF_DOC_NO itm_vper_start Z_VPER_START Z_VPER_END itm_product_type zexpensetype zinv
    428
    *OBJECT_TYPE
    429
    *OBJECT_ID
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    1
    SY-TABIX
    0
    SY-DBCNT
    0
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    CPIC and RFC Control
    SY-MSGTY
    SY-MSGID
    SY-MSGNO
    000
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO
    0
    SY-DATUM
    20080125
    SY-UZEIT
    053005
    SY-XPROG
    SAPLZ3P_CLC_FG01
    SY-XFORM
    Z3P_CLC_CONFIRMATION_DETAILS
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    4 FUNCTION     SAPLZ3P_CLC_FG01                    LZ3P_CLC_FG01U01                      410
    Z3P_CLC_CONFIRMATION_DETAILS
    3 FORM         SAPLZ3P_CLC_FG01                    LZ3P_CLC_FG01U01                      307
    Z3P_CLC_CONFIRMATION_DETAILS
    2 FORM         SAPMSSY1                            SAPMSSY1                               85
    REMOTE_FUNCTION_CALL
    1 MODULE (PBO) SAPMSSY1                            SAPMSSY1                               30
    %_RFC_START
    Chosen variables
    Name
    Val.
    No.       4 Ty.          FUNCTION
    Name  Z3P_CLC_CONFIRMATION_DETAILS
    IN_TAB[]
    Table IT_0[1019x146]
    \FUNCTION-POOL=Z3P_CLC_FG01\FORM=Z3P_CLC_CONFIRMATION_DETAILS\DATA=%_%_IN_TAB
    Table reference: 0
    TABH+  0(20) = 70292557FE07000070252557FE07000000000000
    TABH+ 20(20) = 0000000000000000FB03000092000000FFFFFFFF
    TABH+ 40(16) = 04010000E003000010000000C1248101
    store        = 0x70292557FE070000
    ext1         = 0x70252557FE070000
    shmId        = 0     (0x00000000)
    id           = 0     (0x00000000)
    label        = 0     (0x00000000)
    fill         = 1019  (0xFB030000)
    leng         = 146   (0x92000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000006
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 1
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0xC0493757FE070000
    pgHook       = 0xB08C3957FE070000
    idxPtr       = 0x0000000000000000
    shmTabhSet   = 0x0000000000000000
    id           = 4     (0x04000000)
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 2032  (0xF0070000)
    lineAlloc    = 1072  (0x30040000)
    shmVersId    = 0     (0x00000000)
    shmRefCount  = 1     (0x01000000)
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    collHook     = 0x0000000000000000
    ext2         = 0x00252557FE070000
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0xA0242557FE070000
    delta_head   = 0100000001000000CE0000000100000004010000100400009200000001000000000000000500000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    OUT_DATES[]
    Table IT_1[0x54]
    \FUNCTION-POOL=Z3P_CLC_FG01\FORM=Z3P_CLC_CONFIRMATION_DETAILS\DATA=%_%_OUT_DATES
    Table reference: 1
    TABH+  0(20) = 000000000000000000533757FE07000000000000
    TABH+ 20(20) = 01000000010000000000000036000000FFFFFFFF
    TABH+ 40(16) = 04010000A004000010000000C1248101
    store        = 0x0000000000000000
    ext1         = 0x00533757FE070000
    shmId        = 0     (0x00000000)
    id           = 1     (0x01000000)
    label        = 1     (0x01000000)
    fill         = 0     (0x00000000)
    leng         = 54    (0x36000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000010
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 1
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    collHook     = 0x0000000000000000
    ext2         = 0x00673857FE070000
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0x10D43757FE070000
    delta_head   = 0100000002000000CD0000000200000004010000D00400003600000001000000000000000500000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    OUT_DETAILS[]
    Table IT_2[0x244]
    \FUNCTION-POOL=Z3P_CLC_FG01\FORM=Z3P_CLC_CONFIRMATION_DETAILS\DATA=%_%_OUT_DETAILS
    Table reference: 2
    TABH+  0(20) = 000000000000000070673857FE07000000000000
    TABH+ 20(20) = 020000000200000000000000F4000000FFFFFFFF
    TABH+ 40(16) = 040100004004000010000000C1248101
    store        = 0x0000000000000000
    ext1         = 0x70673857FE070000
    shmId        = 0     (0x00000000)
    id           = 2     (0x02000000)
    label        = 2     (0x02000000)
    fill         = 0     (0x00000000)
    leng         = 244   (0xF4000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000008
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 1
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    collHook     = 0x0000000000000000
    ext2         = 0xE0B23957FE070000
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0x80B23957FE070000
    delta_head   = 0100000003000000CC000000030000000401000070040000F400000001000000000000000500000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    %_DUMMY$$
    2222
    0000
    0000
    0000
    SYST-REPID
    SAPLZ3P_CLC_FG01
    5454535544454433222222222222222222222222
    310CA30F3C3F6701000000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    SY-XPROG
    SAPLZ3P_CLC_FG01
    5454535544454433222222222222222222222222
    310CA30F3C3F6701000000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    SY-TABIX
    0
    0000
    0000
    SCREEN
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    SY
    ##############################################################################T#########  ####
    000000F000000000000000000000000000000090000000000000000000000000000000000000105000000010220000
    100000B000000000000000001000100000000020000000000000000000000000000000000000604000000000000500
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000030000000000000000000000000000000000000000000000000000000000000000000000000000000E000000C
    <%_TABLE_BBP_PDHGP>
    %_SPACE
    2
    0
    0
    0
    SY-MANDT
    001
    333
    001
    000
    000
    <%_TABLE_BBP_PDISC>
    REF_DOC[]
    Table IT_3[1019x70]
    \FUNCTION=Z3P_CLC_CONFIRMATION_DETAILS\DATA=REF_DOC[]
    Table reference: 3
    TABH+  0(20) = 50FE3957FE070000000000000000000000000000
    TABH+ 20(20) = 0300000003000000FB03000046000000FFFFFFFF
    TABH+ 40(16) = 04010000100D00000A000000C1048001
    store        = 0x50FE3957FE070000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 3     (0x03000000)
    label        = 3     (0x03000000)
    fill         = 1019  (0xFB030000)
    leng         = 70    (0x46000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000055
    occu         = 10    (0x0A000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x70FB3957FE070000
    pgHook       = 0x30FB3A57FE070000
    idxPtr       = 0x0000000000000000
    shmTabhSet   = 0x0000000000000000
    id           = 5     (0x05000000)
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 1950  (0x9E070000)
    lineAlloc    = 1054  (0x1E040000)
    shmVersId    = 0     (0x00000000)
    shmRefCount  = 1     (0x01000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    TAB1[]
    Table IT_4[0x256]
    \FUNCTION=Z3P_CLC_CONFIRMATION_DETAILS\DATA=TAB1[]
    Table reference: 4
    TABH+  0(20) = 0000000000000000000000000000000000000000
    TABH+ 20(20) = 04000000040000000000000000010000FFFFFFFF
    TABH+ 40(16) = 04010000700A000010000000C1248001
    store        = 0x0000000000000000
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 4     (0x04000000)
    label        = 4     (0x04000000)
    fill         = 0     (0x00000000)
    leng         = 256   (0x00010000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000041
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    isCtfyAble   = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    shmTabhSet   = Not allocated
    id           = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    shmVersId    = Not allocated
    shmRefCount  = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    collHook     = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    TAB1
    000000000000000000000000                                          00
    2222222222222222222222222233333333333333333333333322222222222222222222222222222222222222222233
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    DAT1-GUID
    2222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000
    TAB1-GUID
    0000000000000000
    0000000000000000
    No.       3 Ty.          FORM
    Name  Z3P_CLC_CONFIRMATION_DETAILS
    %_ARCHIVE
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    %_%_IN_TAB
    Table IT_0[1019x146]
    %_%_OUT_DATES
    Table IT_1[0x54]
    %_VIASELSCR
    0
    4
    %_%_OUT_DETAILS
    Table IT_2[0x244]
    No.       2 Ty.          FORM
    Name  REMOTE_FUNCTION_CALL
    HEADER
    000000000000
    000000000000
    TYPE
    3
    0000
    3000
    SY-XPROG
    SAPLZ3P_CLC_FG01
    5454535544454433222222222222222222222222
    310CA30F3C3F6701000000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    RC
    0
    0000
    0000
    SY-XFORM
    Z3P_CLC_CONFIRMATION_DETAILS
    535544454444454454445445444522
    A30F3C3F3FE692D149FEF45419C300
    000000000000000000000000000000
    000000000000000000000000000000
    %_SPACE
    2
    0
    0
    0
    No.       1 Ty.          MODULE (PBO)
    Name  %_RFC_START
    %_PRINT
    000                                                                                0###
    2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    RFCTYPE_INTERNAL
    3
    0000
    3000
    Internal notes
    The termination was triggered in function "HandleRsqlErrors"
    of the SAP kernel, in line 764 of the module
    "//bas/700_REL/src/krn/runt/absapsql.c#8".
    The internal operation just processed is "SQLS".
    Internal mode was started at 20080125053005.
    Internal call code.........: "[RSQL/OPEN/ZBBP_CONF_VIEW ]"
    Active Calls in SAP Kernel
    Lines of C Stack in Kernel (Structure Differs on Each Platform)
    SAP (R) - R/3(TM) Callstack, Version 1.0
    Copyright (C) SAP AG. All rights reserved.
    Callstack without Exception:
    App       : disp+work.EXE (pid=1568)
    When      : 1/25/2008 5:30:5.129
    Threads   : 2
    Computer Name       : PWDF1918
    User Name           : ibpadm
    Number of Processors: 4
    Processor Type: AMD64 Family 15 Model 33 Stepping 2
    Windows Version     : 5.2 Current Build: 3790
    State Dump for Thread Id 2238
    FramePtr         ReturnAd         Param#1          Function Name
    0000000007ccb730 0000000077d7047f 0000000056355570 ntdll!NtWaitForSingleObject
    0000000007ccb7d0 0000000001722861 00000000000002a0 kernel32!WaitForSingleObjectEx
    0000000007ccba20 0000000000610ec5 0000000000000001 disp+work!NTDebugProcess [ntstcdbg.c (501)]
    0000000007ccba50 0000000000afbbec 0000000000000001 disp+work!CTrcStack [dptstack.c (182)]
    0000000007ccbaa0 0000000000b00e10 0000000000000001 disp+work!rabax_CStackSave [abrabax.c (7091)]
    0000000007ccc480 0000000000a1153c 0000000001c934c0 disp+work!ab_rabax [abrabax.c (1231)]
    0000000007ccc520 00000000009e2656 0000000000000000 disp+work!ab_rsqlerr [abdberr.c (787)]
    0000000007ccc630 00000000009e4761 0000000000000003 disp+work!HandleRsqlErrors [absapsql.c (765)]
    0000000007ccc820 00000000009f5543 000000000000003b disp+work!SqlsExecuteCall [absapsql.c (7466)]
    0000000007ccc8d0 00000000008339b2 0000000000000001 disp+work!ab_jsqls [absapsql.c (1414)]
    0000000007ccca50 0000000000a0e8b7 0000000000000008 disp+work!ab_extri [abextri.c (554)]
    0000000007cccaa0 0000000000acb06c 0000000000000008 disp+work!ab_xevent [abrunt1.c (281)]
    0000000007cccb30 000000000066f0a8 0000000000000008 disp+work!ab_dstep [abdynpro.c (492)]
    0000000007ccccb0 0000000000672c7d 000007fe5730c890 disp+work!dynpmcal [dymainstp.c (2403)]
    0000000007cccd40 000000000067267a 000007fe572514a0 disp+work!dynppbo0 [dymainstp.c (543)]
    0000000007cccdf0 0000000000631ed5 0000000000000000 disp+work!dynprctl [dymainstp.c (360)]
    0000000007ccfc30 00000000004d71d3 0000000000000003 disp+work!dynpen00 [dymain.c (1629)]
    0000000007ccfeb0 000000000042d5a6 0000000007d58600 disp+work!TskhLoop [thxxhead.c (4467)]
    0000000007ccfee0 000000000040108d ffffffff00000003 disp+work!DpMain [dpxxdisp.c (1121)]
    0000000007ccff10 00000000019c7781 0000000000000000 disp+work!nlsui_main [thxxanf.c (84)]
    0000000007ccff70 0000000077d5966c 0000000000000000 disp+work!wmainCRTStartup [crtexe.c (498)]
    0000000007ccffa0 0000000000000000 00000000019c7610 kernel32!BaseProcessStart
    State Dump for Thread Id 374c
    FramePtr         ReturnAd         Param#1          Function Name
    000000000de0fe40 0000000077d5f651 0000000000000000 ntdll!NtFsControlFile
    000000000de0feb0 00000000018ad9af fffffffffffffffe kernel32!ConnectNamedPipe
    000000000de0ff40 000007ff7fc411c4 0000000000000000 disp+work!SigIMsgFunc [signt.c (679)]
    000000000de0ff70 0000000077d6b69a 0000000077d6b660 msvcrt!endthreadex
    000000000de0ffa0 0000000000000000 0000000000000000 kernel32!BaseThreadStart
    List of ABAP programs affected
    Index
    Typ
    Program
    Group
    Date
    Time
    Size
    Lang.
    0
    Prg
    SAPMSSY1
    0
    05/27/2005
    16:45:10
    22528
    E
    1
    Prg
    SAPLZ3P_CLC_FG01
    1
    01/25/2008
    02:47:42
    33792
    E
    2
    Typ
    Z3P_STR01
    0
    11/03/2007
    07:50:03
    3072
    3
    Typ
    Z3P_STR03
    0
    11/03/2007
    07:50:03
    2048
    4
    Typ
    Z3P_STR02
    0
    01/25/2008
    02:47:42
    4096
    5
    Prg
    SAPLALFA
    5
    02/08/2005
    13:13:24
    8192
    E
    6
    Typ
    ZBBP_CONF_VIEW
    0
    09/07/2007
    05:21:21
    10240
    7
    Typ
    BBP_PDISC
    0
    12/06/2007
    04:04:51
    12288
    8
    Prg
    CX_SY_OPEN_SQL_DB=============CP
    8
    07/01/2005
    18:22:20
    12288
    E
    9
    Typ
    SCX_SRCPOS
    0
    02/08/2005
    13:13:15
    2048
    10
    Prg
    CX_SY_OPEN_SQL_ERROR==========CP
    10
    07/01/2005
    18:22:20
    10240
    E
    11
    Prg
    CX_SY_SQL_ERROR===============CP
    11
    07/01/2005
    18:22:20
    10240
    E
    12
    Prg
    CX_DYNAMIC_CHECK==============CP
    12
    07/01/2005
    18:22:20
    10240
    E
    13
    Prg
    CX_ROOT=======================CP
    13
    11/03/2007
    02:55:47
    11264
    E
    14
    Prg
    CX_NO_CHECK===================CP
    14
    07/01/2005
    18:22:20
    10240
    E
    15
    Prg
    CX_SY_NO_HANDLER==============CP
    15
    07/01/2005
    18:22:20
    10240
    E
    16
    Typ
    SYST
    0
    01/23/2005
    00:05:42
    31744
    17
    Typ
    ZBBP_WF_STRUC
    0
    09/07/2007
    05:21:20
    2048
    Directory of Application Tables
    Name                                     Date       Time       Lngth
    Val.
    Program  SAPMSSY1
    SYST                                       /  /       :  :     00004612
    \0\0\0\0\0\0#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x0001\0\0
    ABAP Control Blocks (CONT)

    What is your database/livecache version?
    Check note 1001257 - SQL error -1105 Too complicated SQL statement
    Markus

  • Language attributes for business objects ERC_CDCY

    Hello,
    I need to activate TREX index ERC_CDCY from our e-recruiting system using SES_ADMIN transaction.
    When I activate it, I receive error message UNCAUGHT_EXCEPTION (CX_SY_OPEN_SQL_DB) at the
    relational index level (Relation of candidacy).
    I opened a message with SAPnet and got the following answer:
    Indexes are only created in english compared to others systems that contains indexes in both languages (EN, FR). We could not find any french attributes for business objects ERC_CDCY which is required (at least 7 words) to index it in french language.
    Do you know which transaction or SPRO menu path I could use to maintain de language attributes and the 7 words?
    Thanks for you help
    Hugo

    Hello Huga,
    About maintaining the language in E-Rec  you can have a look at the table
    V_T77RCF_SELANGU, there you can maintain the different language.
    The exception you are getting might be coming from the TREX side. please check the following notes:
    1260684  SQL statement terminates: "Too Complicated SQL
    1249465   TREX 7.1: Installing TREX for Embedded Search
    Best Regards,
    Deepak.

  • View or Package, logic problem which is better

    I'm new to Oracle so I'm trying desperately to take what I know
    from other systems and apply it here and I'm hitting a stumbling
    block. I have a very complex view that I will spare you the
    details to, but what it amounts to is:
    create or replace view testview
    as
    select * from table_x where year_column=2001 ;
    this is fine, but what do I do when I want to change the year to
    something else? I don't want to have a view for every year,
    that's a maintenance nightmare. I'm in the beginning stages
    with packages, so I understand how they work and mostly how to
    build one, and I'm halfway through building a procedure to
    create the view, but in that case, I wonder what will happen
    when the procedure is run a second time, will the person who ran
    it the first time suddenly get the new view, will it invalidate
    itself, or will it just crash? I am stuck with one schema with
    a "global" type login, so it's not like each person can have
    their own. I have thought of cursors, but I don't understand
    how to use an explicit cursor as part of another SQL/cursor/view
    because this view is only a small part of other views I am
    building. I need to figure out how to pass the parameter from
    an external system (non-Oracle) and handle most of the code in a
    procedure/package or if I make this a view of all the available
    data (with no year limit) and do the parameters on the other
    side in the non-Oracle system it really slows things down to an
    unacceptable level and doesn't teach me how to do anything new
    or take advantage of the Oracle backend.
    Any help will be deeply appreciated. thanks!

    Hey!
    thanks for the input. It's exactly what I'm looking for as a
    newbie. To give you some background, the database isn't that
    unusual, it's a government financial app (non Oracle but Oracle
    db) with about a million tables which I'm connecting to through
    a database link which I have in my own database space because we
    (devs) aren't allowed to create packages/procs in their space.
    Which makes sense from a security standpoint, but it requires
    some creative thinking for other issues. I'm doing reports,
    which means creating a lot of "denormalized" views and when we
    start talking about an entire year's worth of data at the
    transaction level, it slows way down. Luckily a lot of the
    stuff I'm doing is actually summaries for the year, etc. My
    front end at the moment is Access/Visual FoxPro, but I'm hoping
    to move to more web based reporting (tool TBD later - likely ASP
    or Java, any recommendations?) as I stuff as much as humanly
    possible into the PL/SQL to reduce the network traffic. Access
    handles views really decently/transparently, but there's some
    ugliness with ref cursors. One of my cohorts has found an
    example on the web somewhere and while passing the parameter in
    isn't a big deal, it's an ugly bunch of VBA code just to process
    the returned cursor, something about it having to load it row by
    row. I've only glanced at it and need to look at it in more
    detail. I was just hoping I'd missed something more
    obvious/simpler through inexperience. I do admit Oracle is
    capable of doing some of the most complicated SQL I've ever seen
    and it's kinda fun to see exactly how many
    joins/tables/subqueries I can throw into a single SQL. I'm just
    not used to looking at it that way; I'm more used to writing
    several sequential SQL statements that can build on or refer to
    each other by a temporary name/alias. I either haven't figured
    out the syntax/commands to map what I know how to do to the way
    Oracle does it, or maybe it's just never done that way? Hard to
    say. But then again I live to learn through trial by fire. :)
    thanks much!!

  • Create temp table using EXECUTE IMMEDIATE

    Is there any performance issue in creating globally temp table
    using EXECUTE IMMEDIATE or creating globally temp table from
    SQL PLUS.
    Any response will be greatly appreciated.
    null

    Anish,
    Creating tables is likely to be an expensive operation.
    Performance issues can only be considered in comparison to
    alternatives.
    Alternatives include: PLSQL tables, cursors and/or recoding so
    that tmp tables are not required. (One of our consultants reckons
    that sqlserver temp tables are usually used to get around
    limitations in sqlserver, ie slightly more complicated sql
    statements could be used instead of simpler sql and temporary
    tables).
    I would think creating the temp table once during sqlplus would
    be cheaper than creating and deleting it repeatedly at run time.
    Note that EXECUTE IMMEDIATE may do an implicit commit (dbms_sql
    certainly does). This may be got over my using the PRAGMA
    AUTONOMOUS_TRANSACTION; direction which places a
    procedure/function in a seperate transaction.
    Turloch
    P.S. We have some difficulty in getting information back from the
    field/customer sites. If you have questions and answers that are
    likely to be useful to other Oracle Migration Workbench
    users, and migrators in general, please send them in for possible
    inclusion in our Frequently Asked Question list.
    Oracle Migration Workbench Team
    Anish (guest) wrote:
    : Is there any performance issue in creating globally temp table
    : using EXECUTE IMMEDIATE or creating globally temp table from
    : SQL PLUS.
    : Any response will be greatly appreciated.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • How to combine rows from different unrelated tables?

    I need to create a report where the data are coming from 2 unrelated tables.  My calculation needs data from both tables.  Is this possible within Crystal Reports without having to write complicated SQL commands?  If not, can someone provide an example of such a query?
    thanks in advance
    -Mark

    Morning Mark,
    Yes Amr is right however there has to be  some sort of link between the two tables to create a join. For example a Order no from one table matches with other Order no.
    There could be another possibility and that is if you have a third table which has two fields common to those two tables then when you bring the third table it will act as a middle man.
    If you need to bring the information onto the report according to some sort of criteria then those two tables need to be linked togeather at some point otherwise it won't work.
    For example
    I have two tables, FOC and Customer, both have nothing in common however the third table Orders has fields which is common to FOC and Customer. So I linked the two tables via Orders table. Now when I open my report my results are based on the Customer and FOC number.
    Hope this helps
    Regards
    Jehanzeb

  • How to create VO with multiple dynamic where clauses on select with UNION?

    I am trying to implement the View Object for the UNION query that looks like this:
         select a,b,c...
              from t1,t2,...
              where dynamic_where_clause1     
         union all
         select a,b,c,...
              from t11,t12, ...
              where dynamic_where_clause2
    There are up to 60 input parameters that are used to generate dynamic where clauses. They are actually created by calling PL SQL function.
    So far, I was not able to assign both where clauses to the view object. Is there a workable solution for this problem, besides resorting to programmatic View Object?
    I understand that recommended way with UNIONs is to wrap both queries into a parent select:
    select * from (
         select a,b,c...
              from t1,t2,...
              where ... -- table relationship joints
         union all
         select a,b,c,...
              from t11,t12, ...
              where ... -- table relationship joints
    ) QRSLT
         where dynamic_where_clause
    Unfortunately this approach doesn't work here, since individual selects are producing unmanageable amount of data and resulting query takes forever to complete.

    I afraid I would not have any real benefits from using VO if I replace the entire query with every request. Actually, the performance may suffer.
    I solved the problem by creating a POJO Data Control and invoking the custom select query from java. Not sure if it is the best approach to the problem, but implementation time is limited and it works.
    Actually, this is not the first time I see the need to implement VO with complicated SQL like select with unions and dynamic pieces. It would be nice to find a solution and not resort to workarounds.
    Edited by: viksicom on Aug 2, 2012 8:48 AM

  • Need help in handling string of characters

    Hi,
    I am trying to scan string and separate different text based on business logic. For example:
    String = 'My bus comes at 999 F Street at 8 am'
    Now I need to scan the string and break the sentence into multiple words like:
    - First occurrence of number which is 999 goes into var1 variable.
    - Last occurrence of number which is 8 goes into var2 variable.
    I am wondering if this can be achieve with regular expression of any oracle internal function.
    Thanks,
    Edited by: skas on Jun 6, 2013 10:34 PM

    nkvkashyap wrote:
    or you can even try like this...
    with data(str) as
    (select 'My bus comes at 999 F Street at 8 am' from dual),
    data1 as
    (select regexp_replace(str, '[^[:digit:]]+', ' ') a from data)
    select regexp_substr(a,'[^ ]+',1,1) var1,regexp_substr(a,'[^ ]+',1,2) var2 from data1;
    Output:
    var1         var2
    999     8
    No need to make this complicated ;)
    SQL> with data(str) as
      2  (
      3   select 'My bus comes at 999 F Street at 8 am'
      4   from dual
      5  )
      6  select     regexp_sUBsTR(str, '\d+') VAR1,
      7     regexp_sUBSTR(str, '\d+',1,2) VAR2
      8  from data;
    VAR V
    999 8Edited by: jeneesh on Jun 7, 2013 11:11 AM
    Missed David's post.. This is the same as his post..

  • Stored Procedure/Function Returns Rows?

    Hello,
    I have very little experience writing PL/SQL procedures, but I have written my fair share of Sybase stored procedures. In Sybase, I can create a stored procedure that returns rows of data. For example:
    create procedure myproc as
    begin
    select * from mytable;
    end;
    Then if I invoke the procedure (whether that is from an interactive SQL session or from a ColdFusion or JSP page), several rows of data are returned to me.
    The benefit of this is that the web developers don't need to write complicated SQL.
    Is this even possible in Oracle? I have never seen anyone actually do this. Or do my web coders need to learn how to write PL/SQL and embed it into their code?
    HELP!
    Thanks!

    Hi Justin,
    Thanks for your reply. That's kind of what I was suspecting, except that I was hoping to be able to execute the function/procedure from within a SQL session also, for testing. Is there a way to invoke such a procedure from a SQL*Plus session and have it return the rowset (ref cursor) just as if I had typed in the SQL select statement?
    For example, I just want to type at a SQL*Plus prompt something like this:
    mypackage.myfunction(param1, param2);
    and then have it return the results to me. Is that possible?
    Thanks again for your help.
    Mark

Maybe you are looking for