Problem In Displaying records in table

Hi,
I have created a table and set the records displayed property as 10.But in controller I am dynamically inserting one row in the table at index 0.
So whenever the vo returns morethan 10 rows ,the table displays last record first.Suppose the vo returns 11 records,then in the page I am able to see
only the last record i.e 11th record,then i have to navigate in the table to see the first 10 records.My requirement is I want to see the 10 records first.PLs help me.

The following code is written in co process request.
OAViewObject oaviewobject = (OAViewObject)am.findViewObject("XXCHRCwkMatchingPersonVO1");
oaviewobject.setWhereClauseParam(0,first_name);
oaviewobject.setWhereClauseParam(1,last_name);
oaviewobject.setWhereClauseParam(2,dtStartDate);
oaviewobject.executeQuery();
pageContext.getApplicationModule(webBean).invokeMethod("checkCwkDuplicates");
-------------AM method
public void checkCwkDuplicates()
PerOAViewObjectImpl peroaviewobjectimpl = getXXCHRCwkMatchingPersonVO1();
OARow oarow = (OARow)peroaviewobjectimpl.createRow();
Number n=new Number(0);
String s35 = getOADBTransaction().getMessage("PER", "PER_289352_DUP_PER_NO_MATCH", null);
oarow.setAttribute("FullName", s35);
oarow.setAttribute("Mondiff", n);
oarow.setAttribute("Switcher", "Enable");
peroaviewobjectimpl.insertRowAtRangeIndex(0, oarow);
pls help me.

