Problem in the "select" query....Just check out and help me

Hi there !!
I am getting the following errors while trying to execute the "select" query from JSP page:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
My code is :
String reg_no=(String)session.getAttribute("reg_no");
ResultSet rs=stmt.executeQuery("SELECT * FROM reg WHERE regno = "+reg_no);
(Note: the "regno" in the database is of numeric datatype)
Try to help me...
Thanx,
Ram.

Just so everyone knows:
Ram Mohan joined the forum on 7-Sep-2003 and received
his 25 Dukes for joining.
Since then, he's posted three questions, each one
promising 5-10 Dukes, and never once awarded them.
His strategy seems to be to wave Dukes, ask his
hit-and-run question, and then bolt.
Answer his questions if you wish, but don't do it
expecting Dukes. - MODDuffy, you're getting just as cranky as I have. See what hanging around these forums does to oneself? :)

Similar Messages

  • Can I get my Macbook Pro just checked out and tuned up at the genius bar?

    I'm having a hard time getting my questions answered. Basically I've had my Macbook Pro for four and a half years, but it's still doing mostly fine. It's just showing it's age slightly I think, with more spinning wheels than usual and odd things like the date is usually set to 1999 when I turn the computer on, but it rights itself in a few minutes. Also most the time when I plug it in it says it's not charging and I have to try multiple times. None of this is a huge deal, it's just that I really need the computer to last me preferably at least another year, so I worry about it a bit. I do take good care of it though. I'm about to move out of the country for a year, so I'd like to get it just checked out and perhaps tuned up a bit so that any problems are taken care of and it's in the best shape before I move away. I'd like to make a genius bar appointment, but the closest Apple store is a two hour drive from my home, so I don't want to go into it not having any idea how much it will cost or if they'll even be able to do what I'm hoping in the span of a single workday. I really don't want to have to drive back later to pick it up or have it sent off somewhere to be repaired, although if it does have serious problems I'd be willing to do that. I'd just like to know going in to it what the price range is likely to be like. I don't want to make the drive to the Apple store and have them tell me it's going to be a few hundred dollars just to have my computer looked over. And I don't even know if they offer that service, let alone if they can do it in a single afternoon. I've tried calling the store and conversations with the automated person really are not helpful. He just tells me to go online and make a reservation, and I can't figure out how to get my questions about cost and service answered.
    Also, am I being foolish hoping my four and a half year old Macbook will last at least another year or two? I have no idea what the "life expectancy" is for these things. I know nothing really about computers at all, so forgive my ignorance.
    Any help and insight is very much appreciated.

    The genius bar technicians can check your MBP for possible hardware problems and specific software issues that you may have.  The diagnosis will be free.  Any extensive repairs will not be free.
    If you have minor software problems, you essentially will have to deal with them yourself.  Examine these two comprehensive documents for possible problem definition and solutions.  If you encounter problems that you are unable to cope with, start a new discussion and there will be persons willing to assist you in solving them.
    https://discussions.apple.com/docs/DOC-3521
    https://discussions.apple.com/docs/DOC-3353
    Ciao.

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

  • Problem in the select query

    Hi.
    here i have to make the code in exit_saplv56u_004 in include zxv56u11.
    there are tables defined in itself.
    i have written like this,but not sure about the table updation and the declaration part:
    here i am writing this code in exit_sap
      TABLES:VTTP,VTTK,LIKP,KNA1.
      TABLES:ZOTC_SHPMNT_RTE.
      DATA:x_vttp type vttpvb,
           x_vttk type vttkvb,
           X_LIKP TYPE LIKP,
           X_KNA1 TYPE KNA1,
           X_ZOTC_SHPMNT_RTE TYPE ZOTC_SHPMNT_RTE,
           t_temp type vttk,       feels that declaration iswrong
           x_temp type vttk.      this table andwork area will be used to finally update vttk table feilds
      READ TABLE I_XVTTK INTO X_VTTK INDEX 1.
      READ TABLE I_XVTTP INTO X_VTTP INDEX 1.
    CLEAR X_LIKP.
      SELECT SINGLE *     FROM LIKP
                          INTO X_LIKP
                          WHERE VBELN = X_VTTP-VBELN.
        IF SY-SUBRC = 0.
          CLEAR X_KNA1.
      SELECT SINGLE * FROM KNA1              i jus need 2-3 feilds so howcan i avoid the performance prob
           INTO X_KNA1
        WHERE KUNNR = X_LIKP-KUNNR.
    IF SY-SUBRC = 0.
      CLEAR X_TEMP.
         SELECT SINGLE * FROM ZOTC_SHPMNT_RTE INTO table t_TEMP
         WHERE SHTYP = X_VTTK-SHTYP
         AND   LAND1 = X_KNA1-LAND1
         AND   BLAND = X_KNA1-REGIO
         AND   ZONE1 = X_KNA1-LZONE.
         IF SY-SUBRC = 0.
           IF T_TEMP[] IS INITIAL.
           READ TABLE T_TEMP INTO X_TEMP.     i want to create a temp internal table
           ELSE.
           SELECT SINGLE * FROM ZOTC_SHPMNT_RTE INTO TABLE t_TEMP
         WHERE SHTYP = X_VTTK-SHTYP
         AND   LAND1 = X_KNA1-LAND1
         AND   BLAND = X_KNA1-REGIO.
           IF SY-SUBRC = 0.
              READ TABLE T_TEMP INTO X_TEMP.
              IF SY-SUBRC = 0.
             MODIFY vttk FROM t_TEMP.       here i want to modify the feilds like vttk-route and vttk-tdlnr
             ENDIF.
             ENDIF.
             ENDIF.
    endif.
    endif.

    First declare a types structure with this 3 variables u want...
    now declare a work area(X_KNA1) of this types structure.
    And
    SELECT SINGLE LAND1 REGIO LZONE FROM KNA1
    INTO X_KNA1
    WHERE KUNNR = X_LIKP-KUNNR.

  • My Check Out and Open is creating a new document!

    Hi there,
    As the subject say, my Check Out and Open is creating a new document with a new ID instead of making a new revision of the document.
    It creates a new document starting the revision with the number 2! And if I make Check Out and Open of this, it creates a new document with the revision starting on 3.
    I can´t get a list of revisions of a document... it creates allways a new one...
    Can you explain me why? I really need to fix this.
    Thank you,

    Hi
    Yes the behavior is normal and thats because COAO is doing 2 steps in one viz checking out a content and also opening it for Editing. So effectively you are combining these 2 actions into one. So the content is checked out and hence shows up in the My checked out content.
    As for the DIS and COAO , I have not seen a way other than this of working , dont really know why this is the case but I haven't found out a way for making it work in a normal way. Once DIS (WEI) is uninstalled the COAO works normally as in a new revision for that content is checked in .
    Hope this helps
    Thanks
    Srinath

  • I have just created a new playlist, at the same time I have updated the ITunes software and that of my ITouch. My problem is that today I have been trying to edit the playlist and the edit playlist is greyed out please help

    I have just created a new playlist, at the same time I have updated the ITunes software and that of my ITouch. My problem is that today I have been trying to edit the playlist and the edit playlist is greyed out please help.
    I have been in preferences and checked manually edit etc and still no joy. I must be missing something.
    Susan

    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • I've had a problem with syncing itunes, when i sync it dosent sync songs previously deleted it just greys them out, which is great but if i want to add a new video or song from my computer it wont sync it will just grey out and wont play. now all my songs

    ive had a problem syncing with itunes recently. when i delete a song on my iphone when i sync with my computer it still syncs but just greys out and is rendered useless. thats great unless i when i want to add new music or videos from my pc to my iphone it wont sync and will just grey out. i looked for solutions and one said that deleteing all your music from the usage in settings would fix it, well now when i sync all of my music is greyed out. ive tried adding all of my songs manually into my ipod instead of syncing entire library and nothing. (also when i select to sync music nothing shows up in the usage bar (normally 3 gigs)  might help) could someone please help?

    I had major issues with the iPhone 4s battery, however it’s resolved.
    The tech who set the phone up at the Apple store did so with little training.
    if you have a mobile me account. First go and move all your data to the cloud by going on your computer and logging in at me.com/move. The cloud has replaced mobile me, so there is no need for those two accounts
    Also make sure that for any of your email accounts you set them up to fetch, not push. My tech person set them all to have the email servers push data to the phone. The new iphone4s antenna is extremely strong so it will continually try to access stuff that is pushed–***** a lot of battery life doing this. It makes it worse if you have exchange 2010 accounts. Something about changes made to exchange really suck battery life from devices that access such accounts.
    turning of locator and the push notifications from facebook--they have a lot!

  • How to optimize the select query that is executed in a cursor for loop?

    Hi Friends,
    I have executed the code below and clocked the times for every line of the code using DBMS_PROFILER.
    CREATE OR REPLACE PROCEDURE TEST
    AS
       p_file_id              NUMBER                                   := 151;
       v_shipper_ind          ah_item.shipper_ind%TYPE;
       v_sales_reserve_ind    ah_item.special_sales_reserve_ind%TYPE;
       v_location_indicator   ah_item.exe_location_ind%TYPE;
       CURSOR activity_c
       IS
          SELECT *
            FROM ah_activity_internal
           WHERE status_id = 30
             AND file_id = p_file_id;
    BEGIN
       DBMS_PROFILER.start_profiler ('TEST');
       FOR rec IN activity_c
       LOOP
          SELECT DISTINCT shipper_ind, special_sales_reserve_ind, exe_location_ind
                     INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
                     FROM ah_item --464000 rows in this table
                    WHERE item_id_edw IN (
                             SELECT item_id_edw
                               FROM ah_item_xref --700000 rows in this table
                              WHERE item_code_cust = rec.item_code_cust
                                AND facility_num IN (
                                       SELECT facility_code
                                         FROM ah_chain_div_facility --17 rows in this table
                                        WHERE chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                                          AND div_id = (SELECT div_id
                                                          FROM ah_div --8 rows in this table
                                                         WHERE division = rec.division)));
       END LOOP;
       DBMS_PROFILER.stop_profiler;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN TOO_MANY_ROWS
       THEN
          NULL;
    END TEST;The SELECT query inside the cursor FOR LOOP took 773 seconds.
    I have tried using BULK COLLECT instead of cursor for loop but it did not help.
    When I took out the select query separately and executed with a sample value then it gave the results in a flash of second.
    All the tables have primary key indexes.
    Any ideas what can be done to make this code perform better?
    Thanks,
    Raj.

    As suggested I'd try merging the queries into a single SQL. You could also rewrite your IN clauses as JOINs and see if that helps, e.g.
    SELECT DISTINCT ai.shipper_ind, ai.special_sales_reserve_ind, ai.exe_location_ind
               INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
               FROM ah_item ai, ah_item_xref aix, ah_chain_div_facility acdf, ah_div ad
              WHERE ai.item_id_edw = aix.item_id_edw
                AND aix.item_code_cust = rec.item_code_cust
                AND aix.facility_num = acdf.facility_code
                AND acdf.chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                AND acdf.div_id = ad.div_id
                AND ad.division = rec.division;ALSO: You are calling ah_internal_data_pkg.get_chain_id (p_file_id) every time. Why not do it outside the loop and just use a variable in the inner query? That will prevent context switching and improve speed.
    Edited by: Dave Hemming on Dec 3, 2008 9:34 AM

  • Simplify the select query to get single record

    Please let me know what is wrong with my query.
    Max(p_received_date) is returning null columns too. But i need to have only null record per period, if there is date and null record for the same billing then return the date record. please check november and september records. september should return only 09/13/10 record but it is returning null record too. please help to get expected out put.
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc
    Actual
    Billing key Billing company periodbalance lastpayment date outs
    110631534073 November 2010 U-7052-C 270 Yes
    110631534073 November 2010 U-7052-C 690 Yes
    110631534073 November 2010 U-7052-C 66 Yes
    110461533197 October 2010 U-7052-C 4740 Yes
    110461533197 October 2010 U-7052-C 27000 Yes
    110461533197 October 2010 U-7052-C 0 No
    110251532527 September 2010 U-7052-C 0 09/13/10 No
    110251532527 September 2010 U-7052-C 0 No
    110251532527 September 2010 U-7052-C -18 09/13/10 No
    110251532484 August 2010 U-7052-C 0 09/13/10 No
    110251532484 August 2010 U-7052-C 2001 09/13/10 Yes
    110251532484 August 2010 U-7052-C 0 No
    Expectedoutput(need only following columns)Outs is outstanding balance
    Billing key Billing company l astpayment date outs
    110631534073 November 2010 U-7052-C Yes
    110461533197 October 2010 U-7052-C Yes
    110251532527 September 2010 U-7052-C 09/13/10 No
    110251532484 August 2010 U-7052-C 09/13/10 YES
    By using below query i am getting all output as NO. HOw to modify this query.
    SELECT company,
    billing,LastPaymentDate,
    CASE
    WHEN SUM (DECODE (outs, 'YES', 1, 0)) > 0 THEN 'YES'
    ELSE 'NO'
    END Outstanding
    FROM (
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc)
    GROUP BY company, billing,LastPaymentDate;
    Note:in the actual out put max(lastpayment date) is returing null values. if there is any date in one billing return that date only remove null example is september. in september it should return only 09/13/10 this date not null date. but if there is no other within one biling then consider that as null example november..
    Thanks,
    v

    Another solution is setting NLS_SORT to CI - case insensitive (or whatever_your_language_is_CI) and NLS_COMP to ANSI:
    SQL> with t as (
      2             select 'HARI' name from dual union all
      3             select 'Hari' name from dual union all
      4             select 'HaRi' name from dual
      5            )
      6  select  *
      7    from  t
      8    where name = 'hArI'
      9  /
    no rows selected
    SQL> alter session set nls_sort = binary_ci
      2  /
    Session altered.
    SQL> alter session set nls_comp=ansi
      2  /
    Session altered.
    SQL> with t as (
      2             select 'HARI' name from dual union all
      3             select 'Hari' name from dual union all
      4             select 'HaRi' name from dual
      5            )
      6  select  *
      7    from  t
      8    where name = 'hArI'
      9  /
    NAME
    HARI
    Hari
    HaRi
    SQL> SY.

  • Problem in my Select query

    Hi Experts,
    I need a clarification in my Select query.
    Have created a custom search help and my requirement is I have Request ID, Last and First Name as my search parameters. I need to fetch the values from my Ztable on search with the above said search parameters, where its workflow status = 30.
       * Get Request ID
      lv_pattern = <ls_query_params>-request_id.
      IF lv_pattern CA '*'.
        REPLACE ALL OCCURRENCES OF '*' IN lv_pattern WITH '%'.
      ENDIF. " IF lv_pattern CA '*'
      IF lv_pattern IS INITIAL.
        lv_pattern = '%'.
      ENDIF. " IF lv_pattern IS INITIAL
    ** Get NACHN - Lastname
        lv_last_name = <ls_query_params>-nachn.
        IF lv_last_name CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN lv_last_name WITH '%'.
        ENDIF. " IF lv_pattern CA '*'
        IF lv_last_name IS INITIAL.
          lv_last_name = '%'.
        ENDIF. " IF lv_pattern IS INITIAL
    ** Get VORNA - First Name
        lv_first_name = <ls_query_params>-vorna.
        IF lv_first_name CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN lv_first_name WITH '%'.
        ENDIF. " IF lv_pattern CA '*'
        IF lv_first_name IS INITIAL.
          lv_first_name = '%'.
        ENDIF. " IF lv_pattern IS INITIAL
    *Selecting the RequestID/Last and First Name values with workflow status as 30.
    SELECT zzreq_id " Internal number for appropriation request
                nachn
               vorna
      INTO TABLE lt_select_list
      FROM ZTABLE
      WHERE (  ( zzreq_id LIKE lv_pattern ) and
                     ( nachn like lv_last_name ) or
                      ( vorna LIKE lv_first_name ) )
           AND zzstatus = lv_workflow_status.
    My problem is, ofcourse this query is selecting all the records where status = 30 and even it works correctly, If I searches with Request ID(* or *3*).
    But am not able to select the records, if I searches with Last or First Name. Guess I did some thing wrong in select query.
    Please advice me.
    With Regards,
    Ram.

    Re: Problem in my Select query
    Krishna kumar Jun 9, 2014 7:52 AM (in response to Ramakrishnan Murugan)
    Hi Ramakrishnan,
                         Can you just try the below Select Query,
    SELECT zzreq_id
                nachn
               vorna
      INTO TABLE lt_select_list
      FROM ZTABLE
      WHERE ( zzreq_id     LIKE    lv_pattern                and
                         nachn         LIKE    lv_last_name         and
                         vorna          LIKE     lv_first_name )    and
                          zzstatus = lv_workflow_status.
    Cheers,
    Krishnakumar B.
    I think the above suggested query is same as your solution.

  • Problem in standard select query in fagll03

    Good Morning frndz,
    I m facing a problem while runnin fagll03. when executed it gives timeout error.
    When I debug it  , it gets stuck in a select query
    SELECT SINGLE * FROM t800m INTO CORRESPONDING FIELDS OF ls_b
    WHERE totable = ls_t800a-ntable
    AND fromtable = 'ACCIT_GLX'
    AND tofield = id_glflex_fieldname
    AND seqnr = space.
    The content in variable ls_t800a-ntable was FAGLFLEXA  and in id_glflex_fieldname was USNAM.
    When I cheked in table t800m, the entry could not be found. But in the report instead of setting
    sy-subrc = 0 , it is stuck in the select query itself....kindly suggest y it is happening so
    Regards,
    Vincy

    Re: Problem in my Select query
    Krishna kumar Jun 9, 2014 7:52 AM (in response to Ramakrishnan Murugan)
    Hi Ramakrishnan,
                         Can you just try the below Select Query,
    SELECT zzreq_id
                nachn
               vorna
      INTO TABLE lt_select_list
      FROM ZTABLE
      WHERE ( zzreq_id     LIKE    lv_pattern                and
                         nachn         LIKE    lv_last_name         and
                         vorna          LIKE     lv_first_name )    and
                          zzstatus = lv_workflow_status.
    Cheers,
    Krishnakumar B.
    I think the above suggested query is same as your solution.

  • Problem in the select

    Hi.
    i am having problem during execution in the select query and its taking time.what is to be done and do  i need to add line of code.
    plz reply
    sort i_aufk by aufnr.
    delete adjacent duplicates from i_aufk comparing aufnr.
    IF NOT i_aufk[] is INITIAL.
        SELECT  aufnr      "Order number
                budat      "Posting date
        INTO TABLE i_afru
        FROM afru         "Order Confirmations
        FOR ALL ENTRIES IN i_aufk
        WHERE aufnr = i_aufk-aufnr.
        IF sy-subrc EQ 0.
        SORT i_aufk BY aufnr.

    Hi,
    Table AFRU is not indexed on AUFNR (as standard) so it will be performing multiple full table scans.
    Create a secondary index on the table including MANDT & AUFNR and the performance will improve.
    Regards,
    Darren

  • Possible problems with Check out and Open Component and delayed publishing

    Hi,
    I've experienced some seemingly wrong behaviors of the checkout and open component and also with the delayed publishing feature, I've listed it down :
    1) The all important one:
    We know we've delayed publishing features for content, if we set the Release Date metadata at a future date, the content will not be released immediately, but do we have a delayed publishing features for a website page. Through manage website the user can add / delete a page(section), may do include or exclude from navigation etc.. but can they set a future date when a particular page can be included in or excluded from navigation? This should be a standard feature for a WCM solution and I hope there is some solution for sure.
    2) Can we set a datefield with a calendar feature as a page custom (section) property?
    3) Again the issue with checkout and open component, only the user with admin privilege seems to be able to change the content, normal contributors cannot, cause every time is tries to check in with the old author name, so the user has to have admin privilege to assign a different doc author's name. No trace also who is making the changes.
    4) Also facing a lot of problems while trying to implement when we use this checkout and open component. As we cannot check who is making the change there is to way to set us a step for self review, also user can only approve or reject but cannot edit the doc before passing it to the next step, if the step user is created using tokens then only checking out of the doc takes it pass the step user, but everything is working perfect with contributor data file. No problem whatsoever. Even if we use manual check out and then check in (i mean without using checkout and open component) this is working fine. But the main problem with non-technical users will be they would not like the content server portal at all and they would always prefer ms word over anything else. They would directly like to double-click on the website page, the word doc will pop up and they would make change and save.
    Issue 1 and 4 are killer issues for us, I need your help to find a solution. I have few more issues that i will post later.
    Regards,
    Nirmalya
    vijayr: Are u Vijay Ramanathan? Product Manager, Oracle UCM, u r my mentor sir.

    Hey Shotdawq,
    I was a bit low on bandwidth, so could not visit the forum any sooner.DIS is dynamic integration studio, it works on the webdav protocol.
    you will need to install DIS on the client machines. The POC that i did was integration of SiteStudio with CheckOutAndOpenInNative.
    I am also planning to referenc this functionality from WebSphere, what i have in my mind is to copy the java script from my sitestudio page and paste
    it in the JSP, and then using the CIS or RIDC will execute the serverices. At present i am stuck in some other work, If i get this thing working i will
    update you. In the meanwhile if you have some question for me, feel free to throw them.
    cheers,
    sapan

  • I've just downloaded itunes 12 and when I connect my IPod classic 160gb, I tunes shows it'sP name briefly and then then ipod silhouette at the top left simply greys out and nothing else happens. Please advise.

    I've just downloaded itunes 12 onto my pc. When I connect my IPod classic 160gb, it's name shows up briefly before the ipod silhouette at the top left simply greys out and nothing happens.
    Please advise.

    I finally resolved my problem after spending way too much time on it. I simply handed my 160GB iPod to my husband to put his fav Stones & Beatles songs on and I went back to my 80GB Microsoft Zune which has never disappointed me.
    After spending so much time trying to figure this out I did finally take it back to Apple Store who performed a diagnostic and found there was a problem with the device. They replaced it with a refurbished one which has similar issues. All I wanted to do was listen to my music. Was that too much to ask? So I am happy to be free of this problematic device. No more Apple for me!!

  • Need single record for single period. Modify the select query.

    Requirement
    THere are 6 programs for each company for each billing period. If anyof the program for one billing period and period_balance>0 then display outstanding balance YES. if period_balance <=0 for all the programs for one period then outstanding balance=NO
    Below is the query i have used but i have to modify the query to get single record for each period whether outstandignbalance yes or no. Please help to resolve this issue. OR modify the query.
    select distinct B_Billing_key, B_COMPANY_ID company ,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) lastPaymentdate,
    SURCH_AMOUNT,ADJUST_AMOUNT,PI_AMOUNT,AMOUNT,
    (nvl(SURCH_AMOUNT,0)+nvl(ADJUST_AMOUNT,0)+nvl(PI_AMOUNT,0))-(nvl(sum(AMOUNT),0))"Period_Balance",
    decode(sign((nvl(SURCH_AMOUNT,0)+nvl(ADJUST_AMOUNT,0)+nvl(PI_AMOUNT,0))-(nvl(sum(AMOUNT),0))),1, 'Yes'
    ,'No'
    ) outstandingbalance
    p.PROGRAM_NAME_ID programname
    FROM tuff_balance_view,MV_PROG_SURCH S,MV_PAYMENT_HOLDING H,MV_PROGRAM_DICT P where
    b_company_id = 'U-7052-C'
    and B_Billing_key=s.BILLING_KEY
    and S.PROGRAM_KEY = P.PROGRAM_KEY
    and P.PROGRAM_KEY= H.PROGRAM_KEY
    GROUP BY B_Billing_key,B_COMPANY_ID,B_REPORT_PERIOD,SURCH_AMOUNT,ADJUST_AMOUNT,PI_AMOUNT,PROG_SURCH_KEY,
    S.PROGRAM_KEY,p.PROGRAM_NAME_ID,AMOUNT
    order by B_Billing_key desc
    B_Billing_key is the primary key. I am looking for the output only one record for each biling perid. there are 6 programs for each billing period. if any of the program has period balance >0 then outstanding balance should be yes. For sample i am giving 2 programs.
    Actual output from the above
    biling_key company billing period period_balance outstandingbalance programname
    123 xyz January 2011 $4 Yes ABC
    123 xyz January 2011 $-5 NO DEF
    456 xyz February 2011 $-3 NO ABC
    456 xyz February 2011 $- 2 NO DEF
    Need the output as below from the above query. Can you please help to simplify query. If anyof theprogram having outstanding balance for that particular period show the outstandigbalance as yes. Else NO.
    Expected output as below
    company billing period outstandingbalance programname
    xyz January 2011 Yes ABC
    xyz February 2011 No DEF
    Thanks,
    vi

    Hi G,
    With the same query i am gettting outs as NO for all months which is not true. can you pelase look at the following data.
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc
    Actual
    Billing key Billing company periodbalance lastpayment date outs
    110631534073     November 2010     U-7052-C     270          Yes
    110631534073     November 2010     U-7052-C     690          Yes
    110631534073     November 2010     U-7052-C     66          Yes
    110461533197     October 2010     U-7052-C     4740          Yes
    110461533197     October 2010     U-7052-C     27000          Yes
    110461533197     October 2010     U-7052-C     0          No
    110251532527     September 2010     U-7052-C     0     09/13/10     No
    110251532527     September 2010     U-7052-C     0          No
    110251532527     September 2010     U-7052-C     -18     09/13/10     No
    110251532484     August 2010     U-7052-C     0     09/13/10     No
    110251532484     August 2010     U-7052-C     2001     09/13/10     Yes
    110251532484     August 2010     U-7052-C     0          No
    Expectedoutput(need only following columns)
    Billing key Billing company lastpayment date outs
    110631534073     November 2010     U-7052-C               Yes
    110461533197     October 2010     U-7052-C               Yes
    110251532527     September 2010     U-7052-C          09/13/10     No
    110251532484     August 2010     U-7052-C          09/13/10     YES
    By using below query i am getting all output as NO. HOw to modify it.
    SELECT company,
    billing,LastPaymentDate,
    CASE
    WHEN SUM (DECODE (outs, 'YES', 1, 0)) > 0 THEN 'YES'
    ELSE 'NO'
    END Outstanding
    FROM (
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc)
    GROUP BY company, billing,LastPaymentDate;
    Note:in the actual out put max(lastpayment date) is returing null values. if there is any date in one billing return that date only remove null example is september. in september it should return only 09/13/10 this date not null date. but if there is no other within one biling then consider that as null example november..
    Thanks,
    v

Maybe you are looking for