Cannot update table data based on values of numeric fields

I have a button on a form with two numeric fields: P11_numeric1 and P11_numeric2.
I want to be able to either run a stored procedure or execute the update logic. We're on apex 4.0.
I tried the follow syntax in a process run by a button:
begin
schema.procname(:P11_numeric1,:P11_numeric2);
end;
And nothing happened.
If I try to run the proc in toad with hard coded parameter values, the proc works.
I tried this:
begin
update schema.tablename
set value=:P11_numeric1
where id=:P11_numeric2;
commit;
end;
And this doesn't work.
I tried:
begin
update schema.tablename
set value=1
where id=2;
commit;
end;
And that worked, so I assume the issue is with getting the numeric field values. Am I using incorrect syntax?

I'm on apex 4.0.2 btw. I had two main problems: 1) the process that my procedure was in was in a sequence number lower than the MRU process sequence number. I didn't want to use the MRU so I changed it to being called by ajax calls only (which I don't have on the page, effectively not firing this process on page submit). Changing the sequence number of the process call to the procedure higher then allowed me to run the stored procedure.
The next problem was that the fields weren't being passed into the proc.
It looks like the type of the field made a bit of a difference to sending in the parameter for the procedure. The data is either integer or numeric and if the fields were set to a text field, and the proc was changed to accept varchar2 data and convert using to_number in the proc that the data was accepted and was fine. For the integer fields, I was able to (and wanted to) change the field type to display only as this is a read only screen with an button to save the data. For the numeric fields, for some reason the display field type did not allow the field value to be passed to the stored proc.
I'll take a look at the session values not getting set but has anyone heard of that happening to display only fields with numeric data specifically?

Similar Messages

  • Update table data based on sheet

    Hi
    I'm still trying to find an easy sollution to the following problem
    I'd like to update the data in a table with the data I have in a sheet
    I found the possibility to insert but I'd like to do an update or even a merge from the sheet with less clicks and no copy paste
    Does HTML DB have this functionallity hidden somewhere?
    I'll have to do this for a large number of sheets with the same structure but different names
    To me the ideal sollution would be the possibility to define a 'profiile' for the sheet in which you can state the table, collumns and join condition
    So when I'm uploading I only have to choose the profile and give the file name as input
    Thanks
    Cindy

    Cindy,
    I'm sure this requirement has already been mentioned and I believe the solution is/was to load in the usual way and then use your own procedure (maybe kicked off by a trigger) to update/insert/whatever on your own tables, and then delete from the upload table ready for the next sheet (or use sqlldr from a script -- could then be called repeatedly in a for loop to run in a whole lot of sheets in one hit -- for the dataloads to a temporary table then kick off the procedure).
    Greg

  • How do I add auto text based on value in numeric field?

    Need help... I'm trying to add auto text to a text field based on a value in a numeric field. I want my text field (summary box) to say "Passed" if the value (score box) is equal to 10 and the field to say "Not Passed" if the value is equal to less than 10. My numeric field is being calculated by selecting drop-down lists.
    Thanks in advance for your help.
    Ed Watson
    Here's a link to the document I created...
    https://files.acrobat.com/?trackingid=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    I think I figured it out.  I used the following script:
    if(NumericField1.rawValue ==1){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==2){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==3){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==4){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==5){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==6){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==7){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==8){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==9){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==10){TextField1.rawValue = "Passed"}
    There's probably a cleaner way to do the same thing but at least this works for now.  Hope this helps someone else.

  • Is it possible to get the updated table records based on date & time.

    Is it possible to get the updated table records based on date & time in oracle.
    Thanks in advance.

    no, actually i am asking update records using 'UPDATE
    or DELETE' statement, but not insert statement.
    Is it possible?
    I think we can do using trigger on table, but problem
    is if i am having 20 tables means i have to write 20
    trigger. i don't want like this.Of course it's still possible, typically you'll find applications with a column LAST_UPDATE, probably a LAST_UPDATED_BY and so on column. You don't say what your business need is, if you just want a one of query of updates to particular records and have a recent version of Oracle, then flashback query may well help, if you want to record update timestamps you either have to modify the table, or write some code to store your updates in an audit table somewhere.
    Niall Litchfield
    http://www.orawin.info/

  • To update table data

    create or replace procedure SP_MIS_LEDGER_ON_DEMAND_V2
    as
    var_date1 date;
    VAR_STARTDATETIME DATE;
    VAR_ENDDATETIME DATE;
    -- VAR_EXECUTE_FOR_DATE DATE;
    -- VAR_STATEMENT VARCHAR2(4000);
    VAR_ELAPSEDTIME VARCHAR2(50);
    VAR_INTRIMSTATUSID NUMBER;
    CURSOR c1 IS
    select DISTINCT ta.accountid,day PROCESSDATE,(NVL(payment,0))PAYMENT,0 TOTALDUE,0 CURBILL, NVL(srf,0)SRF,NVL(sbpnt,0)sbpnt,NVL(srv,0)SRV,NVL(sbf,0)SBF,NVL(SBV,0)SBV,NVL(EF,0)EF,NVL(EV,0)EV,NVL(TSRV,0)TSRV,NVL(tsub,0)TSUB,NVL(teqe,0)TEQE,NVL(DT,0)DT,NVL(A.dep,0)RDEP,NVL(B.DEP,0)PDEP,NVL(pnt,0)PNT,NVL(eqp,0)EQP,NVL(dtr,0)DTR,NVL(drf,0)DRF,NVL(unadj,0)UNADJ from
    (select DISTINCT day ,accountid
    from
    syntblmaccount, tblmtime where yyyy=2010)ta,
    (SELECT accountid,
    SUM(srfee)srf,
    SUM(srvat)srv,
    SUM(subfee)sbf,
    SUM(subvat)sbv,
    SUM(eqefee)ef,
    SUM(eqevat)ev,
    SUM(ttlsrv)tsrv,
    SUM(ttlsub)tsub,
    SUM(ttleqe)teqe,
    SUM(dep)dep,
    SUM(dt)dt,trunc(FROMDATE)FROMDATE
    FROM VWDT_V6
    group by accountid, trunc(FROMDATE)
    )a,
    (SELECT accountid,
    SUM(pnt)pnt,
    SUM(subpnt)sbpnt,
    SUM(eqpnt)eqp,
    SUM(dep)dep,
    SUM(DEPTRANSFER)dtr,
    SUM(DEPREFUNDED)drf,
    SUM(unadj)unadj,trunc(paymentdate)paymentdate
    FROM vwkt_v4
    GROUP BY accountid,trunc(paymentdate)
    )b,
    (SELECT ACCOUNTID accountid,TRUNC(createdate)CREATEDATE, SUM(totalamount)PAYMENT
    from syntbltcreditdocument
    where CREDITDOCUMENTTYPEID IN ('CDT01','CDT04')
    group by accountid,TRUNC(createdate))credit
    where ta.accountid=a.accountid(+)
    and ta.accountid=b.accountid(+)
    and ta.accountid=credit.accountid(+)
    and ta.day=a.FROMDATE(+)
    and ta.day=credit.createdate(+)
    and ta.day=b.paymentdate(+)
    and ta.day =to_date('01-MAY-2010','DD-MON-YYYY');
    BEGIN
    SELECT MAX(PROCESSDATE) INTO VAR_DATE1 FROM MIS_LEDGER_DETAIL_TEST;
    SELECT SYSDATE INTO VAR_STARTDATETIME FROM DUAL;
    SELECT SEQ_PRC_STATUS.NEXTVAL INTO VAR_INTRIMSTATUSID FROM DUAL;
    FOR c1_rec IN c1
    LOOP
    EXIT WHEN c1%NOTFOUND;
    UPDATE MIS_LEDGER_DETAIL_tEST A
    SET A.PAYMENT=c1_rec.payment,
    A.TOTALDUE=c1_rec.TOTALDUE,
    A.CURBILL=c1_rec.CURBILL,
    A.SRF=c1_rec.srf,
    A.SBPNT=c1_rec.sbpnt,
    A.SRV=c1_rec.srv,
    A.SBF=c1_rec.sbf,
    A.SBV=c1_rec.sbv,
    A.EF=c1_rec.ef,
    A.EV=c1_rec.ev,
    A.TSRV=c1_rec.tsrv,
    A.TSUB=c1_rec.tsub,
    A.TEQE=c1_rec.teqe,
    A.DT=c1_rec.dt,
    A.PDEP=c1_rec.Pdep,
    A.RDEP=C1_REC.RDEP,
    A.PNT=c1_rec.pnt,
    A.EQP=c1_rec.eqp,
    A.DTR=c1_rec.dtr,
    A.DRF=c1_rec.drf,
    A.UNADJ=c1_rec.unadj
    where A.accountid=c1_rec.accountid
    and A.processdate=C1_REC.processdate
    and a.processdate =to_date('01-MAY-2010','DD-MON-YYYY');
    END LOOP ;
    commit;
    SELECT SYSDATE INTO VAR_ENDDATETIME FROM DUAL;
    SELECT CAST(VAR_ENDDATETIME AS TIMESTAMP) -
    CAST(VAR_STARTDATETIME AS TIMESTAMP) INTO VAR_ELAPSEDTIME
    FROM DUAL;
    INSERT INTO LedgerStatusSummary (StatusID, ProcedureName, STARTDATETIME, ENDDATETIME, LastExecutionDate,NextExecutionDate,LastModifiedDate,TIMETAKEN,Procedurestatus) VALUES
    (VAR_INTRIMSTATUSID,'SP_MIS_LEDGER_ON_DEMAND',VAR_STARTDATETIME,VAR_ENDDATETIME,TRUNC(VAR_DATE1),TRUNC(VAR_DATE1)+1,VAR_STARTDATETIME, VAR_ELAPSEDTIME,'MENUAL');
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END SP_MIS_LEDGER_ON_DEMAND_V2;
    i have 9830 data in MIS_LEDGER_DETAIL_tEST table ... i am updating table data but it is taking more time to update for 01-may-2010 it is not completing execution in 15 min so i abort it...
    how to write update query....?? please guide me...
    Thanks in advance
    exec SP_MIS_LEDGER_ON_DEMAND_V2

    Why do you need a cursor or a loop at all? What in your statement can not be accomplished with a simple UPDATE TABLE?
    But if you do require a loop, I don't see it, then use BULK COLLECT and FORALL statements
    http://www.morganslibrary.org/reference/array_processing.html
    And replace this:
    SELECT SYSDATE INTO VAR_STARTDATETIME FROM DUAL;
    with this:
    VAR_STARTDATETIME := SYSDATE;

  • Populate f4 values of a field based on value of other field

    Hi,
    I have created select options using WDR_SELECT_OPTIONS.For one of the fields ,f4 values should be based on value of another field in the screen.
    How will i achceive this requirement.
    I got a link about the same but that is not using WDR_SELECT_OPTIONS
    http://www.sdn.sap.com/irj/scn/logon?redirect=/irj/scn/wiki?path=/display/WDABAP/Using%20Search%20help%20attachments%20for%20WebDynpro%20ABAP
    I got another link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
    which I am going to try
    Thanks
    Bala Duvvuri
    Edited by: Bala Duvvuri on Jun 22, 2011 6:49 AM

    Hi,
    Using OVS you can achieve this.,  In OVS Event Handler read the value based on which you  want to display F4 for other field and populate the values based on the first field.
    this link is fine., go through this: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Can insert but cannot update table.

    Hi,
    I am finding trouble in something that I thought would be very easy. I have writen some code that simply updates some rows in one table (update table set column = value where critery; commit;). This table isn't associated to any Forms block. The code is properly executed except for forms 40401 exception, but I have dealt with it by changing the message level, as it was suggested in this forum.
    My problem is that in spite of getting no error the table isn't updated. I find this pretty weird. I thought it might be some problem related with database permissions, but the same command launched on PL/SQL Developer under the same database connection works fine. I have also checked that insert statement over the same table works properly.
    Do you have any idea?
    Thanks.

    Hi,
    Thank you very much for your replies. I finally managed to solve the issue and I must apologize for having posted this thread. After all, it was quite an easy solution, as I suspected. A data format question. In Spain, decimal numbers are written with comma - ',' and the data I was trying to update always consisted of numbers. These numbers were coming from character variables, and the problem was behind the types conversion. Things worked properly if I wrote UPDATE BUQUES B SET B.B_ESLORATOTAL=TO_NUMBER('12,23'), but they didn't when I used a variable p_Valor where '12,23' value was stored. So was done in my Forms procedure and it seems it was crashing although I didn't get any error.
    I finally managed solved the issue by using FORMS_DDL command and building up the update statement in a string. As soon as I checked what I was storing in this string I noticed the mistake.
    Again, thank you very much for your time.
    Regards,
    Fernando

  • AR Invoice cannot update due date

    Have SAP 2005 installed with 5 databases. In 4 of the databases we can update the due date on the AR invoice screen (As long as document status is open). On one of the databases we cannot update the field. Logging in as manager in all databases.
    Anyone know what to look for or why this be happening?

    No, I have tested for installments and that does not seem to matter. I should have pointed out that one of the databases this DOES NOT work in has a Netherlands localization. Could it be possible that the Netherlands localizations do not allow update of the invoice due date. It appears that this is the case can anyone confirm this?

  • Custom table column based on value scale

    I want to custom table column based on the vaules.
    I understood I need to to /1000000 in the column definition and custom ###,###,###M.
    But sometimes it can be Kilos and sometimes Billions.
    I don't want to display 0.02M or 200000M.
    How can I define conditional custom according to the current value?

    Try doing what I said here and see if it works for you...
    Re: Represent numbers in thousands

  • CMS Cannot update Domain Data

    hi,
    I installed the NW 2004s SP9 sneak preview because I am interested in the NW Development Infrastructure and the Visual Composer. My system is running at port 50900 and not 50100.
    When I entered the Change Management Service, I realized that the domain data did not fit for my system.
    CMS Url http://127.0.0.1:50100
    SLD Url http://127.0.0.1:50100
    When I try to change the URLs to http://myserver:50900 I receive the following error message:
    Unexpected error; inform your system administrator: <Localization failed: ResourceBundle='com.sap.cms.util.exception.CMSExceptionMessages', ID='SLD name-server configuration error', Arguments: []> : Can't find resource for bundle java.util.PropertyResourceBundle, key SLD name-server configuration error
    Does anyone know what I have to do, to change the URLs?
    Kind regards
    Michael

    Hello Meyer,
    can u pelase check in T-code : SMICM and try to identify the HTTP port one which u r server is listening...if it is set to 50100 then i dont know how to change it..for that u have to perform all XI configuration steps entierly....
    and if it is listening on 50900 then u can change the connection parameter in exchange profile as shown below
    Check the Integration Repository/Integration Directory hostname/port
    connection settings are pointing at the correct host. In addition,
    ensure the Exchange Profile has the following parameters pointing at
    the SLD of the XI Development Server.
    com.sap.aii.connect.landscape.name - hostname must be the hostname of the XI system's SLD
    com.sap.aii.connect.landscape.httpport - ensure it's the J2EE port of the XI system's SLD
    com.sap.aii.connect.cr.name - same hostname rule as above
    com.sap.aii.connect.cr.httpport - same J2ee port value rule as above
    If these settings were incorrect, update them with the correct values.
    Save the changes.
    Next, open the Administration console again and click
    the AII Properties link. Hit Refresh button a few times until cache is cleared and new values display for Exchange Profile properties.
    Check then if the link error persists and let us know the results.
    if solved then give reward points
    Thanks

  • BAPI or Function Module to get MSEG table data based on PO Number (EBELN)

    Hi
    1. Is there any BAPI /  Function Module to get PO details based on Plant and PO date?
    2. Is there any BAPI / Function Module to get Material document details(MSEG data) based on PO number?
    Thanks
    Narendra

    Hi,
    check the Bapis Givem below
    BAPI_PO_GETITEMS
    http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
    you will get the detail.
    Regards

  • Plz. help,table does not show value for one field

    hi all,
    i have a really strange problem , i have a string field in access database that contains the date and time value,this field for some strange reason does not show in my table created through html,
    i tried all combination(arranging the fields) ,renaming it w/o help, it shows the value using out.println(but then why is it not showing me in the table???)
    plz. help ASAP.
    the code is as under
    <HTML>
    <HEAD><TITLE> LOGGED IN ok</TITLE> </HEAD>
    <BODY bgcolor = "yellow">
    <%@ page import = "java.sql.*" %>
         <%! // declaring variables
    String s = "";
    java.sql.ResultSet rs=null,rs1=null,rs2=null;
    java.sql.Connection con;
    java.sql.Statement stmt,stmt1;
    String empId = "",compid ="",calltype ="",probheader="",probdescription ="",probcomment ="",priority ="",a="";
    %>
    Following are the pending complaints ..
         <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 width="100%">
         <TR>
         <TD> ComplainD </TD>
    <TD> ComplainId </TD>     
    <TD> ProbHeader </TD>     
    <!--
    <TD> ProblemDescription </TD>     
    <TD> Problem Comments </TD>     
    -->
    </TR>
         <%
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +"DBQ=c:/vishal/HelpDesk.mdb;DriverID=22;READONLY=false","","");
         //java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Portal");
              java.sql.Statement stmt = con.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_ONLY);
              s = "select * from Complains";
         java.sql.ResultSet rs = stmt.executeQuery(s);               
                        while(rs.next())
                        //getting data from database
                                                           empId = rs.getString("EmpId");                    // out.print(" " + empId);
              compid = rs.getString("ComplainId");
              // out.print(" " + compid);
              calltype = rs.getString("CallType");
              // out.print(" " + calltype);
                        a = rs.getString("Complaindate"); //problem with this field
    out.print(a); // prints value
              %>               
                        <TR>      
                        <TD> <%=compid %> </TD>
                        <TD> <%=calltype %> </TD>     
                        <TD <%=a %> </TD>
                                       </TR>
    <%
                        }//while loop          
         %>
         </TABLE>     
         <%                
         }//try
              catch(Exception ep)
              out.println(ep);
              System.exit(1);
    %>
    </BODY>
    </HTML>
    value in database is as follows :-
    Complaindate
    5/18/2003 1:30:27 PM
    5/18/2003 7:32:43 PM
    5/18/2003 7:34:02 PM
    5/18/2003 7:49:19 PM
    5/18/2003 7:50:27 PM
    5/18/2003 10:49:42 PM
    5/18/2003 10:58:24 PM
    thanking u ,plz ask if any further clarifications

    Hi
    I am seeing nothing wrong with ur code..
    what about "view source" result.....plz check with that...
    whether u r getting all the trs and tds...
    revert back on this Issue..
    Mars Amutha

  • Need table data to be captured in a field symbol.

    Hi,
    I need to capture the Table data of a program(SAPLSTXD) into a filed symbol which is called in different program i.e. BTE.
    I have written code like below....but does not work.
    Data:        lines type table of tline,             
                    c_prog type string value '(SAPLSTXD)lines[]'.
              field-symbols: <fa> type any table.
              assign (c_prog) to <fa>.
              if <fa> is assigned.
                lines[] = <fa>.
              endif.
    Please suggest if I am doing wrong. I am not getting data in <fa>. Error says that field symbol is not assigned.
    Thanks in advance.

    Hi Faiyaz,
    I noticed that 'IF_LONGTEXTS_MMGET_TYPES ' and 'IF_LONGTEXTS_MMGET_TEXT ' methods exist in another class 'CL_PO_HEADER_HANDLE_MM'.
    Please check this link: [http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseOrderDataExtractionusingABAPClasses]
    Also, check following includes as how above methods are being used.
    L2012F27
    Hope Clemens suggestion works out for you.
    Good luck.
    Regards,
    Vivek

  • Setting the visibility of check box based on values of dropdown field

    Dear Experts,
    I have to set the checkbox visible/hidden based on the values of dropdown field.
    Request you to please provide code example.
    Regards,
    Upendra

    Hi,
    For capturing the selected value from the dropdown (ComboBox in SAPUI5) field use the change event of the combobox UI element. Within this you can get the selected value using the getLiveValue() method of the combobox.
    Then depending on the value you can set the visible boolean property of your checkbox.
    Refer to the link ComboBox for more details.
    Regards,
    Saurabh

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

Maybe you are looking for

  • Need some urgent help with my (simple) Applet!

    Hello, I'm pretty new to Java and I am beginning to like it! I'm still verry much new to the language, but if you can help me you make me verry happy! Oke so I made an Applet where if you push on the button Omhoog, Omlaag, Links, Rechts, and Reset th

  • Show image in JDev

    Why the picture cannot be showed? Is there any wrong with the servlet code? What's wrong with my code? Thanks package javaclass; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.*; import javax.servlet.http.*; import java.

  • Regarding Report Group-GR55

    hi friends,       I am running a report group using the T.Code GR55. In the selection screen when i enter the Fiscal Year-2007 and then run the report group it is generating an output. after that we are double clicking on the particular field on the

  • How to specify varchar size more than 4000?

    Hi: I want to declare the field as varchar, but the required size for that field is 10,000. So how i can do this? Can any body help me? Thank You, Anup

  • Panic.log - What is this?

    I was looking at my Console logs and found this panic.log shown below. I had walked away from my iBook G4 running 10.3.9 and when I came back everything was dark: not sleeping and not "display off" I pressed the power switch and it rebooted OK. I wen