Trigger to add multiple rows

Hi
I have a Table with the following columns :Country,Province,City,Emp_no,Salary(table1)
I need to add all the salaries where Country,Province and City match and write this to a record in table2 with fields Country,Province,City,Total_Salaries(table2).
Any thoughts,

Sorry, I missed a little logic in the trigger. Assuming that you have previously populated table 2 with the summarized data, using something like
INSERT INTO table2
SELECT year,country,province,city,SUM(salary) total_salary
FROM table1
GROUP BY year,country,province,city;Then the following trigger should maintain the sums. Since you do not provide any information on how you are determining the year, I am assuming a year column in both tables.
CREATE TRIGGER updt2
BEFORE INSERT OR UPDATE OF table1
FOR EACH ROW
BEGIN
   IF :new.salary <> :old.salary THEN
      IF INSERTING THEN
         UPDATE table2
         SET total_salaries = total_salaries + :new.salary
         WHERE year := :new.year and
               country = :new.country and
               province = :new.province and
               city = :new.city;
         IF SQL%NOTFOUND THEN
            INSERT INTO table2 (year,country,province,city,total_salary)
            VALUES(:new.year,:new.country,:new.province,:new.city,:new.salary);
         END IF;
      ELSE
         UPDATE table2
         SET total_salaries = total_salaries + (:new.salary - :old.salary)
         WHERE year = :new.year and
               country = :new.country and
               province = :new.province and
               city = :new.city;
      END IF;
   END IF;
END;This should update table2 with the entire new salary if you are inserting a record, or the difference between the new and old salaries if you are updating a record. If there is a chance that the salary field could be null, you will need to account for that by using NVL function on all occurences.
John

