Insert row in middle???

Hi experts,
can i insert a row in the middle of the table which had 100 rows,i need to insert a new row after the 22nd row ..is it possible? expecting your possible reply soon..
Senthil

insert row in middle??.<br>
Please, do not post twice (or more) same thread, even in different forums. That's becoming very hard to follow.<br>
<br>
Nicolas.

Similar Messages

  • Insert rows in the middle

    I'm trying to figure out how to insert rows in the middle
    row 1
    row 2
    row 3
    I need to insert 2 rows before row 2
    I know I have to use the AddRow(1, Position) however after many tries, it doesn't seem to work or at least I don't know how to
    insert the second row as if I do +1 it's not realy adequate, also, pVal.Row reports Row 2 and in the documentation it sais 0 based which is not right so I'm a bit confused on how to go about that.
    Edited by: Marc Roussel on Aug 10, 2011 8:23 AM
    Here's the whole thing, maybe you'll understand where I'm at :
    I enter an ItemCode which is a kit.  After the person enter the quantity, I pop a .NET Windows form which asks for questions and then after the questions I get back and add the lines but it seems that when I add the lines, I'm still on the line I was entering the kit and it overrides it instead of Adding the new row at the position I'm asking it to add the row.
    Even if I do pVal.Row +1 or +2 or +3, it doesn't matter
    Edited by: Marc Roussel on Aug 10, 2011 8:28 AM

    The code below adds the 2 lines all right but then, a blank line after and the line that was already there below is destroyed.  Don't ask me why and what is happening to that existing line which seems to have lost the ItemCode or I don't know what happened
    CurrentLine = pVal.Row;
    CurrentLine++;
    oMatrix.AddRow(1, CurrentLine);
    SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "01P38");
    SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
    CurrentLine++;
    oMatrix.AddRow(1, CurrentLine);
    SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "03P12");
    SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
    I did not know that doing a simple thing like this would be a hard business...
    Edited by: Marc Roussel on Aug 10, 2011 9:15 AM

  • Insert Rows Above in Form

    Hello all,
    I'm trying to allow users to insert rows on a form in such away that the added row renders in the middle of the form. Probably having a check box on each row saying 'insert row above'.
    The purpose is to emulate editing a table in a word processor basically. I understand I'd have to manage re-sequencing the data as the user changes records that appear in the 'middle' of the table.
    I've seen D Kubicek's 'row mover' page and it's a good fallback, however I'd be interested as to whether what I want is really simple or will involve a lot of js and / or Ajax.
    Cheers,
    Toby
    ================================================
    Eg
    Before
    Sequence Data Chkbox ("insert above")
    ======================
    ID1 Value1 []
    ID2 Value2 []
    ID3 Value3 [x]
    After
    Sequence Data Chkbox
    ======================
    ID1 Value1 []
    ID2 Value2 []
    (null) (null) []
    ID3 Value3 []

    See this example on that issue if your tabular form is standard:
    http://apex.oracle.com/pls/otn/f?p=31517:209
    This example again, if it is a manual one:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    As Andy suggested, the order in the SQL, nulls first would do the job. However, if sorting is enabled, there is a problem.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Not able to insert row programticaly

    hi am trying to insert row to another viewObject from another viewobject programaticaly ,can somebody help me,i have recreate the problem i upload it in hostfile,am in jdeveloper 11.1.1.6.0
    am geting this log error
    Caused by: oracle.jbo.InvalidOwnerException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25030. Error message parameters are {0=UamUserdetails, 1=oracle.jbo.Key[marksn ]}
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2498)
         at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11042)
         at worklis.view.beantest.addnew(beantest.java:138)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)Edited by: adf009 on 2013/02/15 4:43 PM
    Edited by: adf009 on 2013/02/15 4:57 PM
    Edited by: adf009 on 2013/02/15 7:22 PM

    the code am using is below
        public void addnew(ActionEvent actionEvent) {
            // Add event code here...
            // Add event code here...
            //Code to get the bindings for TargetVO :
            Map<Object,String> mp=new HashMap<Object, String>();
                    DCBindingContainer bindings2 =
                       (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   JUCtrlHierBinding obj = (JUCtrlHierBinding)bindings2.findCtrlBinding("UamUserdetailsView2");
                   ViewObject targetVO = obj.getViewObject();
              DCBindingContainer bindings =
                       (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding empIter =
                       bindings.findIteratorBinding("DeltTable1Iterator");
            //SourceVO1Iterator is the iterator under Executables section for the SourceVO1 bindings.
            RowSetIterator roleRSIters = empIter.getRowSetIterator();
            RowSetIterator rs1 = roleRSIters.getRowSet().getViewObject().createRowSetIterator(null);
            rs1.first();
                   NameValuePairs nvp = null;
                   String username = null;
            while (rs1.hasNext()) {
                               Row r = rs1.next();  
                       nvp = new NameValuePairs();
                      // nvp.setAttribute("organisationid", r.getAttribute("organisationid"));
                       nvp.setAttribute("Organisationid", getorgid());
                       System.out.println("printedorgid" +getorgid());
                       nvp.setAttribute("Username",r.getAttribute("Username"));
                       nvp.setAttribute("Username1",r.getAttribute("Username"));
                       nvp.setAttribute("Firstname",r.getAttribute("Firstname"));
                       nvp.setAttribute("Surname",r.getAttribute("Surname"));
                       nvp.setAttribute("Emailaddress",r.getAttribute("Emailaddress")); 
                       // username = (String)r.getAttribute("Username");
                       System.out.println("prininstead " + nvp);
                     //  targetVO.createAndInitRow(nvp);
                        r = targetVO.createAndInitRow(nvp);
                        targetVO.insertRow(r);
                        //createAndInitRow(AttributeList nvp);
            //Row row = targetVO.createAndInitRow(nvp);
              //      targetVO.insertRow(row);
                   rs1.closeRowSetIterator();
                   targetVO.getApplicationModule().getTransaction().commit();
        }i have re-created the problem i upload in this hostfile,you can have the whole picture of what am trying to do
    http://www.4shared.com/zip/RaZ07PWS/createRow.html
    Edited by: adf009 on 2013/02/15 7:36 PM
    Edited by: adf009 on 2013/02/15 7:38 PM
    Edited by: adf009 on 2013/02/15 8:01 PM

  • Database got halted while inserting rows

    I have a 9i database running on solaris not restarted for 15 days.It just got halted or hanged while inserting rows in a table.When restarted everything is just fine and those rows have been inserted in no time!!What might be the reason?Dont tell me 'lock' because I have already checked for ora:60 error in alertlog.Would you please give some direction to drill it down .

    Did you met the problem , only when you inserting the rows ? Or is there something else which leads this situation ? most of the occasion when
    you found your database halt is because of your archivelogs . I would
    still like to know if you running your db in archivelog mode ? It also be the
    case that you set archive_log_start = true in the pfile and diden't fire
    alter database archivelog at the sql prompt .
    Hare Krishna
    Alok

  • I am trying to insert rows for alert_id 22 with diff abc_id and xyz_id

    I am trying to insert rows for alert_id 22 with diff abc_id and xyz_id
    these inserts will store in two tables that I have to join in the cursor.
    I have written cursor without passing cursor parameters. but here i need to pass acb_id and xyz_id along with alert_id.
    then if these are saticified with alert_id 22 then I want to stop the loop run, else i need to continue the loop. bcause the abc_id and xyz_id are diff for alert_id 22
    This is the issue I am facing!
    Please let me know if you have any idea. Let me know how to use cursor parameters here and in loop.
    Sample proc like this::
    Declare
    main_cursor
    another_cur
    alert_cur
    begin
    need to check first abc_id,xyz_id is already exist with alert_id 22
    if this set of records already exists then
    exit from the loop
    else
    continue with
    loop
    here coming the insert statements with different condition getting from first two cursors.(this part is ok for me)
    end loop
    end if
    Please write the logic if any idea on this.
    -LRK

    I want to stop if already alert_id is exist!

  • How to Display a message after inserting row in table............

    Hi
    I want to display a message after inserting rows in table like *'you have inserted a new row successfully*'.
    i am using the createinsert ADF Button to insert the rows in table.after that i am comitting it.
    after commiting i want to display message for the user.for this what i need to do.
    Please help me.
    Sailaja.

    user10860137
    Can you please explain me the each line in the code briefly.
    +public String saveButton_action(){+
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    +// note "!" operator has been removed from the default code.+
    +if(operationBinding.getErrors().isEmpty()){+
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
    ctx.addMessage(null,saveMsg);
    +}+
    return null;
    +}+
    And i have requirement to show the message on favcet "status bar".not in a popup window.(from the above code the message is showing in popup window. )the Layout i am using is PanelCollection.
    can you tell me what i need to do.
    Thanks
    Sailaja.
    Edited by: sj0609 on Mar 19, 2009 8:03 AM

  • Insert rows from l_qte_rec in to tmp table

    xxx_pre_update_userbook(p_service_request_id number, p_sr_type_id number, p_status_id number,
                             p_resolution_code varchar2, p_bill_to_customer_id number,
                        p_bill_to_cust_account_id number, p_bill_to_customer_site_id number,
                        p_contract_id number, p_contract_line_id number,
                        p_resolution_summary varchar2,
                             x_status out varchar2, x_mesg out varchar2) as
              l_proj_incident_type_id number;
              l_isr_incident_type_id number;
              l_tac_incident_type_id number;
              l_status varchar2(10) := 'S';
              l_sr_closing_flag number;
              l_mesg varchar2(3000) := null;
              err_mesg varchar2(3000) := null;
              L_SO_ID NUMBER;
              L_LINK_REC CS_INCIDENTLINKS_PUB.CS_INCIDENT_LINK_REC_TYPE;
              L_OBJECT_VERSION_NUMBER NUMBER;
              L_RECIPROCAL_LINK_ID NUMBER;
              L_LINK_ID NUMBER;
         l_QTE_REC ASO_QUOTE_PUB.qte_header_rec_type;          
         l_control_REC ASO_ORDER_INT.control_rec_type;          
              l_Order_Header_Rec ASO_ORDER_INT.Order_Header_Rec_Type;
              l_Order_Line_Tbl ASO_ORDER_INT.Order_Line_Tbl_type;
              l_Return_Status VARCHAR2(30);
              l_Msg_Count NUMBER;
              l_Msg_Data VARCHAR2(3000);
              l_Msg_INDEX_OUT NUMBER;
              l_OUT_MESSAGE VARCHAR2(3000);
              l_proj_flag number;
              l_quote_status_id number;
              l_orders_created number;
              l_chargeable_sr_flag number;
              l_sr_close_flag number;
              l_invalid_outage_info number;
         begin
              l_status := 'S';
              l_mesg := null;
              -- MO_GLOBAL.INIT('CS');
              -- Get the Project Service Request Id
              select incident_type_id into l_proj_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC Project'
    --           and language = 'US'
              and rownum < 2;
              -- Get the ISR Service Request Id
              select incident_type_id into l_isr_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC ISR'
    --           and language = 'US'
              and rownum < 2;
              -- Get the TNT TAC Service Request Id
              select incident_type_id into l_tac_incident_type_id
              from cs_incident_types_tl
              where name like 'XXX TAC Service Request'
              and rownum < 2;
    --           and language = 'US';
              select nvl((select 1
              from dual
              where exists( select incident_status_id
                        from cs_incident_statuses_b
                        where incident_status_id = p_status_id
                        and close_flag is not null
                        and close_flag = 'Y')
    and ( p_resolution_code is null
    or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
         and p_sr_type_id in ( l_isr_incident_type_id )),0) into l_chargeable_sr_flag
         from dual;
              select nvl((select 1
              from dual
              where exists( select incident_status_id
                        from cs_incident_statuses_b
                        where incident_status_id = p_status_id
                        and close_flag is not null
                        and close_flag = 'Y')
    and ( p_resolution_code is null
    or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
         ),0) into l_sr_closing_flag
         from dual;
         if ( l_sr_closing_flag = 1 and ((p_resolution_summary is null) or (p_resolution_summary = FND_API.G_MISS_CHAR)) ) then
                        x_status := 'F';
                        --x_mesg := 'Resolution Summary can not be empty while closing Service request';
                        fnd_message.set_name ('XXXXX', 'MISSING_RESOLUTION_SUMMARY');     
                        -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                        fnd_msg_pub.ADD;     
         end if;
              -- Check whether outage information is complete at the time of closure.
         if ( l_sr_closing_flag = 1 ) then
              l_invalid_outage_info := 0;
         select nvl((select 1
    from dual
    where exists ( select 1
                                  from cs_incidents_ext cie, ego_fnd_dsc_flx_ctx_ext grp1
                                  where incident_id = p_service_request_id
                                  and grp1.application_id = 170
                                            and grp1.descriptive_flexfield_name like 'XX_SR_CONTEXT'
                                            and grp1.descriptive_flex_context_code like 'XXXXXOutageTab'
                                            and cie.attr_group_id = grp1.attr_group_id
                                            and ( c_ext_attr1 is null or c_ext_attr2 is null or c_ext_attr3 is null or
                                                 c_ext_attr4 is null or c_ext_attr5 is null or c_ext_attr6 is null or
                                                 c_ext_attr7 is null or n_ext_attr1 is null or n_ext_attr2 is null or
                                                 n_ext_attr3 is null or n_ext_attr4 is null or n_ext_attr5 is null or
                                                 d_ext_attr1 is null or d_ext_attr2 is null or d_ext_attr3 is null)
                             -- if all of them are null then we should ignore
                                            and NOT ( c_ext_attr1 is null and c_ext_attr2 is null and c_ext_attr3 is null and
                                                 c_ext_attr4 is null and c_ext_attr5 is null and c_ext_attr6 is null and
                                                 c_ext_attr7 is null and n_ext_attr1 is null and n_ext_attr2 is null and
                                                 n_ext_attr3 is null and n_ext_attr4 is null and n_ext_attr5 is null and
                                                 d_ext_attr1 is null and d_ext_attr2 is null and d_ext_attr3 is null))), 0) into l_invalid_outage_info
    from dual;
                        if ( l_invalid_outage_info = 1 )     then
                             x_status := 'F';
                             fnd_message.set_name ('XXXXX', 'MISSING_OUTAGE_INFORMATION');     
                             fnd_msg_pub.ADD;     
                        end if;
         end if;
              if ( (p_sr_type_id in ( l_isr_incident_type_id )) and (l_chargeable_sr_flag = 1) ) then
                   if ( ( p_bill_to_customer_id is null or     p_bill_to_cust_account_id is null or
                   p_bill_to_customer_site_id is null )) then
                        x_status := 'F';
                        --x_mesg := 'Bill to customer name/account/site is empty';
                        fnd_message.set_name ('XXXXX', 'ISR_INVALID_BILL_TO');     
                        -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                        fnd_msg_pub.ADD;
                   else
                        select count(*) into l_orders_created
                        from cs_incident_links
                        where subject_id = p_service_request_id
                        and subject_type = 'SR'
                        and object_type = 'ORDERS';
                        /* If orders are not created for this SR then create the order */
                        if ( l_orders_created = 0 ) then
                        /* Create Order */
                        err_mesg := 'Got the Incident Types and Incidents Status flag';
                        select nvl((select quote_status_id
                        from aso_quote_statuses_tl
                        where language = 'US'
                        and upper(meaning) = 'ENTERED'), 0) into l_quote_Status_id
                        from dual;
                        err_mesg := 'Got the Quote Status Id';
                        l_qte_rec.party_id := p_bill_to_customer_id;
    *                    l_qte_rec.party_id := p_bill_to_customer_id;
    *                    l_qte_rec.cust_party_id := p_bill_to_customer_id;
    *                    l_qte_rec.cust_account_id := p_bill_to_cust_account_id;
    *                    l_qte_rec.INVOICE_TO_CUST_PARTY_ID  := p_bill_to_customer_id;
    *                    l_qte_rec.INVOICE_TO_CUST_ACCOUNT_ID  := p_bill_to_cust_account_id;
    *                    l_qte_rec.INVOICE_TO_PARTY_SITE_ID  := p_bill_to_customer_site_id;
    *                    l_qte_rec.INVOICE_TO_PARTY_ID := p_bill_to_customer_id;
    *                    l_qte_rec.quote_status_id := l_quote_status_id;
    *                    l_qte_rec.quote_status_code := 'ENTERED';
    *                    l_qte_rec.quote_status := 'ENTERED';
    *                    l_control_rec.book_flag := 'N';
    *                    err_mesg := 'set the Quote Header';*
    *                    select nvl((select transaction_type_id*
    *                    from oe_transaction_types_v*
    *                    where name like 'Service Order'), 0 ) into l_qte_rec.order_type_id*
    *                    from dual;*
    *                    err_mesg := 'Got Order Type';*
    *                    l_qte_rec.currency_code := 'USD';
    how to insert rows in tmp table from rec_type which is in bold text .... i want to insert after the last statement .this is for debugging after executing the procedure

    No version number and lots of other missing information.
    That said look at the example here:
    http://www.morganslibrary.org/reference/insert.html
    under "RECORD INSERT."

  • Error while inserting rows in a table

    Hi,
    We have recently migrated from 9i to 10g. We have a scheduled job out our DB which first deletes all the rows from a table and then inserts them back by selecting rows from 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when i try to insert rows into the table after deleting all the rows from it, I am able to insert the data successfully . However, in 10g, when i try doing the same operation, it fails with the ORA error:
    ORA-00001: unique constraint violated
    The same query which works perfectly in 9i fails in 10g
    If anybody has some ideas on how to resolve the same, kindly let me know.
    Thanks in advance.

    Hi,
    I was finally able to resolve the reason behind that error message and found it even more weird. The error was because I was using the substr function for extracting the characters 1-4 from a column which is 5 characters long. When i specify the query as:
    select substr(column1, 1, 4)) from table1;
    only the characters 1-3 are retrieved. Now if i change the query to select substr(column1, 1, 5)) from table1, in that case also only 3 characters are retrieved although i have specified the substr to start from 1 and read till 5 characters. Also, when i run the query:
    select length(substr(column1, 1, 4)) from table1 or select length(substr(column1, 1, 5)) from table1
    I get the answer as 3.
    However, the most amazing part is that the query is working perfectly in 9i and is retrieving the data correctly i.e. from substr 1-4.
    Can anyone suggest what the problem could be?
    Thanks
    Edited by: CrazyAnie on May 13, 2009 1:34 AM

  • Need to insert rows into 100 tables at a time

    hi there,
    below is our script for creation of 100 tables...
    we need a plsql script, to insert rows into 100 tables at a single time...
    please help us...vey urgent...
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2(2000);
    BEGIN FOR counter IN 1..100 LOOP sql_string := 'CREATE TABLE emp_table'||counter||'
    (id integer primary key, col_a VARCHAR2(42),col_b date,col_c number,col_d varchar2(20),col_e varchar2(20),
    col_f varchar2(20),col_g varchar2(20),col_h date,col_i varchar2(20),col_j varchar2(20),col_k date)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END;
    /

    hi,
    below is our procedure and the error we are getting...
    Name Null? Type
    ID VARCHAR2(10)
    COL_A VARCHAR2(10)
    COL_B VARCHAR2(10)
    COL_C VARCHAR2(10)
    COL_D VARCHAR2(10)
    COL_E VARCHAR2(10)
    COL_F VARCHAR2(10)
    COL_G VARCHAR2(10)
    COL_H VARCHAR2(10)
    COL_J DATE
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2(4000);
    BEGIN FOR counter IN 1..100 LOOP sql_string := 'CREATE TABLE emp_a'||counter||'
    (id varchar2(10), col_a varchar2(10), col_b varchar2(10), col_c varchar2(10), col_d varchar2(10), col_e varchar2(10),
    col_f varchar2(10), col_g varchar2(10), col_h varchar2(10), col_j date)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END;
    DECLARE
    counter NUMBER;
    sql_string VARCHAR2 (2000);
    BEGIN
    FOR OuterCounter IN 1 .. 100 LOOP --- table prefix in which it is to be inserted
    FOR InnerCounter IN 1 .. 100 LOOP --- records to be inserted
    sql_string := 'INSERT INTO emp_a' || Outercounter || ' (id, col_a, col_b, col_c, col_d, col_e, col_f, col_g, col_h, col_j)
    VALUES ('
    || InnerCounter || ', to_char( ''col_a''' || innercounter || '),'
    || InnerCounter || ', to_char( ''col_d''' || innercounter || '),'
    || ', to_char( ''col_e''' || innercounter || '),'
    || ', to_char( ''col_f''' || innercounter || '),'
    || ', to_char( ''col_g''' || innercounter || '),'
    || ', to_char( ''col_h''' || innercounter || '),'
    || ', to_char( ''col_j''' || innercounter || '), SYSDATE)';
    EXECUTE IMMEDIATE sql_string;
    END LOOP;
    END LOOP;
    END;
    DECLARE
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    ORA-06512: at line 17
    please check the procedure and write the correct one...

  • Insert row and delete row in a table control

    Hi Experts,
    I am using a table control in module pool programming, How can I Insert row and delete row in a table control?
    Thanks in Advance....

    Santhosh,
    Iam using this code..
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    -BEGIN OF LOCAL DATA----
      DATA l_table_name       LIKE feld-name.
    data: p_mark_name type c.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    -END OF LOCAL DATA----
      ASSIGN (p_tc_name) TO <tc>.
    get the table, which belongs to the tc                               *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    delete marked lines                                                  *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
      access to the component 'FLAG' of the table header                 *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
        PERFORM f_save_confirmation_9101.
        IF gv_answer EQ '1'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
          ELSE.
          ENDIF.
        ENDIF.
      ENDLOOP.
    in this code   ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
    this code is not working...

  • Runtime error when inserting rows in hrp1018 and hrt1018 tables

    Hi All,
    I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
    *****************************************code***************************************************************
    << Please post only the relevant portion of the code >>
    The runtime error which is coming is as follows:
    Error analysis
        An internal error in the database interface occurred during access to
        the data of table "HRT1018 ".
        The situation points to an internal error in the SAP software
        or to an incorrect status of the respective work process.
        For further analysis the SAP system log should be examined
        (transaction SM21).
        For a precise analysis of the error, you should supply
        documents with as many details as possible.
    Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
    Thanks in advance,
    BBKrishna.
    Edited by: Rob Burbank on Jun 9, 2009 1:31 PM

    I am adding the code once again.Please let me know why the error is coming up.
    lv_mproj = 'BLDNG'.
      wa_p1018-mandt = sy-mandt.
      wa_p1018-otype = '9M'.
      wa_p1018-objid = '50009650'.
      wa_p1018-begda = '20090608'.
      wa_p1018-endda = '99991231'.
      wa_p1018-infty = '1018'.
      wa_p1018-plvar = '01'.
      wa_p1018-otype = '9M'.
      wa_p1018-istat = '1'.
      append wa_p1018 to it_p1018.
      repid = sy-repid.
    *Updating hrp1018 and hrt1018 tables
      CALL FUNCTION 'RH_INSERT_INFTY'
        EXPORTING
        FCODE                     = 'INSE'
        VTASK                     = 'D'
         AUTHY                    = ' '
          REPID                   =  repid
          FORM                    = 'FILL_TABS'
        TABLES
          INNNN                   = it_p1018
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            TYPE                             = SY-MSGTY
            CL                               = sy-msgid
            NUMBER                           = SY-MSGNO
      PAR1                             = ' '
      PAR2                             = ' '
      PAR3                             = ' '
      PAR4                             = ' '
      LOG_NO                           = ' '
      LOG_MSG_NO                       = ' '
         IMPORTING
           BAPIRETURN                        = return_rec
    EXCEPTIONS
      ONLY_2_CHAR_FOR_MESSAGE_ID       = 1
      OTHERS                           = 2
        IF SY-SUBRC <> 0.
            lv_mproj = text-011
                      ELSE.
                      ii_return = return_rec.
                      CONCATENATE                  ii_return-type '-' ii_return-message
                      INTO lv_err_msg SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
    *RHCD_TAB-PROZT
       FORM fill_tabs TABLES ins_tab
                   USING ins_set ins_index.
      DATA : BEGIN OF set.
              INCLUDE STRUCTURE wplog.
      DATA : END   OF set.
      DATA: BEGIN OF h_pt1018.             "to initialize INS_TAB
              INCLUDE STRUCTURE pt1018.
      DATA: END OF h_pt1018.
      REFRESH ins_tab.
      set = ins_set.
      CASE set-infty.
        WHEN '1018'.
          h_pt1018-posnr = lv_mproj.
          h_pt1018-prozt = '100.00'.
          IF NOT ( h_pt1018 IS INITIAL ).
            CLEAR ins_tab.
            ins_tab+36(8) = lv_mproj. "h_pt1018.
            ins_tab+134(5) = '100.00'.
            APPEND ins_tab.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Inserting rows in ALV

    Hi Experts,
           Which part of the program in BCALV_EDIT04 is responsible for inserting a row in the grid? there is code to handle the data in the inserted line, to check the cells modified using the protocol, and event handler too. Can you please explain which fm or subroutine or step adds a new row to the grid when teh insert button in tool bar is pressed.
    I also want some guidance reg the event handler thing. Is mouse click on the cell makes the methods of the protocol to be called? ( I am a java student.. learning SAP slowly.. can you please help me?)

    methods:
          get_inserted_rows
               exporting
                  inserted_rows type sflight_keys.
    This part of the code is responsible for inserting rows in a grid. We call this method to insert records in the Grid.
    There is no such function module implemented here. We implement the above functionality using <b>Classes and Methods</b>.
    Just go to transaction SE24. You'll have a list of Classes in that transaction. Also, we can implement methods using those classes.
    Regards,
    Pavan.

  • Inserting rows in table while logging errors...Urgent

    Hi all,
    i want to insert rows from temp table to main table.
    if temp table contains 100 rows.then all rows must be inserted
    in main table.if their is any exception while insertion,
    insertion must nt stop and erroring rows along with error no must be inserted in
    error log table.
    How to do this ?
    i used forall save exceptions to achieve this .
    but ws able to save only error no. but not errroing rows in error log table.
    is there any efficient way to achieve this?
    can forall be modified in way that it inserts erroring rows also?????

    Hi,
    1.) does dbms_errorlog works fine in this case?If all of your 807 tables having same columns then i think it will work (NOT TESTED).
    By the way are you also trying to insert rows for all tese 807 tables in a single PL/SQL block?
    Please post how you are trying to insert then we can think about it,
    Oracle ERROR_LOG table allows us to have any number of columns.
    From the Oracle Docs:
    The number of columns in this part of the error logging table can be zero, one, or more, up to the number of columns in the DML table. If a column exists in the error logging table that has the same name as a column in the DML table, the corresponding data from the offending row being inserted is written to this error logging table column. If a DML table column does not have a corresponding column in the error logging table, the column is not logged. If the error logging table contains a column with a name that does not match a DML table column, the column is ignored.
    Regards

  • Inserting rows in table in web template

    How do I insert rows in an already existing table in a web template?
    Thanks,
    Sanjeev

    Hi Gillian,
    By table I meant the layout table, within which you can have multiple queries, the result of each displayed in the manner in which the Web Items are arranged within this table. I think you thought I meant a table Web Item.
    I have a 3x3 table (which I obtained by clicking Insert -> Table -> Insert Table in the menu bar) within which I have 7 Web Items of 'Chart' type. I want to add a few more Web Items to this table, so I want to add rows to it.
    Thanks,
    Sanjeev

Maybe you are looking for

  • Questions on MIDP Security

    Hi all, I've a few questions on MIDP security to seek help: 1) Suppose I have a midlet to store confidential details on the mobile phone, if it doesn't make any connections to the internet, would anyone be able to retrieve the information I'd on the

  • Integration Process never starts

    Hi everybody, in my scenario, I'm getting an IDOC an I'm sending it to two Services (two receiving services in receiver determination): a) a BS with a mail communication channel b) to an integration process. In first case a), the file is sent via mai

  • How do I play embedded mp3 files?

    Hello, Is Adobe Reader for iPad capable of opening my embedded mp3 files? If not, then how can I  get the audio to play inside the document?  The original document was created in Publisher 2012...converted to pdf where I embedded the mp3. Thank you f

  • Can't update to 8.3 from beta 2

    I have a developer account, and installed iOS 8.3 beta 2 when it's been announced. I'm not sure actually if i installed it with my developer Apple ID or with my personal one. But now i'm not able to update my iOS to 8.3. There is no update available

  • HT1277 Somehow entries in my address book are doubling.  Any ideas?

    Somehow entries in my address book are doubling.  Any ideas?