How to get the sum of selected check boxes?

I have created this simple form with several fields. Fields can be selected via a check-box and they have a price listed.
I would like to have the sum of each selected product, added in total.
You can check it out here: https://www.dropbox.com/s/wl1bqz4fa0vlrsk/Student%20Form.pdf
Help.. anyone?

it's me again..
here's a solution: http://forums.adobe.com/thread/929801

Similar Messages

  • How to get the correct value from check box

    hi guys,
    here is a program to read data from IKPF.
    with the user tick on the check box, the program will retrive
    corresponding records based on the inventory counted (zstat) status.
    however i don't get the correct output with the following selection.
    Please advise where is going wrong. Thank you.
    IF ph_ncnt = 'X'.
        v_zstat1 = SPACE.
      ENDIF.
      IF ph_pcnt = 'X'.
        v_zstat2 = 'A'.
      ENDIF.
      IF ph_acnt = 'X'.
        v_zstat3 = 'X'.
      ENDIF.
       select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       b~menge into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and ( a~zstat = v_zstat3 OR
            a~zstat = v_zstat2 OR
            a~zstat = v_zstat1 )
         and a~gjahr = p_gjahr.

    hi guys,
    i'll use the following to get the desire result. This is a bit "stupid" but at least it gives me the correct result.
      IF ph_ncnt = 'X'.
        v_zstat1 = SPACE.
      ENDIF.
      IF ph_pcnt = 'X'.
        v_zstat2 = 'A'.
      ENDIF.
      IF ph_acnt = 'X'.
        v_zstat3 = 'X'.
      ENDIF.
    IF ph_ncnt = SPACE AND ph_pcnt = SPACE
                         AND ph_acnt = SPACE.
         message I799(SA) with 'Which data to print?'.
         stop.
      ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'
                           AND ph_acnt = 'X'.
       select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and a~gjahr = p_gjahr.
      ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'.
       select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and ( a~zstat = v_zstat1 OR
            a~zstat = v_zstat2 )
         and a~gjahr = p_gjahr.
      ELSEIF ph_ncnt = 'X' AND ph_acnt = 'X'.
      select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and ( a~zstat = v_zstat1 OR
            a~zstat = v_zstat3 )
         and a~gjahr = p_gjahr.
      ELSEIF ph_pcnt = 'X' AND ph_acnt = 'X'.
      select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and ( a~zstat = v_zstat2 OR
            a~zstat = v_zstat3 )
         and a~gjahr = p_gjahr.
      ELSEIF ph_ncnt = 'X'.
      select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and a~zstat = v_zstat1
         and a~gjahr = p_gjahr.
      ELSEIF ph_pcnt = 'X'.
      select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and a~zstat = v_zstat2
         and a~gjahr = p_gjahr.
      ELSEIF ph_acnt = 'X'.
      select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
       bmenge azstat into table t_data
       from ikpf as a
       inner join iseg as b
       on aiblnr = biblnr
       and agjahr = bgjahr
       where a~werks in s_werks
         and a~lgort in s_lgort
         and a~gidat in s_gidat
         and a~zldat in s_zldat
         and a~zstat = v_zstat3
         and a~gjahr = p_gjahr.
      ENDIF.

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How to get the dialog of select ODBC source

    how to get the dialog of select ODBC source which system provide.

    JNI.
    Or buy/find a library that does it for you (using JNI.)

  • How to get the value of Selected Dimension in a Pie Chart ?

    Hi All,
    Here is an example i'm working on ,
    JS Bin - Collaborative JavaScript Debugging</title> <link rel="icon" href="http://static.jsbin.…
    I'm using selectData event to fire when any data is selected in the chart. How to get the value of dimension, in my case country which has been selected ?
    Thanks & Regards
    Sakthivel

    Hi,
    I added below code
    var oSelectData = oEvent.getParameter("data");
    // let the dataset convert the event coordinates back to a UI5 model context
    var oContext = this.getDataset().findContext(oSelectData[0].data[0].ctx.path);
                   console.log(oContext);
    in console  I am able to get the path of selected dimention.
    JS Bin - Collaborative JavaScript Debugging</title> <link rel="icon" href="http://static.jsbin.…
    you can figure out how to get the data from this information.
    Regards,
    Chandra

  • WD ABAP: How to get the contents of selected table lines?

    Hi,
    I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
    Can somebody help me?
    Thanks,
    Ira

    Hi Ira,
    wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
    If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
    Regards,
    Srini.

  • How to get the sum total of just one row in the dashboard

    How do I get the sum total of one row in the compound layer results. This is 11g
    Does anyone know?
    may be sales, I need the total at the bottom of the row..
    thx
    Chuck

    I fnd the answer,
    in the table view, click edit then nxt to the columns and measures there is total sum icon. Click that, and choose after

  • How to get the Details when we checked with check box?

    Hi....
    I want to display all the records of perticular checked vendor_id's. n for this checking I want to display series of checkbox along with vendor_id's. could U please give me the code for this.

    actually I'm not getting the logic how to get the vendor_id's which are checked in checkbox...... infact I'm not familier with checkbox properties also.....
    i can able to display series of checkboxs along with vendor_ids . but when I clicked perticualar checkboxes which vendor_id's I wanted. how can display only these checked vendor_id's records. ???? Can U help me????

  • HT200131 I am trying to enter my network password and when I have entered the password for my network, I don't know how to get the remote to select submit.  Please help

    I bought an apple tv some time back and am only now trying to set up the wireless internet connection.  I can see my network but when I enter the password with the remote, I don't know how to get the remote to submit the password.  Could you please tell me what to do?

    You have to use the right arrow on the remote to navigate all the way and highlight the submit button.

  • Getting the value of a check box - annoying error

    Hi guys,
    Ive got a web page with sets of hidden variables and check boxes which relate to different courses, but when I try and itterate through the value of the check box to see if it is checked or not im getting an outofIndexArray error because im using
    for(int i=0; i<paramValues.length;i++)
    { which relates to the number of courses which does agree with the number of check boxes, but not when they are unchecked.
    i.e. when some of the boxes are not checked then it gives this error, however when all are checked it is fine.
    How do I get it to not give this error, i.e. how do I set the value of a check box when it is not checked as on several web pages it shows how to set the value when they are checked.
    thanks
    tzaf

    i don't see the error, can you post some more code?
    what is paramValues?
    you iterate over the number of checkboxes?
    every checkbox can be selected or deselected (boolean isSelected())
    how can there are an exception?
    what is the array where the exception occur

  • How to fix the length of select list box?

    Halo, i am doing the research. I need to find out what is the method to fix the length of select list box. This is b'cos i can set the length of select list due to different length of record(s)/data(s).
    Another question to select list box. What is the maximum length of the select list box?? Can i enter the character with 255 lenght??
    Thank you very much..... a prompt reply will be appreciate!!

    Thanks for ur reply! actually that answer that you gave is right, but i also need to know what is the maximum lenght of character in the select list box?? any idea to that??
    Meanwhile, i also need to know how can i make the character display in select list box dynamically?? that means i can change the font style or font size??
    Anyway, thanks for ur answer.
    bscs.

  • How to get the sum in BSEG table using select statement

    hai all
    i made the internal tale "itab1" .. i want to get the som  feild of  DMBTR in BSG table my code is here but its not working gave som error massage (Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables.)  plz tel me how should i do it..... i want to get the som of that feild....          
    loop at itab1
         SELECT sum( DMBTR  ) from bseg INTO itab1-DMBTR141_45
             where GJAHR = itab1-GJAHR
             and   BELNR = itab1-BELNR.
    endloop.
    regard
    nawa

    SELECT BELNR GJAHR SHKZG DMBTR
                 from bseg
                 INTO table it_bseg
                 for all entries in itab1
                 where GJAHR = itab1-GJAHR
                   and BELNR = itab1-BELNR.
    loop at it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-dmbtr = it_bseg-dmbtr * ( -1 ).
        ELSE.
          it_bseg-dmbtr = it_bseg-dmbtr.
        ENDIF.
        MODIFY it_bseg.
    endloop.
    loop at it_bseg.
    READ TABLE itab1 with key belnr = it_bseg-belnr
                               gjahr = it_bseg-gjahr.
    if sy-subrc = 0.
    collect it_bseg into it_bseg_amount.
    endif.
    endloop.
    U can use the collect statement
    Regards
    Gopi

  • How to get the sum in appropriate column without a red triangle appearing?

    Hello,
    In 'Numbers" - How do get columns to add (calculate) the sum in each decending column on an Expense Report.
    When I highlight the decending column the total appears on the far left of the screen.  When I drag the sum amount from there to the appropriate column a red triangle with an ! appears instead of the amount.
    Thanks for your immediate help.

    The red triangle is an Error triangle. Clicking it will display the error message and tell you what error has occurred. From your description, my assumption is that you dragged the SUM() function from the quick calculations at the lower left and dropped it intto a cell in the column being summed.
    If that's the case, this is likely the error message you would see:
    When you highlighted the 'decending column,' you likely selected all of the cells in that column, including the one into which you dropped the function.
    Instead, do one of the following. These assume the column you want to sum is column B.
    If you want the sum at the top of the column:
    Make sure the row you want the sum to appear in is a Header row.
    Enter this formula into any Header Row cell in column B:   =SUM(B)
    If you want the sum at the bottom of the column:
    Add a Footer row to the table. (Go Table (menu) > Footer Rows > 1).
    Enter this formula into the Footer Row cell in column B:   =SUM(B)
    SUM (and other functions) that expect a range of cells will interpret a cell reference entered using only the column letter (B) as meaning 'all of the non-header, non-footer cells in column B', and will exclude those cells in header or footer rows.
    Regards,
    Barry

  • How to get the value from select tag

    I am trying to do the exactly same thing as this select Demo does. I can not find out a way to get the value form the first select menu and use it to get all the values to form the second select menu.
    here is the web: http://www.4al.pl/phpAjaxTags/ . I am trying to do the same thing as the first demo shows!
    Here is part of my code:
            <!-->create the database connection <-->
            <%
            //Load the MySql Driver.
              Class.forName("com.mysql.jdbc.Driver");
              String url = "jdbc:mysql://localhost:3306/JunkDB";
              java.sql.Connection con = java.sql.DriverManager.getConnection(url, "", "");
              java.sql.ResultSet rsMake = con.createStatement().executeQuery("SELECT DISTINCT make FROM make_and_model ORDER BY make");
              String strMake= "";%>
            <!--Display the make list-->  
            <html:select property="make" value="make" size="1" name="make">
            <html:option value="---Select a Make ----"></html:option>
            <%while (rsMake.next()) {
              strMake = rsMake.getString("make");
              System.out.println("\tmake= " + strMake );%>
            <html:option value="<%=strMake.toString()%>"></html:option>       
            <%} //end while loop
            //<!--Display the model list-->%>  
            </html:select>
            <html:select property="model" value="model" size="1" name="model">
            <html:option value="---Select a model ----"></html:option>
            <%java.sql.ResultSet rsModel = con.createStatement().executeQuery("SELECT model FROM make_and_model WHERE make='" + strMake //I want to put the value of the MAkE over here so I can get the models form database+ "' ORDER BY model");%>
            <%while (rsModel.next()) {
              String strModel = rsModel.getString("model");
              System.out.println("\tmodel= " + strModel );%>
              <html:option value="<%=strModel.toString()%>"></html:option>
            <%} //end while loop
            con.close();
            System.out.println("connection closed");%>
            </html:select>
                <p><input id="notify" name="notify" class="notify" size="24" disabled="disabled" type="text"></p>
            <hr><br>
            </html:form>So how can I get the value of "make" so I can get all models for this kind of "make" ??
    Am I doing it right ??? Or I am going to a wrong direction ???
    Thanks for any input . I am new with JSP and struts

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

Maybe you are looking for

  • How to use oJavaScript parameter in SubmitForm method?

    Hello, I have some difficulties to use the oJavaScript parameter in the submitForm method of document object. What I want to do is having a program filling some fields of my form from data the user write in some other fields. Then the updated fields

  • Summarizing records in a internal table

    hi what is meant by summarizing records in an internal table vamsi

  • My macbook was purchased a month ago ERROR WITH IMESSAGE

    Mountain Lion 10.8.2 with iMessage pre downloaded on it, but everytime i log in, it say's "error with logging in" i use the apple id with my iphone & ipad and it works just fine .. have even tried making a new appleid .. nothing works !

  • "No entry in the table T589A for P" in PPOME's custom Tab

    Hello, <u>requisites:</u><b> Add one custom Tab to transaction PPOME relative to Position (Object type S)</b> <u>problem:</u><b>"No entry in the table T589A for P" </b> when entering the transaction PPOME, and choose my new added Tab.</b> I get this

  • Trip Expense Approval

    Hi We have a requirement as follows : 1. Manager substitutes his secretary(who is one of his team member) for approval of work itmes through UWL. When the secretary raises a trip expense request it comes to the manager as well as back to the secretar