Similar Messages

  • How do I add multiple rows in Numbers for iPad?

    how do I add multiple rows in Numbers for iPad?

    Hi James,
    On the iPod I can only insert what is on the clipboard but I can insert however many rows I have there. Is it working differently for you? Benjoon seemed to think that he could not do this in Numbers. He was ruling Numbers out because of it. He doesn't need to do that because of this issue.
    If I was needing to insert multiple blank rows often I might keep a table of blank rows or just some blank rows at the end of the working table that I could copy/paste. This is no different than Numbers on the Mac.
    quinn

  • Help :add multiple rows from Resultset to ArrayList ?

    My query returns one column and multiple rows. In Java code , I am trying to get this data in array or arraylist through ResultSet
    ex:
    item_num
    p001
    p002
    p003
    when I print, it only gets the item in the first row.
    ArrayList myArrayList = new ArrayList();
    resultset = preparedstatement.executeQuery();
    if (resultset.next())
    myArrayList.add(new String(resultset.getString("item_num")));
    Print:
    for (int j = 0 ; j < myArrayList.size() ; j++ )
    System.out.println((String)myArrayList.get(j)); --this prints only the first item.
    can someone assist ?

    changing if to while fixed it.

  • Add multiple rows with add a row button

    Not sure of how to add this to my script, but my dilemma is I would like to add the row above in addition to the current row.
    Right now the script in the "add row" button is:
    Table1._Week.addInstance(0);
    the row above is Table1._Above
    How do I go about adding the row above to the script?
    Thanks

    You can access the instance manager of any Row from anywhere in the form..
    So you can write script by being in the Week Row to add a new row for Above row.
    In your click event you can write like this..
    Table1._Above.addInstance(0);
    Thanks
    Srini

  • Add multiple rows?  Resize table?

    Sorry if this question is totally dumb, but I can't figure it out. I tried searching the discussions.
    Basically, I just want to add some number of rows to the end of my table. Is there some way I can add say, 1000 rows without dragging the tab at the bottom of the table down for a few minutes? Seems ridiculous. Is there some place where I can just type in the number of rows and columns I want in a table?
    Thanks.

    I don't think there is a way. I looked it up for excel, because sometimes that will give me a clue where to look in Numbers when I cannot find something. The only way I have seen for doing it in excel is with a VBA macro that asks for the number of rows.
    Since we don't have scripting (yet, cross your fingers), I don't see an answer at this point.
    Please submit feedback to Apple using the Feedback option under the Numbers menu, suggest both apple scripting and the function your looking for.
    Jason

  • Add multiple rows in detail form in master detail form

    Hi,
    I have a master detail form to enter survey responses. The master form captures the participant information and the detail form will carry the survey responses. After entering the master record, I need the detail rows to be populated with the survey questions stored in another table. The respondent will then update the response for each row in the detail form. Only after all the responses are filled out, clicking the save button should the detail records be committed.
    Is there a good way to achieve this.
    Thanks in advance
    Gopal

    Sorry, did not check OTN until this afternoon. Busy checking existing Apex pages on my project :)
    Our region to populate the tabular form has the tabular form fields defined as Display As Text (saves state). Non-enterable fields are defined as "Display as Text (saves state)". A tabular form results from these definitions.
    Because Apex won't generate code to handle multipe row tabluar form inserts we wrote our own as an After Submit PL/SQL process, something like
    DECLARE
      v_rows_found_n number;
    BEGIN
      --code for debugging
      raise_application_error(-20000,'Hello World: '||
        apex_application.g_f03(12)||':'||
        apex_application.g_f04(12)||':'||
        apex_application.g_f05(12)||':'||
      for i in 1..apex_application.g_f01.count loop
        BEGIN
          --attempt update first
          update whatever
             set field4 = apex_application.g_f05(i)
           where field1 = apex_application.g_f03(i)
             and field2 = apex_application.g_f04(i)
             and field3 = apex_application.g_f02(i);
          v_rows_found_n := SQL%rowcount;
        --if no rows were updated perform an insert
        if (v_rows_found_n = 0) then
           insert into oe_metric_values(
             field1,         --1
             field2,         --2
             field3,         --3
             field4          --4
          values(
            apex_application.g_f02(i), --1: field1
            apex_application.g_f03(i), --3: field2
            apex_application.g_f04(i), --2: field3
            apex_application.g_f05(i)  --4: field4
        end if; --did update operate on any rows?
      --exception
      --  when others then
      --    raise_application_error(-20000,'i'||':'||
      --      apex_application.g_f03(i)||':'||
      --      apex_application.g_f04(i)||':'||
      --      apex_application.g_f05(i)||':'||
        END; --internal loop block
      end loop; --loop through tabular form submit elements
    end; --pl/sql blockI had to get the identities of the f01, f02 etc. identifiers by looking at the HTML code in the rendered form because Apex assigns those values as it will. Anytime the column display changes in any way i have to go through and make sure the identifers have not changed.
    Hope this helps.

  • Multiple row insert "How To".

    I need a "How To" to add multiple rows to a table based on various input values.
    On my page I have the following:
    In the report section:
    select htmldb_item.hidden(1,null) circuit_id,
    htmldb_item.text(2,null) datacomm_id,
    htmldb_item.text(3,null) lan_equip_id,
    htmldb_item.text(4,null) circuit,
    htmldb_item.text(6,null) segment,
    htmldb_item.text(7,null) subnet,
    htmldb_item.text(8,null) lan_equip_model_id,
    htmldb_item.text(12,null) jack,
    htmldb_item.text(13,null) jpairs,
    htmldb_item.text(14,null) risers,
    htmldb_item.text(15,null) building,
    htmldb_item.text(16,null) uplink_lan_equip,
    htmldb_item.text(17,null) uplink_group,
    htmldb_item.text(21,null) comments,
    htmldb_item.text(22,null) vlan
    from neteng_circuits
    In the page processing processes section:
    -- insert circuits
    for i in 1..htmldb_application.g_f01.count
    loop
    insert into neteng_circuits
    (datacomm_id,
    lan_equip_id,
    circuit,
    topology,
    segment,
    subnet,
    lan_equip_model_id,
    lan_equip_ip,
    group1,
    port,
    jack,
    jpairs,
    risers,
    building,
    uplink_lan_equip,
    uplink_group,
    uplink_port,
    initials,
    date_modified,
    comments,
    vlan)
    values
    (htmldb_application.g_f02(i),
    htmldb_application.g_f03(i),
    htmldb_application.g_f04(i),
    :P41_TOPOLOGY,
    htmldb_application.g_f06(i),
    htmldb_application.g_f07(i),
    htmldb_application.g_f08(i),
    :P41_LAN_EQUIP_IP,
    :P41_GROUP1,
    :P41_PORT,
    htmldb_application.g_f12(i),
    htmldb_application.g_f13(i),
    htmldb_application.g_f14(i),
    htmldb_application.g_f15(i),
    htmldb_application.g_f16(i),
    htmldb_application.g_f17(i),
    :P41_UPLINK_PORT,
    :P41_INITIALS,
    :P41_DATE_MODIFIED,
    htmldb_application.g_f21(i),
    htmldb_application.g_f22(i));
    end loop;
    In the items section (with appropriate setup):
    5: P41_TOPOLOGY Select List
    9: P41_LAN_EQUIP_IP Text Field
    10: P41_GROUP1 Text Field
    11: P41_PORT Text Field
    18: P41_UPLINK_PORT Text Field
    19: P41_INITIALS Select List
    20: P41_DATE_MODIFIED Date Picker (DD-MON-RR)
    Ultimately the only fields which differ for the 48 new circuits
    which I wish to insert are:
    circuit_id (based on a trigger), jack, jpair (based on a select list),
    and port (values are 1-48, could be 1-16 under some circumstances).
    The uplink fields depend on the uplink_port value and there are similar
    relationships for other fields - I need to get them using select statements
    dynamically behind the scenes.
    Please help me to create this scenario.
    Thank you for all your help. Trudy.

    Does she want to insert 48 rows from the multi-row add delete check box report? If I understand that part correctly, then she needs to create an add button that adds another empty row into the table. Then she needs to populate the row with data; she would have to do this 48 times. From a form or a report I doubt that there is any other way to do it. When you do the update, the database gets updated by your sql insert statement that is in the update process you create. The update gets an event notification by an update button that you have created by clicking the Create a button displayed among the region's items when you created the button. The view also gets rendered with the same sql code. Refer to the example in the links that I gave you;
    your other question seems to revolve around sql.
    add the condition where x > =1 and y <= 48 into your sql conditions with an
    if condition. there are plenty of references for sql through a search on google;
    Let me know how things go.
    I have gotten my update to work with the workaround. The delete works with the following code:
    for i in 1..htmldb_application.g_f01.count
    loop
    delete from patient_info where primary_key_Column = htmldb_application.g_f02(htmldb_application.g_f01(i));
    end loop;
    I also have the sample add and insert(update) working. but I need to get the add the row dynamically to work in my real world data.
    Veena

  • Add new rows when query not input-ready

    In the Web Application Designer, is it possible to detect whether a query is in display or change mode, and depending on the outcome to set an Analysis Item parameter ?  This would provide a solution to the following:
    Background: I have a Web template used for sales quantity planning which contains two Analysis Items, each with their own input-ready query: ANALYSIS_ITEM_EXISTING allows users to enter plan values based on existing characteristic combinations, ANALYSIS_ITEM_NEW_ROWS allows users to enter new characteristic combinations and their plan values (using the 'Number of New Lines' parameter). These two separate Analysis Items are needed so that I can restrict the characteristic values differently for each. ANALYSIS_ITEM_NEW_ROWS shows only new rows, since I have set both parameters 'Number of New Lines' and 'Data Row to' to 5.
    Problem: If the query underlying ANALYSIS_ITEM_NEW_ROWS is not able to go into change mode (such as when there is an active data slice, or a locking conflict), then instead of seeing 5 empty rows the user sees existing data from the underlying query. This looks bad and is confusing for the user.
    Can anyone think of a solution?

    Hi Jacky,
    The Bex analyzer works in the same way as in the web. You've restrict all charateristics which are not in your rows or columns to a single value. Then you can see that in excel the last blank row has a  black border. If this is the case you can add a new row.
    By pressing F4 in an empty cell you can select values or if you've know the key you can type it directly. Also you can add multiple rows at once. IP collects all rows below the query.
    If this not works, just put all chars from your aggr. level in the rows and check if this works. And then for each change to the restriction/layout run the query and look if you can still add new rows.
    Hope it helps.
    Regards,
    J.

  • Multiple row insert not working as before after applying hotfix apsb13-13

    Coldfusion 9.01
    Windows Server 2003
    Microsoft Access database (yeah, we know)
    Before the hotfix was applied, we could add multiple rows (anywhere from 1-100 or more) and now we're limited to 15 rows at a time after applying the hotfix. We've narrowed it down to the hotfix being the culprit as we had to rebuild the server not to long after this hotfix was applied (~ 1 month) and the multiple row inserts were once again working fine until we got to the point of applying this hot fix again.
    Anyone heard of this happening? Any ideas how to correct?
    Thanks in advance,
    fmHelp
    Below is code  of how we're doing the multiple row insert (it's performed over 3 pages):
    Page 1
    <cfform name="form1" method="post" action="handler.cfm?page=update_2">
    <input type="hidden" name="sProductID" value="<cfoutput>#qProducts.sProductID#</cfoutput>">
    <table width="100%" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <th scope="row" colspan="2" align="center">Update an Inventory Product</th>
      </tr>
      <tr>
        <th width="42%" scope="row">Product ID</th>
        <td width="58%"><cfoutput>#qProducts.sProductID#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Friendly Name</th>
        <td width="58%"><cfoutput>#qProducts.sFriendly_Name#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Description</th>
        <td width="58%"><cfoutput>#qProducts.sDescription#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Vendor</th>
        <td><select name="sVendor">
          <cfoutput><option value="#qProducts.sVendor#">#qProducts.sVendor#</option></cfoutput>
          <option value=""></option>
          <cfoutput query="qVendor">
            <option value="#sVendor#">#sVendor#</option>
          </cfoutput>
        </select></td>
      </tr>
      <tr>
        <th scope="row">Order No.</th>
        <td><cfinput name="sOrder_No" type="text" value="" required="yes" message="Order number is a required field."></td>
      </tr>
      <tr>
        <th scope="row">Lot No.</th>
        <td><input name="sLot" type="text" value=""/></td>
      </tr>
      <tr>
        <th scope="row">Date Expires</th>
        <td><input name="dtExpire" type="text" value=""/></td>
      </tr>
      <tr>
        <th scope="row">Boxes received</th>
        <td><input name="iBoxes" type="text" value="" /></td>
      </tr>
      <tr>
        <th scope="row">Doses/Units</th>
        <td><input name="pcount" type="text" value="" /></td>
      </tr>
      <tr>
        <th scope="row">Note</th>
        <td><cfoutput>#qProducts.sNote#</cfoutput></td>
      </tr>
      <tr>
        <th scope="row"> </th>
        <td> </td>
      </tr>
      <tr>
        <th scope="row" colspan="2" align="center"><input type="submit" value="Submit" /></th>
      </tr>
    </table>
    </cfform>
    </table>
    Page 2
    <form name="form1" method="post" action="handler.cfm?page=update_3">
    <cfoutput><input type="hidden" name="pcount" value="#FORM.pcount#"></cfoutput>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
              <td colspan="6" align="left">Record count (Doses/Units)= <cfoutput>#FORM.pcount#</cfoutput></td>
        </tr>
        <tr>
            <td>Product ID</td>
            <td>Vendor</td>
            <td>Order No.</td>
            <td>Lot No.</td>
            <td>Expiration Date</td>
            <td>Num. of Boxes</td>
        </tr>
        <cfset Peoplecount = 0>
        <cfloop index="Add" from="1" to="#form.pcount#" step="1">
            <tr>
                <cfset Peoplecount = PeopleCount + 1>
                <td><input  <cfoutput> value="#FORM.sProductID#" </cfoutput> name="sProductID_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sProductID_"></td>
                <td><input <cfoutput>value="#FORM.sVendor#"</cfoutput> name="sVendor_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sVendor_"></td>
                <td><input  <cfoutput> value="#FORM.sOrder_No#" </cfoutput> name="sOrder_No_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sOrder_No_"></td>
                <td><input <cfoutput>value="#FORM.sLot#"</cfoutput> name="sLot_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sLot_"></td>
                <td><input  <cfoutput> value="#DateFormat(FORM.dtExpire, 'MM/DD/YY')#" </cfoutput> name="dtExpire_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="dtExpire_"></td>
                <td><input <cfoutput>value="#FORM.iBoxes#"</cfoutput> name="iBoxes_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="iBoxes_"></td>
            </tr>
        </cfloop>
        <tr>
            <td> </td>
            <td>
                <input type="submit" name="Submit" value="Submit">
                <input name="HowMany" type="hidden" id="HowMany" value="<cfoutput>#Form.pcount#</cfoutput>">
            </td>
        </tr>
    </table>
    </form>
    </table>
    Page 3
    <cfquery name="qGetOnHand" datasource="#variables.DSNCI#">
    SELECT        *
    FROM        Products
    WHERE        sProductID = '#session.sProductID#'
    </cfquery>
    <cfquery datasource="#variables.DSNCI#">
    UPDATE        Products
    SET            iOnHandQty = (#FORM.pcount# + #qGetOnHand.iOnHandQty#)
    WHERE        sProductID = '#session.sProductID#'
    </cfquery>           
    <cfset quantity = #FORM.pcount#>
    <cfset Pcount = 0>
    <!-- Start Loop -->
    <cfloop index="Add" from="1" to="#form.howmany#" step="1">
        <cfset Pcount = Pcount + 1>
        <cfset Product = "Form.sProductID_#Pcount#">
        <cfset Product = Evaluate(Product)>
        <cfset Vendor = "Form.sVendor_#Pcount#">
        <cfset Vendor = Evaluate(Vendor)>
        <cfset Order  = "Form.sOrder_No_#Pcount#">
        <cfset Order = Evaluate(Order)>
        <cfset Lot = "Form.sLot_#Pcount#">
        <cfset Lot = Evaluate(Lot)>
        <cfset Expires = "Form.dtExpire_#Pcount#">
        <cfset Expires = Evaluate(Expires)>
        <cfset Boxes = "Form.iBoxes_#Pcount#">
        <cfset Boxes = Evaluate(Boxes)>
        <cfquery datasource="#variables.DSNCI#" name="InsertData">
            Insert into Received_History (sProductID, sVendor, sOrder_No, sLot, dtExpire, iBoxes, dtReceived)
            values ('#Product#', '#Vendor#', '#Order#', '#Lot#', <cfif Expires IS "">NULL<cfelse>#CreateOdbcDate(Expires)#</cfif>, #Boxes#, #CreateOdbcDate(Now())#)
        </cfquery>
    </cfloop>

    Rasi wrote:show your complete default.pa (also make sure that you dont override pulse settings in ~/.config/pulse) this setting should allow sound for ANY user - i just tried it and it works
    also: of course you restarted pulseaudio?
    I restarted pulseaudio and my computer.
    My default.pa is displayed in the first post.
    My files in /etc/pulse:
    > ls -la /etc/pulse
    total 28
    drwxr-xr-x 1 root root 116 May 16 10:22 .
    drwxr-xr-x 1 root root 3740 May 16 10:47 ..
    -rw-r--r-- 1 root root 1269 Mar 3 21:31 client.conf
    -rw-r--r-- 1 root root 2348 Oct 8 2013 daemon.conf
    -rw-r--r-- 1 root root 5756 May 16 10:24 default.pa
    -rw-r--r-- 1 root root 5718 Oct 8 2013 default.pa.pacnew
    -rw-r--r-- 1 root root 2112 Oct 8 2013 system.pa
    -la
    My files in ~/.config/pulse:
    > ls -la ~/.config/pulse
    total 1048
    drwx------ 1 homeuser homeuser 660 Sep 12 2013 .
    drwx------ 1 homeuser homeuser 1054 Apr 24 14:06 ..
    -rw-r--r-- 1 homeuser homeuser 40960 Oct 17 2013 1a8726d55f9140ae9d95dc512eacea67-card-database.tdb
    -rw-r--r-- 1 homeuser homeuser 43 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-sink
    -rw-r--r-- 1 homeuser homeuser 42 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-source
    -rw-r--r-- 1 homeuser homeuser 12288 May 16 10:49 1a8726d55f9140ae9d95dc512eacea67-device-volumes.tdb
    lrwxrwxrwx 1 homeuser homeuser 23 Sep 12 2013 1a8726d55f9140ae9d95dc512eacea67-runtime -> /tmp/pulse-cDmMRoO9oFBz
    -rw-r--r-- 1 homeuser homeuser 12288 May 15 22:43 1a8726d55f9140ae9d95dc512eacea67-stream-volumes.tdb
    -rw------- 1 homeuser homeuser 256 Jun 15 2013 cookie
    -rw-r--r-- 1 homeuser homeuser 331776 Jun 21 2013 equalizer-presets.tdb
    -rw-r--r-- 1 homeuser homeuser 659456 Sep 20 2013 equalizer-state.tdb
    Thanks for your efforts.

  • Multiple rows EIT using Personalization

    Any inputs or documents for add multiple rows custom EIT self service applications (iRecruitment)
    After creating custom eit for multiple rows and registering in core app, how to add the EIT
    using personalization so as to allow viewing and adding records ?
    Help appreciated.
    Thanks

    If this issue is same as this thread,then track it in one of them.
    Re: Attach EIT in iRecruitment using Personalization ?
    Thanks
    Tapash

  • Passing multiple rows to bapi

    I have a bapi which has a table structure which is acting as import parameters..
    Any sample <b>java codes</b> to add multiple rows to the table structure?
    Thank you in advance

    hi,
    see this code(sales order create). here i add multiple item to itemtable , i think it will helpful to u.
    public ClsSuper salesOrderCreate(String strSAPClient, String strSAPUser, String strSAPPwd, String strSAPLang, String strSAPHost, String strSAPSysNo, String strCustomerNo, String strSalesOrg, String strDistChan, String strDivision, String strCreateDate, String strReqData, ItemVO[] objItemVO, String strPurchNo) {
                          ClsSuper objClsSuper=new ClsSuper();
                          String DocType = "TA";
                             String xUploadFlag = "I";
                             String xDocType = "X";
                             String xSalesOrg = "X";
                             String xDisChan = "X";
                             String xDivision = "X";
                             String xPurchNo = "X";
                             String PartnerRole = "AG";
                          Bapi_Salesorder_Createfromdat2_Output output = null;
                             SalesOrderCreate_PortType mysalesorder = new SalesOrderCreate_PortType();
                             Bapi_Salesorder_Createfromdat2_Input input = null;
                             SalesOrderCommit_PortType mycommit = new SalesOrderCommit_PortType();
              try {
                                  jcoclient =
                                       JCO.createClient(
                                            strSAPClient,
                                            strSAPUser,
                                            strSAPPwd,
                                            strSAPLang,
                                            strSAPHost,
                                            strSAPSysNo);
                                  jcoclient.connect();
                             } catch (Exception e1) {
                                  objClsSuper.setStrErrorCode("J113");
                                  objClsSuper.setStrErrorMsg("Could't Connect to SAP System"+e1);
                                  return objClsSuper;
              String test="";
              try{
              Date reqdate = getDate(strReqData);
              input = new Bapi_Salesorder_Createfromdat2_Input();
              Bapisdhd1Type headerin = new Bapisdhd1Type();
              headerin.setDoc_Type(DocType);
              headerin.setSales_Org(strSalesOrg);
              headerin.setDistr_Chan(strDistChan);
              headerin.setDivision(strDivision);
              headerin.setPurch_No_C(strPurchNo);
              input.setOrder_Header_In(headerin);
              Bapisdhd1XType headerinx = new Bapisdhd1XType();
              headerinx.setUpdateflag(xUploadFlag);
              headerinx.setDoc_Type(xDocType);
              headerinx.setSales_Org(xSalesOrg);
              headerinx.setDistr_Chan(xDisChan);
              headerinx.setDivision(xDivision);
              headerinx.setPurch_No_C(xPurchNo);
              input.setOrder_Header_Inx(headerinx);
              BapisditmType_List itemsinlist = new BapisditmType_List();
              BapisditmxType_List iteminxlist = new BapisditmxType_List();
              BapischdlType_List schdllist = new BapischdlType_List();
              BapischdlxType_List schdllistx = new BapischdlxType_List();
              for (int i = 0; i < objItemVO.length; i++) {
                   String Material = objItemVO<i>.getStrItem();
                   String ReqQty1 = objItemVO<i>.getStrQty();
                   int rqqty = Integer.parseInt(ReqQty1);
                   String ReqQty = "" + (rqqty); 
                   String itemNo = objItemVO<i>.getStrItemNo();
                   BigDecimal reqqty = new BigDecimal(ReqQty.trim());
                   BapischdlType schdlin = new BapischdlType();
                   BapischdlxType schdlinx = new BapischdlxType();
                   schdlin.setReq_Date(reqdate);
                   schdlin.setReq_Qty(reqqty);
                   schdlin.setItm_Number(itemNo);
                   schdlinx.setUpdateflag("I");
                   schdlinx.setReq_Date("X");
                   schdlinx.setReq_Qty("X");
                   schdlinx.setItm_Number(itemNo);
                   schdllist.addBapischdlType(schdlin);
                   schdllistx.addBapischdlxType(schdlinx);
                   BapisditmType itemsin = new BapisditmType();
                   BapisditmxType iteminx = new BapisditmxType();
                   itemsin.setMaterial(Material);
                   itemsin.setItm_Number(itemNo);
                   itemsinlist.addBapisditmType(itemsin);
                    iteminx.setMaterial("X");
                    iteminx.setUpdateflag("I");
                   iteminx.setItm_Number(itemNo);
                   iteminxlist.addBapisditmxType(iteminx);
              input.setOrder_Items_In(itemsinlist);
              input.setOrder_Items_Inx(iteminxlist);
              input.setOrder_Schedules_In(schdllist);
              input.setOrder_Schedules_Inx(schdllistx);
              BapiparnrType partner = new BapiparnrType();
              partner.setPartn_Role(PartnerRole);
              partner.setPartn_Numb(strCustomerNo);
              BapiparnrType_List partnrlist = new BapiparnrType_List();
              partnrlist.addBapiparnrType(partner);
              input.setOrder_Partners(partnrlist);
              mysalesorder.messageSpecifier.setJcoClient(jcoclient);
              mycommit.messageSpecifier.setJcoClient(jcoclient);
              output = mysalesorder.bapi_Salesorder_Createfromdat2(input);
              String docno = output.getSalesdocument();
              Bapi_Transaction_Commit_Input commitinput =
                        new Bapi_Transaction_Commit_Input();
                   commitinput.setWait(docno);
                   Bapi_Transaction_Commit_Output outcommit =mycommit.bapi_Transaction_Commit(commitinput);               
              String error="";
              if ((docno == null) || (docno.trim().equals(""))) {
                   Bapiret2Type_List objReturn=output.get_as_listReturn();
                   test+="-------->one in if null";     
                   for(int errorCount=0;errorCount<     objReturn.size();errorCount++){
                        Bapiret2Type ret=objReturn.getBapiret2Type(errorCount);
                   error+=     ret.getMessage();
                   objClsSuper.setStrErrorCode("J126");
                   objClsSuper.setStrErrorMsg("Could't Create SalesOrder Reason By"+error);
                   return objClsSuper;
              jcoclient.disconnect();
              objClsSuper.setStrErrorCode("J000");
              objClsSuper.setStrErrorMsg("Success"+error);
              objClsSuper.setStrDocNo(docno);
              return objClsSuper;
              }catch(Exception e){
                   objClsSuper.setStrErrorCode("J110");
                             objClsSuper.setStrErrorMsg(e.toString()+test);
                             return objClsSuper;
         private Date getDate(String date) {
                   java.sql.Date sqlDate = null;
                   try {
                        StringTokenizer st = new StringTokenizer(date, ".");
                        String strdate = st.nextToken();
                        String strmonth = st.nextToken();
                        String stryear = st.nextToken();
                        int intdate = Integer.parseInt(strdate);
                        int intmonth = Integer.parseInt(strmonth);
                        int intyear = Integer.parseInt(stryear);
                        Calendar cal = Calendar.getInstance();
                        cal.set(Calendar.YEAR, intyear);
                        cal.set(Calendar.MONTH, intmonth - 1);
                        cal.set(Calendar.DATE, intdate);
                        long l = cal.getTimeInMillis();
                        sqlDate = new java.sql.Date(l);
                   } catch (Exception e) {
                        return null;
                   return sqlDate;
    regards
    Guru

  • Multiple row selection in Table

    Hi Experts,
    I have created one popup with a table inside that.
    My question is how can i add multiple rows, enter value in those rows and on clicking the
    copy button all the value in the rows will be copied into the main view.
    All the rows should be editable.

    Hi Armin,
    Thanks a lot for the reply.
    In my application when i am selecting the multiple rows which i entered earlier in the popup window, it's getting populated into main window.
    But in main window only one input field is there,so only the fiest record is getting displyed after selection.
    Rest of the records i am not able to display in the main window.And the problem is i can't add more than one input field in main window. Rest of the values will be passed into R3 through coding but it can't be displayed on screen.
    So please advice me on these two scenarios.
    1 . How to populate multiple row values(input fields in popup window with value enterd by user) into 
         main view. In main view only one input field is there.
    2 .  How to pass all the selected values from main window to R3 by webdynpro coding.
          All the values coming from popup need to be passed even though  only one value is displayed.
    Here the input field in main window is mapped to one model attrribute.
    Thanks a lot.

  • Adding a Multiple Rows Without Clearing Previous Row Details

    Dear All,
    I want to Add multiple rows at the same time in a matrix at the same time .My problem here is When i add the New rows to the matrix already added data need to remail in the matrix , I cant put Matrix.Clear or Datasource.clear.
    When   i add multiple rows previous row details is duplicated to next rows how to avoid thus
    Mohamed

    Hi,
    try this,
    If (pVal.ItemUID = "BTNUID") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
                            Dim fr As SAPbouiCOM.Form
                            Dim sel As Integer
                            Dim oMatrix1 As SAPbouiCOM.Matrix
                            fr = SBO_Application.Forms.Item(FormUID)
                            oMatrix1 = fr.Items.Item("mtx_136").Specific
                            fr.DataSources.DBDataSources.Item(2).Clear()
                            sel = oMatrix1.GetNextSelectedRow
                            oMatrix1.AddRow(1, sel)
                        End If
    "mtx_136" is your matrix ID
    and "BTNUID" is your button ID

  • Adding multiple rows to a cell?

    Is it possible to add multiple rows of text to a single cell? I am trying to create a workout log. Typicaly I would record several exercises with weights and repititions to a single days workout. Is this possible in Numbers?
    Suggestion?
    Thanks.

    Hi Dcneuro,
    I am trying to create a workout log. Typicaly I would record several exercises with weights and repititions to a single days workout.
    You can enter multiple lines of text in a cell... But I'm wondering why you would want to do that. A log would be more useful if you structure it like this, one exercise to a row and repeat the date where appropriate:
    If you structure it that way or similarly (rather than entering multiple lines in a cell) then you can then use Numbers to do the things spreadsheet software is designed to do: derive summary statistics, charts, etc.  The formulas in this summary table are:
    B2, copied down:  =COUNTIF(Log::B,A2)
    C2, copied down: =SUMIF(Log::B,A2,Log::D)
    D2, copied down: =AVERAGEIF(Log::B,A2,Log::D)
    E2, copied down: =AVERAGEIF(Log::B,A2,Log::C)
    Obviously these workout numbers make no sense. This is just a simple example to give you an idea of the kinds of things you can do if you structure your log properly.
    Also, have a look at the Running Log template (File>New>Personal>Running Log on the Mac, or on the iPad: + then Create Spreadsheet then scroll down to the Personal section).
    SG

  • Adding multiple rows

    How do I add multiple rows at once? Thanks,
    Owen

    See page 69 of the English edition of the user guide for the basics. If you've already been there and read that, you may be saying; yes, but I want to add them in the middle of my table. That's an extension of adding rows to the end of the table. Add as many rows as you need, at the end of the table. Then select the new rows by click-dragging across the row labels. Then grab the selection by one of the labels and pull to the left to separate the new rows from the rest of the table. Without letting go, move the cursor up the table to where you want the new rows to reside, just to the right of the labels, and you will notice that insertion marks, a split line, appear along the row borders under the mouse. When you reach the destination, let go of the mouse switch and the blanks will drop in where you want them.
    Jerry

Maybe you are looking for

  • Logical OR: Result in Amount

    Hello experts, I have 2(AMT1 & AMT2) amount fields. only one AMT occurs for product type. so I have  created CKF: AMT1 OR AMT2. Note:used Logical OR in output i see result as 1. i need to see the amount. Regards, KV Edited by: K V on Feb 23, 2009 3:0

  • Mini Won't mount

    When I boot under OS 9.1, my iPod won't mount, why? What extension do I need to install?

  • When I upload large streams of high frequency data the x axis scales incorrectly

    I have data at 5 kHz for 20 seconds. when I upload this data into the report tab the x axis scales incorrectly and cuts off either the head or tail of the data. The x axis always rounds to the nearest second while i need it to start with the data. An

  • Combined dhcp and static ip?

    I'd like to be able to specify a static ip address and get the remaining stuff (dns, gateway, and whatever) from dhcp. It this possible?

  • Sales start date entered is invalid

    ITunes Producer. What is this all about. No matter what date (or format) I enter, this dialog pops up.