CapsLock state is wrong in creationComplete

I have a title window that is being called from my
application.creationComplete event to popup a login dialog. During
the creationComplete of the TitleWindow I do a test for capslock
state so that I can show a message as to whether capslock is on to
assist users during password entry. I use the keyUp event to handle
state changes.
If capslock is on when the creationComplete is fired
Keyboard.capsLock returns false. If capslock is off during
creationComplete, Keyboard.capslock returns false also (so its
right half the time ;) After this, I can succesfully detect the
state of capslock like in a test button for instance.
Any clues?
Here is the paltry code:
private function loginWindowDone():void
if (Keyboard.capsLock)
capState.text = "Capslock On";
else capState.text = "";
Thanx.

PLease make a small test case and file a bug at
bugs.adobe.com/jira in the Flex project. Try using callLater to
detect after creationComplete

Similar Messages

  • CS4 ReInstall - At reinstall, CS4 accepts my License #.  At first start up, it states its wrong.

    At the point of re-installing my CS4, the system CONFIRMS and ACEEPTS my License # that came with my cd's.  The install was done WITH admin rights.
    At first start up after install, it states my License # is wrong.
    Why?

    Try this:
    Uninstall CS4 completely.
    Set your system date back to a date just after November 1, 2008.
    Reinstall and launch it.
    If it works, reset your date back to today.
    If not, you'll probably need to contact customer service: https://helpx.adobe.com/x-productkb/global/find-serial-number.html or 1 (800) 833-6687

  • Why this SQL statement is wrong?

    When I trying update my database using following statement:
    String query = "UPDATE Flights" +
    "SET AircraftType ='" + inputPanel.type.getText() +
    "', EnterPoint = '" + inputPanel.point.getText() +
    "',GroundSpeed = " + Integer.parseInt(inputPanel.speed.getText()) +
    ",Altitude =" + Integer.parseInt(inputPanel.altitude.getText()) +
    "WHERE FlightNumber =" + inputPanel.flight.getText();
    //where speep and altitude are ints
    it always say:Syntax error in UPDATE statement.
    I cannot understand why because this is a standard SQL statement I think.
    Please help me!
    Thanks in advance

    this part is causing you problems:
    "WHERE FlightNumber =" + inputPanel.flight.getText();
    if FlightNumber is an integer then you should convert the text to an int:
    "WHERE FlightNumber =" + Integer.parseInt(inputPanel.flight.getText());
    or if it is a String then:
    "WHERE FlightNumber ='" + inputPanel.flight.getText()+ "'";
    Jamie

  • Solid state drive= wrong choice for the newmacbookpro 2010?

    Hi
    i've been exchanging on the logic pro forum about the ssd vs the hdd serial to configure a macbook pro for logic.
    I would love to hear your point of view or experience about that .
    also since it's the apple forum i hope there should be some advice from technician from apple.
    since from logic pro forum i had the point of view of logic pro certified level 1 and 2
    here is the links :
    http://www.logicprohelp.com/viewtopic.php?t=57664
    http://www.logicprohelp.com/viewtopic.php?t=55058&highlight=solid+state
    thanks a lot for any comments or experiences.
    june

    but why is it bad to record internally today
    I didn't say it was "bad" as such, I said I'd only do it when necessary (and I do) but I'd generally still record to external drives where possible.
    imagine you're having a 500 GB internally you can still back up on a other drive after.
    is there any consequence about that kind of configuration?
    The thing is, the internal drive is the system drive, so it has all kinds of drive activity going on in addition to audio - swap file reading and writing, loading apps, utilities, logging functions and many more.
    i heard about the lifetime too but more from some experience from 2009 but i don't know what
    happen with the new model if they upgrade their ssd in anyway?
    Time will tell I guess, these technologies are new and unproven over enough time yet.

  • SQL Tuning Advisor evaluates statement using wrong plan_hash_value

    The execution plan for one of my SQL statements changed this morning. The statement is in a third-party package. The new plan runs worse than the old plan. I had the SQL tuning advisor evaluate the statement. I ran it three times. Each time it evaluated the original plan, not the new one. I can tell that because the plan_hash_value shown in the advisor's recommendations is the old plan's plan_hash_value. The old plan no longer appears in DBA_HIST_SQL_PLAN. I do not understand why the advisor is using the original plan, nor where it is getting it. It does not show up in Oracle Enterprise Manager either.
    Has anyone see this before?
    Do you have any suggestions how I can force the advisor to evaluate the new execution plan?
    I am running Oracle Database Server 10gR2 Enterprise Edition.
    Thanks,
    Bill

    Following advice given earlier, I ran the SQL Tuning Advisor by executing DBMS_SQLTUNE from within a SQL*Plus session instead of via Oracle Enterprise Manager. The problem I originally encountered in OEM also happened using DBMS_SQLTUNE. Using DBMS_SQLTUNE I specified plan_hash_value => '3657286666' but the results of running create_tuning_task shows that the utility used a different plan_hash_value. See below:
    Based on this, I think the problem I originally blamed on OEM's creation of a SQL Tuning Advisor job was misdirected. I now believe that OEM supplied the proper information to the advisor, but the advisor did not correctly use what is was given.
    Below is what I submitted when I ran create_tuning_task and execute_tuning_task. Note that the value assigned to plan_hash_value is 3657286666. Following the messages from execute_tuning_task, see the output produced by the execution of report_tuning_task. In EXPLAIN PLANS SECTION heading 1 - ORIGINAL, note that Plan Hash Value = 3541843898.
    I submitted instructions to use plan_hash_value 3657286666 but instead it used 3541843898. Why did it do this??????
    I have not found a published bug that describes this condition.
    Thanks,
    Bill
    SQL> DECLARE
    2 stmt_task VARCHAR2(64);
    3 BEGIN
    4 stmt_task:=dbms_sqltune.create_tuning_task(sql_id => 'ab30ujpshkur3', plan_hash_
    value => '3657286666', time_limit => 3600, task_name => 'Tune_ab30ujpshkur3_3657286666'
    , description => 'Task to tune sql_id ab30ujpshkur3 plan_hash_value 3657286666');
    5 END;
    6 /
    PL/SQL procedure successfully completed.
    SQL> EXECUTE dbms_sqltune.execute_tuning_task('Tune_ab30ujpshkur3_3657286666');
    PL/SQL procedure successfully completed.
    Here is the output produced by report_tuning_task:
    SQL> SET linesize 200
    SQL> SET LONG 999999999
    SQL> SET pages 1000
    SQL> SET longchunksize 20000
    SQL> SELECT dbms_sqltune.report_tuning_task('Tune_ab30ujpshkur3_3657286666', 'TEXT', 'ALL') FROM dual;
    SELECT dbms_sqltune.script_tuning_task('Tune_ab30ujpshkur3_3657286666', 'ALL')
    FROM dual;
    DBMS_SQLTUNE.REPORT_TUNING_TASK('TUNE_AB30UJPSHKUR3_3657286666','TEXT','ALL')
    GENERAL INFORMATION SECTION
    Tuning Task Name : Tune_ab30ujpshkur3_3657286666
    Tuning Task Owner : EXPTEST
    Tuning Task ID : 110190
    Scope : COMPREHENSIVE
    Time Limit(seconds) : 3600
    Completion Status : COMPLETED
    Started at : 08/03/2012 14:47:45
    Completed at : 08/03/2012 14:48:54
    Number of Index Findings : 1
    Schema Name: EXPTEST
    SQL ID : ab30ujpshkur3
    SQL Text : SELECT ATTACHED_ACC_ID FROM SERVICE_EVENTS WHERE TSERV_ID = :B4
    AND EQ_NBR = :B3 AND ASSOC_EQ_NBR = :B2 AND (PERFORMED <= :B1 +
    1/1440 AND PERFORMED >= :B1 - 1/1440)
    FINDINGS SECTION (1 finding)
    1- Index Finding (see explain plans section below)
    The execution plan of this statement can be improved by creating one or more
    indices.
    Recommendation (estimated benefit: 100%)
    - Consider running the Access Advisor to improve the physical schema design
    or creating the recommended index.
    create index EXPTEST.IDX$$_1AE6E0001 on
    EXPTEST.SERVICE_EVENTS('EQ_NBR','ASSOC_EQ_NBR');
    Rationale
    Creating the recommended indices significantly improves the execution plan
    of this statement. However, it might be preferable to run "Access Advisor"
    using a representative SQL workload as opposed to a single statement. This
    will allow to get comprehensive index recommendations which takes into
    account index maintenance overhead and additional space consumption.
    EXPLAIN PLANS SECTION
    1- Original
    Plan hash value: 3541843898
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    Time |
    | 0 | SELECT STATEMENT | | 1 | 32 | 4 (0)|
    00:00:01 |
    |* 1 | FILTER | | | | |
    |
    |* 2 | TABLE ACCESS BY INDEX ROWID| SERVICE_EVENTS | 1 | 32 | 4 (0)|
    00:00:01 |
    |* 3 | INDEX RANGE SCAN | SEVENTS_PERFORMED | 18 | | 2 (0)|
    00:00:01 |
    Query Block Name / Object Alias (identified by operation id):
    1 - SEL$1
    2 - SEL$1 / SERVICE_EVENTS@SEL$1
    3 - SEL$1 / SERVICE_EVENTS@SEL$1
    Predicate Information (identified by operation id):
    1 - filter(:B1+.000694444444444444444444444444444444444444>=:B1-.0006944444444444444
    444
    44444444444444444444)
    2 - filter("EQ_NBR"=:B3 AND "ASSOC_EQ_NBR"=:B2 AND "TSERV_ID"=:B4)
    3 - access("PERFORMED">=:B1-.000694444444444444444444444444444444444444 AND
    "PERFORMED"<=:B1+.000694444444444444444444444444444444444444)
    Column Projection Information (identified by operation id):
    1 - "ATTACHED_ACC_ID"[VARCHAR2,12]
    2 - "ATTACHED_ACC_ID"[VARCHAR2,12]
    3 - "SERVICE_EVENTS".ROWID[ROWID,10]
    2- Using New Indices
    Plan hash value: 2568062050
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| T
    ime |
    | 0 | SELECT STATEMENT | | 1 | 32 | 2 (0)| 0
    0:00:01 |
    |* 1 | FILTER | | | | |
    |
    |* 2 | TABLE ACCESS BY INDEX ROWID| SERVICE_EVENTS | 1 | 32 | 2 (0)| 0
    0:00:01 |
    |* 3 | INDEX RANGE SCAN | IDX$$_1AE6E0001 | 1 | | 2 (0)| 0
    0:00:01 |
    Query Block Name / Object Alias (identified by operation id):
    1 - SEL$1
    2 - SEL$1 / SERVICE_EVENTS@SEL$1
    3 - SEL$1 / SERVICE_EVENTS@SEL$1
    Predicate Information (identified by operation id):
    1 - filter(:B1+.000694444444444444444444444444444444444444>=:B1-.0006944444444444444
    4
    4444444444444444444444)
    2 - filter("TSERV_ID"=:B4 AND "PERFORMED">=:B1-.000694444444444444444444444444444444
    4
    44444 AND "PERFORMED"<=:B1+.000694444444444444444444444444444444444444)
    3 - access("EQ_NBR"=:B3 AND "ASSOC_EQ_NBR"=:B2)
    Column Projection Information (identified by operation id):
    1 - "ATTACHED_ACC_ID"[VARCHAR2,12]
    2 - "ATTACHED_ACC_ID"[VARCHAR2,12]
    3 - "SERVICE_EVENTS".ROWID[ROWID,10]
    SQL> 2
    DBMS_SQLTUNE.SCRIPT_TUNING_TASK('TUNE_AB30UJPSHKUR3_3657286666','ALL')
    -- Script generated by DBMS_SQLTUNE package, advisor framework --
    -- Use this script to implement some of the recommendations --
    -- made by the SQL tuning advisor. --
    -- NOTE: this script may need to be edited for your system --
    -- (index names, privileges, etc) before it is executed. --
    create index EXPTEST.IDX$$_1AE6E0001 on EXPTEST.SERVICE_EVENTS('EQ_NBR','ASSOC_EQ_NBR')
    ;

  • My usage stats are wrong

    IOs7.1.2
    64gb
    says my available is 15gb
    but i have used around 24gb only
    do I have a virus wasting memory

    There are no viruses or malware that affect Apple's iOS devices, UNLESS, you have jailbroken it.
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/ht1867
    How much space is used by your Other? You may be able to reduce.
    How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
    http://tinyurl.com/85w6xwn
    How to Remove “Other” Data from iPhone, iPad and iPod Touch
    http://www.igeeksblog.com/how-to-remove-other-data-from-iphone/
    With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5/6/7, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
    What is “Other” and What Can I Do About It?
    https://discussions.apple.com/docs/DOC-5142
    iPhone or iPad Ran Out of Storage Space? Here’s How to Make Space Available Quickly
    http://osxdaily.com/2012/06/02/iphone-ipad-ran-out-of-available-storage-space-ho w-to-fix-quick/
    6 Tips to Free Up Tons of Storage Space on iPad, iPhone, and iPod Touch
    http://osxdaily.com/2012/04/24/6-tips-free-up-storage-space-ipad-iphone-ipod-tou ch/
    Also,
    How to Clear Message/iMessage Cache on iPhone & iPad And Reclaim Lots of Free Space
    http://www.igeeksblog.com/how-to-clear-message-imessage-cache-on-iphone-ipad/
    What is Stored in iCloud and What is Not
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/what-is-s tored-in-icloud
     Cheers, Tom

  • Statements addressed to wrong customer, F.27

    Hi experts,
    When I am running F.27, some of the statements picks wrong customer in the customer account in form. I am giving wide range for customer selection. Please suggest what can be the reason? The program was working fine before and no changes have been done recently.

    Hi Gaurav,
    We are using standard SAP13 form. In test environment, its working fine but its problem only in Production environment. We have more than 140 company codes, but having problem in just one comany code with few customers. Is there any field in customer master data that can be the reason of populationg one cust statement in others?

  • INSERT statement in Java and MS Access

    Hi all,
    can anyone please tell me how to insert data to an MS Access table using JSP i tried INSERT statement of java but it is getting errors saying INSERT statement is wrong. I have no idea about MS access insert statement. i am totally tired of this. Please someone help me.

    Hello,
    MS Sql can cause problems where it goes off standard, however I dont think insert is any different.
    INSERT INTO table_name (column1, column2) VALUES (variable1, variable2)
    Make sure your table and column names are exactly right, Java is case sensitive, so make sure the case is correct also.
    The other common error is if you have a required field in the database that is not populated by your program, so, if for instance there was a column3 in the table for the above example, which was a required field, the sql would fail as there is no data being entered for column3.

  • Electronic bank statement with CTX payment advice

    Hi:
    I'm trying to figure out how I can process an electronic bank statement that contains the payment advice embedded as a CTX addendum. I'm finding info how to issue an ACH and add the CTX addendi. But how can I process it when that info comes back from the bank on the electronic bank statement and I'm on the receiving end of that transaction?
    Of course I'm looking to clear the corresponding customer open items along the provided payment advice info.
    I do see an interpretation algorithm 032, which will look at a payment advice that has already been received prior to the bank statement. That's close, but not quite it.
    Maybe the answer is 'functionality not available in SAP standard' and that will be just fine. I've got the list of all the various enhancement points for the process and if that's the route I need to take, I'll be on my merry enhancing way...
    Any pointers highly welcome!
    Thanks
    Stephen

    Hello,
    From FF.5, if you are using interpretation algorithms 11, 12 or 13,
    the check encashment date ( PAYR-BANCD ) will be updated in PAYR when
    the check is neither voided nor cashed. The relevant code is as under
    RFEBBU10. Source Code :
    CASE FEBEP-INTAG.
          WHEN '000'.                 <- A when for every Int. Algorithm
          WHEN '011'.
                PERFORM SEARCH_CHECK_IN_PAYR.
    FORM SEARCH_CHECK_IN_PAYR.
      check is not voided nor cashed
        SELECT SINGLE * FROM BKPF WHERE BUKRS = FEBKO-BUKRS
                                    AND BELNR = PAYR-VBLNR
                                    AND GJAHR = PAYR-GJAHR.
        IF SY-SUBRC = 0.
          PAYR-XBANC = 'X'.
          PAYR-BANCD = FEBEP-VALUT.
      So, the field PAYR-BANC is always updated with FEBEP-VALUT
      (Value Date) and there is no standard way to avoid it.
    If the check number in the statement is wrong, then the interpretation
    algorithm could not update the encashment date. The interpretation
    algorithm run only when the electronic bank statement is loaded
    (hence only once) and not when FEBA is processed.
    In FEBA (SAPMF40A), there is no further update in PAYR, and hence you
    need to go to the Cheque Register and change the date manually in this case.
    Check Note 115147 for further information.
    Regards,
    REnan

  • Problem with Case statement

    I friends,
    I am using a case statement for a number field like this
    case when (customer_no is null or customer_no ='') then t.customer_no else gv.customer_no end as customer_no
    When i complie this i get an errror ORa-00932 inconsistent data types expected char got number....
    when i remove the case statement the query runs fine so i am sure its the case statement thats wrong here..Am i checking it the wrong way...
    Thank you in advance

    874167 wrote:
    I friends,
    I am using a case statement for a number field like this
    case when (customer_no is null or customer_no ='') then t.customer_no else gv.customer_no end as customer_no
    When i complie this i get an errror ORa-00932 inconsistent data types expected char got number....
    when i remove the case statement the query runs fine so i am sure its the case statement thats wrong here..Am i checking it the wrong way...
    Thank you in advancewith Oracle strings are enclosed in single quote marks
    so Oracle is confused & unhappy with line below
    customer_no =''
    since CUSTOMEER_NO is a NUMBER
    why do you compare number to a string?

  • Does bigger explain plan in TKPROF output indicate something wrong with SQL

    We were tracing some database sessions.
    Using TKPROF we were able to read the trace file.
    we have noticed that some of the SQL ( 1-2 lines SQL statements) were showing up atleast
    150 lines of explain plan.
    So we realized that the sql statements are badly written.
    Based on that above can we come into the following conclusion:
    - for 1-2 lines of SQL Statement if there is 100+ lines of explain plan in TKPROF report, it indicates the SQL statement
    is wrongly written ?

    johnpau2013 wrote:
    We were tracing some database sessions.
    Using TKPROF we were able to read the trace file.
    we have noticed that some of the SQL ( 1-2 lines SQL statements) were showing up atleast
    150 lines of explain plan.
    So we realized that the sql statements are badly written.
    Based on that above can we come into the following conclusion:
    - for 1-2 lines of SQL Statement if there is 100+ lines of explain plan in TKPROF report, it indicates the SQL statement
    is wrongly written ?The only rule that is always true for tuning SQL, is that NO rule is ALWAYS true for every SQL statement &
    every data distribution.
    it depends
    post actual example, so we can see what you see.

  • Select Statement Doubt

    Moderator message: Please use meaningful subject in future
    Hi,
    I've a requirement that I need to get a record from EREV table for a Purchase Requisition no. based on Latest Version No. (REVNO. ) at a single shot.
    I hav used the following code but i dint get desired values.
    Select EDOKN
              FGNAM
              FGDAT
              REVNO
           from EREV into ls_erev
           where edokn eq p_edokn and
                     revno eq (select Max(revno) from erev)).
    Any body pl help me.
    -Rajiv
    Edited by: Vaddepati on Dec 3, 2008 11:01 AM
    Edited by: Matt on Dec 3, 2008 10:03 AM

    Hi veddapati,
    Your sequence of using the fields in Select statement is wrong...thats why, you are not getting the required output..
    You should select revno in the select statement before FGNAM as it is present in the table..
    Please modify your select statement like this..... ::
    Select EDOKN
    REVNO
    FGNAM
    FGDAT
    from EREV into ls_erev
    where edokn eq p_edokn and
    revno eq (select Max(revno) from erev)).
    Hope it will solve your problem
    Regards,,
    Nikita
    Edited by: Nikita Jain on Dec 3, 2008 2:29 PM

  • Types statement

    Hi ABAP Experts,
      I have some doubt on declaring Internal tables, could you tell me which case  case1 or case 2  is correct.
    Case1.
    types: begin of t_kunnr,
               name1(30) type c,
               name2(30) type c,
               kunnr(10) type c,
           end of t_kunnr.
    TYPES it_kunnr TYPE standard table of t_kunnr.
    DATA: wa_kunnr TYPE t_kunnr.
    DATA: it_kunnr type t_kunnr.
    wa_kunnr-name1 = 'KK'.
    wa_kunnr-name2 = 'MM'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '3999'.
    append wa_kunnr to it_kunnr.
    loop at it_kunnr into wa_kunnr.
      write : / wa_kunnr-name1, wa_kunnr-kunnr.
    endloop.
    case2
    types: begin of t_kunnr,
               name1(30) type c,
               name2(30) type c,
               kunnr(10) type c,
           end of t_kunnr.
    DATA: wa_kunnr TYPE t_kunnr,
               it_kunnr TYPE STANDARD TABLE OF t_kunnr.
    wa_kunnr-name1 = 'KK'.
    wa_kunnr-name2 = 'MM'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '4999'.
    append wa_kunnr to it_kunnr.
    wa_kunnr-name1 = 'KK1'.
    wa_kunnr-name2 = 'MM1'.
    wa_kunnr-kunnr = '3999'.
    append wa_kunnr to it_kunnr.
    loop at it_kunnr into wa_kunnr.
      write : / wa_kunnr-name1, wa_kunnr-kunnr.
    endloop.
    Thanks in advance.

    Hi,
    As everyone has said case 2 is the right way.
    In Case1.
    TYPES it_kunnr TYPE standard table of t_kunnr.
    DATA: it_kunnr type t_kunnr.
    these two statements are wrong.  First one rong because 'Types ' statement is used to decalre local program types, which only have a defenition and no related object in Data Base.  Data statement is used to create objects in DB of a specific type.
    Second statement is wrong because it only creates a DB object of structure type and not table type.
    As suggested u can use occurs 0 additions but this is obsolete and not advisable anymore. This is because occurs 0 creates a table with a header line and header line concept is obsolete.
    The best practise is to declare the Type using TYPES statement and the decalring table of that type using  "type [STANDARD/HASHED/SORTED] table of " addition.

  • ORA-00900: invalid SQL statement error in procedure

    In procedure we referring only 2 tables
    Tables:
    1)     Edw_orders_ref
    2)     Change_pl
    Condisition:
    1)     whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
    2)     we pass table name and day values as arguments to the procedure.
    3)     Based on day column data only we update.
    4)     Heir day column means partisition values of the table
    Procedure is:
    create or replace procedure Proc_update_target(P_Day varchar2,p_tablename nvarchar2)
    as
    TYPE PlCurTyp IS REF CURSOR;
    Pl_cv PlCurTyp;
    --emp_rec  edw_orders_ref%ROWTYPE;
    pl_rec Edw_orders_ref.pl%type;
    product_rec Edw_orders_ref.product%type;
    opt_rec Edw_orders_ref.opt%type;
    sql_stmt varchar(3200);
    n number:=0;
    BEGIN
    sql_stmt := 'select lpl.opt,lpl.product,lpl.pl from minddba.change_pl lpl
    where exists ( select 1 from '|| p_tablename ||' where '||p_tablename||'.product=lpl.product and '||p_tablename||'.opt=lpl.opt
    and '||p_tablename||'.day='||P_Day||' )';
    dbms_output.put_line('hi');
    OPEN pl_cv FOR sql_stmt ;
    LOOP
    dbms_output.put_line('hello1');
    FETCH Pl_cv INTO pl_rec,product_rec,opt_rec;
    EXIT WHEN Pl_cv%NOTFOUND;
    dbms_output.put_line('hello');
    execute immediate
    'update '||p_tablename||' set pl=:rpl
    where product=:rproduct
    and opt=:ropt
    AND day=:day' using pl_rec, product_rec,opt_rec,P_Day;
    if Pl_cv%rowcount=10000 then
    commit;
    end if;
    END LOOP;
    CLOSE pl_cv;
    commit;
    exception
    when others then
    dbms_output.put_line('Error while updating target pl:'||SQLERRM);
    end;
    it is compile nad debug.
    but execution time this error was coming
    exec Proc_update_target('20110226','edw_orders_ref')
    hi
    hello1
    hello
    Error while updating target pl:ORA-00900: invalid SQL statement
    i think in that procedure updata statement is wrong,if any one corect them.

    Hi,
    This are details of table structure and my requirement for that procedure
    CREATE TABLE EDW_ORDERS_REF
    SO_ID VARCHAR2(20 BYTE) NOT NULL,
    SRC_SYS_KY NUMBER(19) NOT NULL,
    DAY VARCHAR2(8 BYTE) NOT NULL,
    FIN_CLOSE_DT VARCHAR2(8 BYTE) NOT NULL,
    SO_LN_ITM_ID VARCHAR2(12 BYTE) NOT NULL,
    EXT_EFF_TS VARCHAR2(26 BYTE) NOT NULL,
    EFF_FRM_GMT_TS VARCHAR2(26 BYTE) NOT NULL,
    CONTRA_FG VARCHAR2(1 BYTE) NOT NULL,
    FDW_TRAN_TYPE_CD VARCHAR2(1 BYTE) NOT NULL,
    SO4 VARCHAR2(4 BYTE),
    SO2 VARCHAR2(2 BYTE),
    PUR_AGMT VARCHAR2(20 BYTE),
    SF VARCHAR2(6 BYTE),
    V_BOX VARCHAR2(18 BYTE),
    PL VARCHAR2(30 BYTE),
    MCC_CD VARCHAR2(20 BYTE),
    OPT VARCHAR2(18 BYTE),
    ORDER_UNITS NUMBER(15,3),
    SO_OPT_QTY NUMBER(10,3),
    SO_DTL_EXT_QT NUMBER(15,3),
    ORDER_LIST_LCY NUMBER(18,4),
    ORDER_NET_LCY NUMBER(18,4),
    ORDER_NET_CLC NUMBER(18,4),
    ORDER_LIST_CLC NUMBER(18,4),
    CURRENCY_CD VARCHAR2(2 BYTE),
    SLS_CHNL_CD VARCHAR2(1 BYTE),
    CBN VARCHAR2(20 BYTE),
    GEOG_UNIT VARCHAR2(30 BYTE),
    PRODUCT VARCHAR2(18 BYTE),
    ORDER_NR VARCHAR2(20 BYTE),
    ORDER_LINE_NR VARCHAR2(12 BYTE),
    LOAD_DT DATE DEFAULT SYSDATE
    CREATE TABLE MINDDBA.CHANGE_PL
    PRODUCT VARCHAR2(18 BYTE) NOT NULL,
    OPT VARCHAR2(3 BYTE) NOT NULL,
    PL VARCHAR2(2 BYTE) NOT NULL
    1)     whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
    2)     we pass table name and day values as arguments to the procedure.
    3)     Based on day column data only we update.
    4)     Heir day column means partisition values of the table
    When executing this one I got one error like
    exec Proc_update_target('20110226','edw_orders_ref');
    hi
    hello1
    hello
    ORA-00900: invalid SQL statement

  • Read statement giving problem

    Dear Experts,
    I am making monthly consumption report, In which i am getting monthly data column wise for different month , here firstly i am fetching header mblnr  date according to date from mkpf then i am fetching data from mseg.....
    I have same mblnr in both tables..... Now i am using read statement like this.......
    sort lt_mkpf by mblnr.
    SORT lt_mseg BY mblnr.
    LOOP AT lt_mkpf INTO lw_mkpf.
    READ TABLE lt_mseg INTO lw_mseg WITH KEY mblnr = lw_mkpf-mblnr
                                                mjahr = lw_mkpf-mjahr
                                                        BINARY SEARCH.
    When I am debugging i am getting data in lw_mkpf but sy-subrc = 4 is coming  and getting wrong data in final table by using these above statements..........
    where as if i am using loop like this:
    SORT lt_mkpf BY mblnr.
    SORT lt_mseg BY mblnr.
    LOOP AT lt_mkpf INTO lw_mkpf.
    v_mkpf = lw_mkpf-mblnr.
    LOOP AT lt_mseg INTO lw_mseg WHERE mblnr EQ v_mkpf.
    with this i am getting right data........ But it takes lot of time to execute..........
    Can you please guide me am i using read statement by wrong method. which one is the correct method which one shoul be used.........

    Hello Shelly,
    To solve the issue of read table being failed, Sort the internal table by mblnr and mjahr. say sort lt_mseg by mblnr mjahr but read the internal table mseg will give you only one data. What about the other line items. MSEG is material document line item table. So for one record in MKPF there can be more than one record in MSEG. So to consider all the line items, you need to loop on the MSEG internal table instead of read table.
    LOOP AT lt_mkpf INTO lw_mkpf.
    v_mkpf = lw_mkpf-mblnr.
    LOOP AT lt_mseg INTO lw_mseg WHERE mblnr EQ v_mkpf.
    This statement will take time and create performance issue. So rewrite the statement as
    LOOP AT lt_mseg INTO lw_mseg.
    read table lt_mkpf with key lw_mkpf binary search.
    Regards
    Farzan

Maybe you are looking for