Similar Messages

  • Problem in displaying records in multi record block

    Hi all,
    I have a problem in displaying records in a multi record block in a form.
    I have 1 control block and 1 data block(multi-record block).
    Control block has one item CUSTOMER-ID. Data block has many other items related to customer.
    when a value is entered in customer-id text item, all the relavant details should be displayed in the data block.
    but, the records are overlapping in the same line in the data block, actually they have to be displayed one record per one line.
    The code is,
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    END LOOP;
    Please help me out..
    Thanks in advance!
    Suman

    Hi Suman
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    first_record;
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    next_record;
    END LOOP;
    Try this. you are trying to show all the records in same line. so its overlapping.
    Thankyou
    [email protected]

  • Problem while displaying all the table names from a MS Access Data Source.

    I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
    I started to executing by "Select * from Tab" as if in SQL.
    But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
    Please let me know how can i display all the table Names in the MS Access Dats Source.

    Here i am developing the application in Swing using JDBC for accessing the database.
    I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.

  • Problem with displaying records from the database in a table ui element

    Hi,
    Iam creating an application which retrieves data from an oracle database. Iam able to connect to the database and retrieve the data in a result set. Then I try to set these values in a context node as follows,
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpNode node = wdContext.nodeEmp();
    IEmpElement el = node.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    where the context structure is emp(node)
                                   ---name(attribute)
                                   ---empId(attribute)
    Then I have bound the node emp to a table ui element.If I try to deploy this it comes up with Internal Server error.
    But if try this way, without creating a node, only with attributes name and empId,
    wdContext.currentContextElement.setName(name);
    wdContext.currentContextElement.setEmpId(EmpId);
    and binding the attributes to inputfields in the view, Iam able to see the last record in the database table.
    So where am I going wrong while using the table ui element?
    Regards,
    Rachel

    Hi
    Try this
    //Create the node in outer of while loop and bind to Table UIElement
    IEmpNode node = wdContext.nodeEmp();
    while (resultSet.next()) {
    String name = result.getString(1);
    String EmpId = result.getString(2);
    IEmpElement el = wdContext.createEmpElement();
    el.setName(name);
    el.setEmpId(EmpId);
    node.addElement(el);
    Kind Regards
    Mukesh

  • Problem idn displaying data in table control

    hi
    i have searched almost every forum and tried to execute my program but still it is giving problem.
    means it does not display the data when i execute the trasanction. it keeps tablecontrol blank.
    pls see my code below and give me soloution. plz
    In SE51
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    loop at itab with control tcb.
    module mapdata.
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    loop at itab.
    endloop.
    In SE38
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    select * from zpvcust into table itab.
    *read table itab into tcb.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  mapdata  OUTPUT
          text
    MODULE mapdata OUTPUT.
    zpvcust-custno = itab-custno.
    zpvcust-custname = itab-custname.
    ENDMODULE.                 " mapdata  OUTPUT

    Hi Vikas
    This code you follow the i am sure tou will get the values
    process before output.
      module status_0103.
      module get_data.
      loop at   it_bapi3008_2
           into lw_bapi3008_2
           with control tc_data
           cursor tc_data-current_line.
        module tc_data_get_lines.
      endloop.
    module getdata output.
      call function 'BAPI_AP_ACC_GETOPENITEMS'
        exporting
          companycode       = 'RS01'
          vendor            = name
          keydate           = ket_data
       noteditems           = 'X'
    * IMPORTING
    *   RETURN            =
        tables
          lineitems         =  it_bapi3008_2.
      call function 'BAPI_AR_ACC_GETOPENITEMS'
        exporting
          companycode       = 'RS01'
          customer          = lfa1-kunnr
          keydate           = ket_data
    *      NOTEDITEMS        = ' '
    *      SECINDEX          = ' '
    *    IMPORTING
    *      RETURN            =
        tables
          lineitems         = it_bapi3007_2.
      loop at it_bapi3007_2 into lw_bapi3007_2.
        lw_bapi3008_2-doc_no = lw_bapi3007_2-doc_no.
        lw_bapi3008_2-doc_date = lw_bapi3007_2-doc_date.
        lw_bapi3008_2-lc_amount = lw_bapi3007_2-lc_amount.
        lw_bapi3008_2-db_cr_ind = lw_bapi3007_2-db_cr_ind.
        lw_bapi3008_2-doc_type  =  lw_bapi3007_2-doc_type.
        lw_bapi3008_2-amt_doccur = lw_bapi3007_2-amt_doccur.
        append lw_bapi3008_2 to it_bapi3008_2.
        clear lw_bapi3008_2.
      endloop.
    endmodule.                 " GETDATA  OUTPUT
    module tc_data_get_lines output.
      data g_tc_data_lines type sy-loopc.
      g_tc_data_lines = sy-loopc.
    endmodule.                    "
    try it you will get the values
    Regards Nilesh

  • How to display records in table

    i gave the following code But it displays only first record.
    The records can come in duplicate from the RFC  like the following
    A  field1
    A  field1
    A  field1
    B  Field 1
    We should display like
    A  field1 field1 field1
    B field1
    But it displays first record of A But no B.
    Any Help is appreciated.
    Code is below
    private void createData(
              Vector rVector,
              Vector column,
              IRecordSet table2,
              int Count) {
              SimpleDateFormat myformatter = new SimpleDateFormat("dd-MMM-yyyy");
              String Hiredate;
              String Name1, Name2, prof;
              int[][] iArray = new int[100][100];
              int i = 0, j = 0, i2 = 1, j2 = 0, row = 0, col = 0;
              Name2 = "";
              double avg1 = 0, avg2 = 0;
              try {
                   table2.beforeFirst();
                   Vector dataVec = new Vector();
                   row = 0;
                   col = 0;
                   while (table2.next()) {
                        Name1 = table2.getString("ENAME");
                        if (dataVec.isEmpty()) {
                             dataVec.addElement(Name1);
                             dataVec.addElement(table2.getString("STELL_DESCP"));
                             dataVec.addElement(table2.getString("PLANS_DESC"));
                             dataVec.addElement(table2.getString("MANAGER"));
                             dataVec.addElement(table2.getString("HIRE_DT"));
                             prof = table2.getString("RATING");
                             if (prof.trim().length() == 0)
                                  prof = "empty";
                             iArray[row][col++] = Integer.parseInt(prof);
                             dataVec.addElement(prof);
                        } else {
                                  //col = col+1;
                             if (Name2.equalsIgnoreCase(Name1))
                                  prof = table2.getString("RATING");
                                  if (prof.trim().length() == 0)
                                  prof = "";
                                 iArray[row][col++] =Integer.parseInt(prof);
                                  dataVec.addElement(prof);
                                  prof = "";
                              else
                                  for (int k = 0; k < Count; k++)
                                       avg1 = avg1 + iArray[row][k];
                                  dataVec.addElement(String.valueOf(avg1));
                                  dataVec.addElement(String.valueOf(avg2));
                                  rVector.addElement(dataVec);
                                  col = 0;
                                  row = row++;     
                                  // dataVec.clear();
                        Name2  =  Name1  ;
                        Name1= "";
              } catch (Exception e) {
                   //e.printStackTrace();

    Hi,
    Try Checking the While loop like this
                   while (table2.next()) {
                        Name1 = table2.getString("ENAME");
                        if (dataVec.isEmpty()) {
                        } else {
                             if (Name2.equalsIgnoreCase(Name1)) {
                             } else {
                        rVector.addElement(dataVec);
                        col = 0;
                        row = row++;
                        Name2 = Name1;
                        Name1 = "";
    Regards,
    Beevin.

  • Problem in displaying data  in table

    Hi all,
    Below is the select statement.Here i am getting values for ls_class_overview-CLASS
    but for ls_class_overview-CLINT.....i am getting 0000000.
    Scenerio : when i select class....i will enter then description(KSCHL) will come and at the same time another table will get display with all characterstics(ATBEZ) and value (AWRT)
    read table lt_class_overview into ls_class_overview index 1.
           select single s~KSCHL
                    into corresponding fields of ls_class_overview
                    from ( SWOR AS s INNER JOIN KLAH AS k
                       ON sCLINT = kCLINT
                      AND k~CLASS = ls_class_overview-CLASS ).
            select single ATBEZ  from CABNT
                    into corresponding fields of ls_class_overview
                    where ATINN = ls_class_overview-CLINT.
             select single ATWRT  from CAWN
                    into corresponding fields of ls_class_overview
                    where ATINN = ls_class_overview-CLINT.
          APPEND  ls_class_overview to lt_class_overview.
    lo_nd_class_overview->bind_table( lt_class_overview )
    Thanks
    Kiran

    I assume when reading table lt_class_overview into the ls you are already getting this as 00000 as in the select you are not populating it. How are you populating the table lt_class_overview?

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • Update all alv (grid) displayed records to internal table

    Hi all,
    i want to update the records into the internal table which are changed by the user in the edit field.
    after he select save button.
    i  have to save the ALV grid displayed records in the internal table.
    hw can i do this ?

    ALV with EDIT and SAVE functionality
    Code:REPORT z_demo_alv_jg.*******************************************************************
    TYPE-POOLS                                                      *
    TYPE-POOLS: slis. *******************************************************************
    INTERNAL TABLES/WORK AREAS/VARIABLES     *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.*******************************************************************
    FIELD-SYMBOLS                                                   *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.*******************************************************************
    SELECTION SCREEN                                                *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.*******************************************************************
    START-OF-SELECTION                                              *
    START-OF-SELECTION.* Storing table name
      p_table = tabname.* Create internal table dynamically with the stucture of table name
    entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.    LEAVE TO LIST-PROCESSING.
      ENDIF.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.* Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.  SORT i_fieldcat BY col_pos.* Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.  REFRESH <dyn_tab_temp>.* Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.  IF sy-subrc <> 0.  ENDIF.&----
    *&      Form  SET_PF_STATUS
          Setting custom PF-Status
         -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.  SET PF-STATUS 'Z_STANDARD'.ENDFORM.                    "SET_PF_STATUS&----
    *&      Form  user_command
          Handling custom function codes
         -->R_UCOMM      Function code value
         -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.* Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.* Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.* Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.* Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.*   When a record is selected
        WHEN '&IC1'.*     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.*       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.*       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.*         Make all the fields input enabled except key fields
              w_field-input = 'X'.          MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.        ENDIF.*       Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.        IF sy-subrc = 0.*         Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.*         If the record is changed then track its index no.
            and populate it in an internal table for future
            action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.      ENDIF.*   When save button is pressed
        WHEN 'SAVE'.*     Sort the index table
          SORT i_index.*     Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.      LOOP AT i_index.*       Find out the changes in the internal table
          and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.      ENDLOOP.*     Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.      IF sy-subrc = 0.*       Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.        REFRESH <dyn_tab_temp>.*       Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.      ENDIF.
      ENDCASE.  rs_selfield-refresh = 'X'.ENDFORM.                    "user_command

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Problem inserting records in table using cursors

    hi all
    i have a block in which i m trying to take records from a table pass it to a procedure which in turn calls some procedures
    and than the procesed records are dumped into another table
    this is my code
    set serveroutput on
    declare
    lastcall date;
    srcip varchar2(50);
    username varchar2(50):='9204';
    duration number;
    callto varchar2(50);
    accountid varchar2(50);
    calltime date;
    subscriberid varchar2(50);
    country varchar2(50);
    cost varchar2(50);
    CURSOR process_cdr
              IS
    SELECT
              srcip,
              username,
              callto,
              calltime,
              duration
    FROM rawcdr
    WHERE     calltime>lastcall;
    begin
    select max(calltime_gmt) into lastcall from
    processed_cdr;
    open process_cdr;
    fetch process_cdr into srcip,username,callto,calltime,duration;
    dbms_output.put_line(callto);
    if (instr(callto,'00')=5) then
    callto:=SUBSTR(REPLACE(callto,SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 3, 50);
    dbms_output.put_line(callto);
    elsif (instr(callto,'011')=5) then
    callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 4, 50);
    dbms_output.put_line(callto);
    else
    callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') +1 , 50);
    end if;
    process_call(srcip,username,duration,callto,accountid,subscriberid,country,cost);
    dbms_output.put_line(cost);
    dbms_output.put_line('trying to insert');
    insert into processed_cdr values(accountid,subscriberid,srcip,username,callto,country,calltime,duration,cost) ;
    dbms_output.put_line('inserted successfully');
    FETCH process_cdr INTO srcip, username, callto, calltime, duration;
    close process_cdr;
    end;
    now the problem is that
    records are not getting inserted nor an error is shown
    i guess i m not that much familiar with cursors
    and thats creating prob
    please help

    Hallo,
    but you haven't a loop ! :-)
    Try this,
    (not tested)
    set serveroutput on
    declare
    lastcall date;
    srcip varchar2(50);
    username varchar2(50):='9204';
    duration number;
    callto varchar2(50);
    accountid varchar2(50);
    calltime date;
    subscriberid varchar2(50);
    country varchar2(50);
    cost varchar2(50);
    CURSOR process_cdr
    IS
    SELECT
    srcip,
    username,
    callto,
    calltime,
    duration
    FROM rawcdr
    WHERE calltime>lastcall;
    begin
    select max(calltime_gmt) into lastcall from
    processed_cdr;
    open process_cdr;
    LOOP
    fetch process_cdr into srcip,username,callto,calltime,duration;
    EXIT WHEN process_cdr%NOTFOUND;
    dbms_output.put_line(callto);
    if (instr(callto,'00')=5) then
    callto:=SUBSTR(REPLACE(callto,SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 3, 50);
    dbms_output.put_line(callto);
    elsif (instr(callto,'011')=5) then
    callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 4, 50);
    dbms_output.put_line(callto);
    else
    callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') +1 , 50);
    end if;
    process_call(srcip,username,duration,callto,accountid,subscriberid,country,cost);
    dbms_output.put_line(cost);
    dbms_output.put_line('trying to insert');
    insert into processed_cdr values(accountid,subscriberid,srcip,username,callto,country,calltime,duration,cost) ;
    dbms_output.put_line('inserted successfully');
    /* Second fetch is not needed
    --FETCH process_cdr INTO srcip, username, callto, calltime, duration; */
    END LOOP;
    close process_cdr;
    COMMIT; -- eventually
    end;You didn't answered - do you do COMMIT elsewhere ?
    I placed COMMIT also, if you don't need it, you can comment it
    Regards
    Dmytro

  • Help in disabling display of record in table control

    Hi all,
    I need to disable the display of record from an internal table in table control.
    I have the folllowing code:
    PROCESS BEFORE OUTPUT.
    Set status & title; possibly disable Proceed option
      MODULE status_0410.
    Fill table control with data
      LOOP AT ts_cor
           INTO z2rlcr_screen_struc
           WITH CONTROL tc_cor
           CURSOR tc_cor-current_line.
        MODULE modify_screen.
      ENDLOOP.
    module modify_screen output.
    Don't allow any input for lines that would fail:
      if z2rlcr_screen_struc-status_code <> c_yellow or
         w_proceed = space.
         w_help_screen = c_yes.
      Iterate through screen
        loop at screen.
        Set screen input to 'off' if screen element is...
          if screen-name = 'Z2RLCR_SCREEN_STRUC-MANCODE' or
             screen-name = 'Z2RLCR_SCREEN_STRUC-REASDESC'.
            screen-input = c_off.
          endif.
          modify screen.
        endloop.
      endif.
    Do not show the line if the line is deleted.
      if z2rlcr_screen_struc-del_line eq 'X'.
    here I need the help if del_line eq 'X' then I should disable the
    display of the whole record.
      endif.
    endmodule.                 " MODIFY_SCREEN  OUTPUT
    I hope its clear.
    Any help will be appreciated.
    Thanks
    Sukumar.

    Hi Sukumar,
    Do you mean to say that the entry that you deleted should not be displayed in the table control?
    If that is the case,then I think the following code can help you.
    I had a similar requirement in my project and this is the code that I used.
    Go through it and you will understand it.
    CASE SY-COMM.
      WHEN 'DELETE'.
    ****To delete the seleceted line from table control****
          LOOP AT tb_schedule.           "tb-schedule is the name of the internal table used for table control.
            IF tb_schedule-mark = 'X'.
    **tb_schedule is the internal table(same structure as tb_schedule) to hold the deleted entries.***
              MOVE-CORRESPONDING tb_schedule TO tb_schedule_del.
              APPEND tb_schedule_del.
              DELETE tb_schedule.
            ENDIF.
          ENDLOOP.
    **to remove the deleted valules in the Ztable**
    LOOP AT tb_schedule_del.
        ztm09_eket-ebeln = ztm09_ekko-ebeln.
        ztm09_eket-ebelp = tb_schedule_del-ebelp.
        ztm09_eket-etenr = tb_schedule_del-etenr.
        ztm09_eket-menge = tb_schedule_del-menge.
        ztm09_eket-eindt = tb_schedule_del-eindt.
    ****Delete the entries into schedule table***
        Delete ztm09_eket.
      ENDLOOP.
    Hope this code will help you.
    Revert for any querries.
    Reward points if helpfull.
    Regards,
    Kashyap

  • Still having a problem with ComboBox in a Table

    In my JClient app I still can't get a ComboBox to work in a JTable. The ComboBox doesn't display in the table and my pageDef file (below) looks fine to me. Can anyone verify that a ComboBox in a JTable works in the production release or tell me what I'm doing wrong?
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.36.73" id="PanelPersonAddressView8PageDef"
    Package="com.esp.test.pageDefs"
    MsgBundleClass="com.esp.test.pageDefs.PanelPersonAddressView8PageDefMsgBundle">
    <parameters/>
    <executables>
    <iterator RangeSize="-1" Binds="AppModuleDataControl.PersonAddressView1"
    DataControl="AppModuleDataControl" id="PersonAddressView1Iter"/>
    <iterator id="AddressTypeView1Iterator" RangeSize="-1"
    Binds="AddressTypeView1" DataControl="AppModuleDataControl"/>
    <iterator id="PersonAddressView1Iterator" RangeSize="10"
    Binds="PersonAddressView1" DataControl="AppModuleDataControl"/>
    </executables>
    <bindings>
    <table ColumnSort="entireCollection" id="PersonAddressView1"
    IterBinding="PersonAddressView1Iter"
    xmlns="http://xmlns.oracle.com/adfm/jcuimodel">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="PersonId"/>
    <Item Value="AddressId"/>
    <Item Value="AddressTypeId"/>
    <Item Value="ReadOnlyAddress"/>
    </AttrNames>
    <AttrProp name="AddressTypeId">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    </table>
    <combobox id="DCComboBox" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"
    StaticList="false" ListOperMode="0"
    IterBinding="PersonAddressView1Iterator"
    ListIter="AddressTypeView1Iterator">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeId"/>
    </AttrNames>
    <ListAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeId"/>
    </ListAttrNames>
    <ListDisplayAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeDesc"/>
    </ListDisplayAttrNames>
    </combobox>
    </bindings>
    </pageDefinition>

    I have a similar problem. I have got the combobox in the jtable working (when i switched off the labels). Everything seems to works except when I select the first record in the combobox. When I tab out of the cell it becomes empty. If I first select a different record( 2-n) and then the first record the value remains when I tab out of the cell. This also looks like a bug to me. Here's my binding code:
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.36.73" id="OpeningsTijdenPanelPageDef"
    Package="store.ui.panel.in3_1_park.pageDefs">
    <parameters/>
    <executables>
    <iterator id="POpeningsTijdView1Iterator" RangeSize="-1"
    Binds="POpeningsTijdView1"
    DataControl="ParkerenAppModuleDataControl"/>
    <iterator id="DagView1Iterator" RangeSize="-1" Binds="DagView1"
    DataControl="ParkerenAppModuleDataControl"/>
    </executables>
    <bindings>
    <table ColumnSort="entireCollection"
    id="ActiviteitParkerenView1POpeningsTijdView1"
    IterBinding="POpeningsTijdView1Iterator"
    xmlns="http://xmlns.oracle.com/adfm/jcuimodel">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    <Item Value="Begintijd"/>
    <Item Value="Eindtijd"/>
    </AttrNames>
    <AttrProp name="Dagid">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    <AttrProp name="Dag">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    </table>
    <combobox id="DCComboBox" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"
    StaticList="false" ListOperMode="0"
    IterBinding="POpeningsTijdView1Iterator"
    ListIter="DagView1Iterator" NullValueFlag="1">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    </AttrNames>
    <ListAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    </ListAttrNames>
    <ListDisplayAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dag1"/>
    </ListDisplayAttrNames>
    </combobox>
    </bindings>
    </pageDefinition>
    Has anyone else encountered this problem?

  • Problem in displaying x-axis label in charts

    hi experts,
                   i am using charts in my report..... the problem is that the label in the x-axis is not getting displayed.
    i think it may be due to the no. of columns. i have to display records in chart for 31 days that is there should be 31 bars ...
    it is displaying the bars but not the label like (01/06 , 02/06..) in x-axis...where as if i reduce the number of columns it is getting displayed....could you please help me in this..
    below is the code snippet,
    CALL FUNCTION 'GRAPH_2D'
    EXPORTING
    TITL = 'DATE vs PURITY'
    VALT = 'PURITIY'
    SMFONT = 'X'
    WINPOS = '1'
    WINSZX = '80'
    WINSZY = '80'
    TABLES
    DATA = CHART.
    thanks in advance,
    syed

    Hi,
    I think you can try with WINSZX = '100' & WINSZY = '100' so that your graphic window opens up with highest cordinates.
    And there is a limitation that DATA may contain at most 32 rows. Dispalying all column labels will not be possible if the value is too large.
    Alternatively you can try out with function module 'GRAPH_MATRIX_2D'.
    Hope this helps.

  • Cannot display all the tables of the schema!!!

    Hi:
    I use the oracle sql developer on the windows xp, I found that the tables tab cannot display all the tables of the schema owner, I use the sql "select count(*) from user_tables" I found the result is more than the tab can be display, and I also press the "show more" already.... does anyone can help me ???

    Similarly, I have 852 tables owned by the connected user (selected count from user_tables and checked the user tables report which has this many records returned), but when I double-click on the "Show More" and select Show All, I only get approximately 375 tables listed.
    It doesn't help that the sorting is different - ie ASF_ comes before ASFB in the connection pane but the other way around in the report.
    However, it looks as though the problem is that tables that are not analysed (based on the report data in DATE_LAST_ANALYZED) are not being displayed under the Table node.

Maybe you are looking for