How update us the odometer readings

Hi gurus,

One of my requirement is to update the last reading of the odometer of an asset by using the Eam_MeterReading_PUB.create_meter_reading API when it is run, it does not update. The new meter reading ID is null and I see that the meter reading is not updated in the definition of the meter or the information on the last Service (EAM) windows

The example script is the following:

DECLARE

v_return_status VARCHAR2 (40);

v_msg_count NUMBER;

v_msg_data VARCHAR2 (4000);

v_reset_value NUMBER: = NULL;

v_new_meter_reading_id NUMBER: = NULL;

v_meter_reading_rec Eam_MeterReading_PUB.meter_reading_Rec_Type;

BEGIN

fnd_global.apps_initialize (user_id = > theuseridresp_id = > respidresp_appl_id = > respapplnid);

V_METER_READING_REC. METER_ID: = 412408; -derived eam_asset_meters_v for active TR402

V_METER_READING_REC. CURRENT_READING: = 1378; -odometer reading random - current reading in the definition of the metre is 722

"v_meter_reading_rec.current_reading_date: = March 3, 2014;

NULL;

() EAM_MeterReading_PUB.create_meter_reading

p_api_version = > 1.0,

p_init_msg_list = > FND_API. G_FALSE,

p_commit = > FND_API. G_FALSE,

x_msg_count = > v_msg_count,

x_msg_data = > v_msg_data,

x_return_status = > v_return_status,

p_meter_reading_rec = > v_meter_reading_rec,

p_value_before_reset = > v_reset_value,

x_meter_reading_id = > v_new_meter_reading_id

);

dbms_output.put_line ('New ID: ' | v_new_meter_reading_id);

-IF v_return_status <>fnd_api.g_ret_sts_success THEN

dbms_output.put_line (v_msg_count |) » '|| v_return_status | » '|| ( SQLERRM) ;

dbms_output.put_line ('API Err: ' | v_msg_data);

-END IF;

COMMIT;

EXCEPTION

WHILE OTHERS THEN

dbms_output.put_line ('Err: ' |) SQLERRM);

END;

-----------------------------

The output:

New ID:

ORA-0000 S: normal end successfully

Error API:

The approach is good. No need to spend the reset_flag, unless it is necessary to reset odometer on a value less than the current reading in the system. A reason should be made available. Reset_flag is a field in the meter_reading_rec of the var, which is an Eam_MeterReading_PUB.meter_reading_Rec_Type. Please see SR 3-10403510631

Thank you

Tags: Oracle Applications

Similar Questions

  • I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • How update just the day of a date value?

    Example:

    Table: FC_GQ_SOURCE_ANALYSIS

    Sample_type = C

    Effective_date = null

    Sample_date = 20/13/07/14 09:00

    Should that happen, it's for any analysis of the sample which has a 'C' sample_type we need for the entry into force the first day of the month for some months of the date of the sample is and keep the time that it is...

    so in the example data, the entry into force should be 2013/07/01 09:00.

    How to update only the part of the day of this string of date?

    Hello

    You don't need to convert it to a string and back to do.  TRUNC allows to get the right day and date arithmetic to get the right time, like this:

    UPDATE fc_gq_source_analysis

    SET effective_date = TRUNC (sample_date, 'MONTH')

    + (sample_date - TRUNC (sample_date))

    WHERE sample_type = 'C '.

    ;

    TRUNC (sample_date, 'MONTH') is midnight the 1st of the month you want.

    sample_date - TRUNC (sample_date) is the time you want, expressed in number of days (for example, 9/24 a day).

  • Machines virtual 1.1 how update you the Signatures IDS MC?

    Help!

    Got CW VMS 1.1 and a couple of 4250 IDS boxes, they perform signatures to 3.1.3 (s42), when I try to add them to the MC in SMV (so I can then update sigs) he advises that GIS version is unknown and that I should update the signatures of MC.

    I downloaded IDSk9-GIS - 3.1 - 3 - S49 and placed in the directory of the ID updates within MC, I chose this file to update the MC, but it does not appear to do.

    Once the file is selected and I get th text box informing them that it will be applied, I select continue and he returned to the page "select the file.

    Check the audit log it shows the update is started and finished in the same second period and I still can't import/add the ID of the probes.

    Pointers would be most appreciated.

    Ian,

    I know this sounds illogical, but you must download and apply the update to 3.1.3 (s42) .zip to your Inbox to IDS MC. Problems with updates of the IDS MC, it's that there is no way for the MC to say what GIS have been added as part of S42, S45, S49, etc... Thus, avoid us confusion in the minds of the MC by not letting you add a sensor that has a version of GIS that is unknown to the MC. Once you apply update S43 to MC, add sensors. Then, go back and re-apply the update S49 and you should be the option Update sensors as well this time. Good luck and I hope this helps.

    Scott

  • How update you the server vCenter Server?

    I have a virtual machine in my vSphere environment running Windows Server 2008 R2 that has update manager installed on it and my vCenter Server installation.  After scanning it with the Update Manager, it showed it needed to upgrade VMware tools to match the host and also to modernize hardware virtual machine to correspond also to the host.  I've improved the tools successfully, but when I tried to restore the VM for the hardware, I got the following error message:

    "VM [VM name] has vSphere VMware Update Manager or VMware vCenter Server is installed.  This virtual machine will be ignored for the scan and sanitation. »

    So, how can I get around this because I use this machine virtual also patch/update the other hosts/VMs and this is my installation vCenter?

    Yes, it must be turned off. So your only option in this case is to connect to the host, Vcenter, and then right click to upgrade.  Unfortunately, this is your only option

  • How update you the location of linked smart objects?

    The new feature of the linked smart object has a discrete function but it fundamentally changes our workflow for the better!

    Quick question, is possible to update the paths to the linked smart objects or Photoshop it will work to? I can't see a links under window or file panel so do not know how do you sorry.

    I am about to change these files at home and want to make sure that Photoshop can find the links - but also find everything when I copy everything back on the server and work.

    See you soon

    Ben

    If a link is moved from its location, when you open the file that contains the link, you will get a dialog box asking to located the missing file.

  • How update without the original operating system?

    I recently had to buy a hard drive for my counter top. I did this do not know that the operating system was not on it. I returned to Best Buys and the geek squad guy told me that with the new drive hard I have to install the operating system. Because I didn't it was suggested to upgrade to Windows 7 Professional. Did not say anything else, so I bought a program two cents of dollar only to find out that this program is for an upgrade and not a new drive. Now I can't turn it on at all. Can someone please? Can I take that back and negotiate it? I'm not sure.

    Hello:

    Please see if this article is of assistance to you.

    http://www.tech.SC/how-to-install-Windows-7-upgrade-on-an-empty-hard-drive-Windows-7-upgrade-clean-install/

    Paul

  • How update you the Web/API/CLI password in the NSX Manager?

    I looked at several places and not seen how change the password to directly access the NSX (and not through vCenter) Manager:

    • NSX 6 Installation and Upgrade Guide.pdf
    • nsx_61_api.PDF
    • The NSX Manager CLI itself (in mode privileged or not)
    • configuration of the NSX in 'Networking and Security' Manager vcenter (a long shot)
    • The NSX Manager web UI

    Is there a way to change this?

    It should work with:

    Enable

    con t

    password CLI

    write memory

    (just tested with NSX - v 6.1.2)

    I think your order is trying to recreate the admin user.

    See you soon

    Richard

  • How update you the wireless network card

    My WLAN continues to stop. What should I do

    Go to the website of the manufacturer of your computer/laptop > drivers and downloads Section > key in your model number > look for the latest Vista drivers > download/install them.

    For more information:

    It comes with Vista, upgrade install and activate Forum.

    http://social.answers.Microsoft.com/forums/en-us/vistahardware/threads

    They will help you with your question in Vista Hardware and drivers Forum above.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to modify and update a line later was inserted and updated in the doDML() method?

    Mr President

    Jdev worm is 12.2.1

    How to modify and update a line later was inserted and updated in the doDML() method?

    I added two rows in my table a method of action-listener in bean managed and secondly with operation doDML() as below.

    Method 1-first row in managed bean

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();        
            DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");        
            RowSetIterator rsi = dciter.getRowSetIterator();        
            Row lastRow = rsi.last();        
            int lastRowIndex = rsi.getRangeIndexOf(lastRow);        
            Row newRow = rsi.createRow();        
            newRow.setNewRowState(Row.STATUS_NEW);        
            rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);         
            rsi.setCurrentRow(newRow);
            
            BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();        
            DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");        
            RowSetIterator rsi1 = dciter1.getRowSetIterator();        
            Row lastRow1 = rsi1.last();        
            int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);        
            Row newRow1 = rsi1.createRow();        
            newRow1.setNewRowState(Row.STATUS_NEW);        
            rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);         
            rsi1.setCurrentRow(newRow1); 
            
            
        }
    


    Method of doDML() of line 2 seconds in the entityImpl class


        protected void doDML(int operation, TransactionEvent e) {        
            setAmount(getPurqty().multiply(getUnitpurprice()));
           
            if (operation == DML_INSERT)  
                       {          
                         insertSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
        (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));  
                           }
                           
                           if(operation == DML_UPDATE)
                           {
                               
                           updateSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
        (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));                        
                           }                                       
            super.doDML(operation, e);
        }
    
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4)  
                  {  
                    PreparedStatement stat = null;  
                    try  
                    {  
                      String sql = "Insert into vdet (VID,LINEITEM,DEBITST,AMOUNT) values 
       ('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "')";  
                      System.out.println("sql= " + sql);    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
                      stat.executeUpdate();  
                    }  
                    catch (Exception e)  
                    {  
                      e.printStackTrace();  
                    }  
                    finally  
                    {  
                      try  
                      {  
                        stat.close();  
                      }  
                      catch (Exception e)  
                      {  
                        e.printStackTrace();  
                      }  
                    }  
                  }  
                  
                  private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4)  
                  {  
                    PreparedStatement stat = null;  
                    try  
                    {  
                      String sql = "update vdet set vid='"+ value1+"',lineitem='"+ value2+"',DEBITST='" 
       + value3 + "', AMOUNT='" + value4 + "' where VID='" + VID + "'";  
                      System.out.println("sql= " + sql);      
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
                      stat.executeUpdate();  
                    }  
                    catch (Exception e)  
                    {  
                      e.printStackTrace();  
                    }  
                    finally  
                    {  
                      try  
                      {  
                        stat.close();  
                      }  
                      catch (Exception e)  
                      {  
                        e.printStackTrace();  
                      }  
                    }  
                  }
    

    Now the problem is that when later I change the quantity and price of the first line isn't updated but second row, because I used the command

     <af:button actionListener="#{bindings.Commit.execute}" text="Commit"
    

    This button update the first line added by bean managed, but the second row remains unchanged.

    Please help how to update the two lines with the same button or something else.

    Concerning

    DML_UPDATE will call only if there is some change data attributes.

    I guess that the update statement is false because vid looks like a primary key for the table, then, how update you the primary key of the update statement and how the update condition statement where the vid = '0'

    I assume the update statement should look like:

      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4)
      {
        PreparedStatement stat = null;
        try
        {
          String sql =
            "update vdet set lineitem='" + value2 + "',DEBITST='" + value3 + "', AMOUNT='" + value4 +
            "' where VID='" + value1 + "'";
          System.out.println("sql= " + sql);
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • Tecra A8-185 - the update of the BIOS under Windows 7?

    Hi again,

    I have a question how update of the BIOS under Windows 7 ultimate x 64. I downloaded the latest version of the BIOS for my laptop (Toshiba Tecra A8-185 PTA83E). After having unpacked there is only the .exe file.

    When I try to run this file, he said, that my OS is not supported. When I run it in compatibility mode (with Vista or XP), it starts the upgrade, but gives me an error: "the BIOS upgrade is failure (8). BIOS is not able on this configuration. "What should I do? I really need a new BIOS.

    Can I run it at the start of the USB key, or whatever?

    Hi offi55

    Why do you need a new BIOS? You may notice some problems with the laptop or why are you trying to update?

    However, I think that the update should only be done on the pre-installed Windows version (XP or Vista). I guess that this update n t tested and designed to update Windows 7 so I think that would be the reason why you can t.

    So to install Windows from the Toshiba Recovery disk and try to update again. It should work.

  • Update to the cloud (Lightroom and photoshop) lightroom 5.7 already installed

    Hello!

    How updates to the CC (lightroom and photoshop) if I already have lightroom installed 5.7 and I work my photos from an external hard drive.

    I have a macbook pro.

    Thank you

    You should probably leave your lr perpetually licensed 5.7 only and do not install the lr 5 via your subscription of the cc.

    but, if you wanted to, uninstall lr 5.7 and use the cc office to install the lr subscription

  • I installed 5.6.2 Pages but all my old documents will open with ' 08 how can I delete the Pages ' 08 and update all the old documents

    I installed 5.6.2 Pages but all my old documents will open with ' 08 v.3.03 How can I remove the Pages ' 08 and update all the old documents

    5 pages is located in your Applications folder.

    Pages ' 08 is located in your Applications/iWork ' 08 folder.

    If you open your old documents Pages ' 08 with 5 Pages it will convert and if not damage, remove a large number of useful features.

    You will probably regret upgrading to 5 Pages which Apple has made extremely inconsistent and keeps changing its file format.

    Peter

  • says that there is an update of firmware available for my 3 t time capsule. I get "an error occurred when downloading". How to find the problem?

    I said that there is an update of the firmware available for my 3 t time capsule. I get the message "an error occurred when downloading". How to find the problem? I have elcapitan 10.11.6 and capsule version 7.7.3

    Try temporarily, connect your MacBook Pro to your Time Capsule using an Ethernet connection... If not already, then try downloading the firmware again.

  • I want that my previous method of search bar back. Changed how update the search bar works now and I hate it!

    Latest update of Firefox changed how to search bar functions. This should NOT be done automatically without warning of a person on the changes. I have problems using this new method of research, and I hate it. I want than the previous method return. A contributor has tried to help him, I guess. But what he suggested did not work. I can't fix thru on Firefox. A window opens and does nothing. About Firefox does nothing, but look at me. I don't know how to enter the configuration of Firefox. I appreciate the-edmeister tried to help me, but nothing has changed. There, someone knows how to give back me my old search bar?

    It's not On Firefox's Subject: config as explained here:
    https://support.Mozilla.org/en-us/questions/1035119

Maybe you are looking for

  • Distance between 2 points in geo coordinates

    Everyone knows hot to calculate the distance between 2 points on the surface of the Earth, given their contact details? (for example: 1=30.45N/43.23E and 2=35.11N/19.05W) A program for HP50G or 42, or 41 c would be fine, a formula or algorithm as wel

  • Conversion of a project to use a library project

    Hello. I'm trying to convert a large main VI with a lot of sub - VI to a project that would use rather a project library. In particular, I want to pack all or nearly all my SubVIs in a library project (so that I can later reuse these subVIs to variou

  • HP pavilion Entertainment pc: hp pavilion dv9500 system off

    Hello My hp pavilion Entertainment pc dv9500 (Uncle recycling) system off [05080] I don't have password, please help me. Sorry for my English, I'm french. Thank you

  • P7-1054: p7-1054 graphics card update

    Helli I want to update my pc graphics card I have the p7-1054 with no upgrade, I'm not a're Wiz tech that I would like to know If this card will work with this computer http://www.Amazon.com/GP/product/B00U8IS47A?ColId=2F2LWZ0MIUL9P&coliid=I27PIS76OW

  • Windows Update is broken - none of the threads seem to help

    Update Windows 7 is broken, stuck at 0%. No driver update does not work either, they just hang out. I tried all the other patches of these bodies, including: -System Update Readiness Tool (doesn't work, everything hangs until force them to leave) (ht