How update area field when geometry is updated

hi all,
plz can someone help me to find solution or give me a way to solve my problem
i would like to create procedure to recalculate the area of geom and insert it the value in the specified field when the geom is updated.
I try 2 methods but no one works, the error appears if i update the geometry of parcel
------------------------------------------PL/SQL------------------------------------
----------------------------------------Oracle 9i---------------------------------------
CREATE OR REPLACE TRIGGER "GIS"."TRG_PARCEL" BEFORE
INSERT
OR UPDATE ON "PARCEL" FOR EACH ROW DECLARE
BEGIN
IF INSERTING THEN
select SDO_GEOM.sdo_area(geom,0.05) into :new.fld_AREA
from parcel where id_parcel = (select max(id_parcel) from PARCEL) ;
ELSIF UPDATING THEN
-----------------1st case to try ------------------------------
UPDATE PARCEL a
SET fld_AREA = (select SDO_GEOM.sdo_area(a.geom,0.05)
from parcel a where NOT SDO_GEOM.RELATE(a.geom,'EQUAL',val_new,0.005) = 'EQUAL' )
WHERE NOT SDO_GEOM.RELATE(a.geom,'EQUAL',val_new,0.005) = 'EQUAL';
-----------------2nd case to try ------------------------------
SELECT SDO_GEOM.SDO_AREA(c.geom, m.diminfo)
into :new.fld_AREA
FROM PARCEL c, user_sdo_geom_metadata m
WHERE m.table_name = 'PARCEL' AND m.column_name = 'GEOM'
AND old.geom <> :new.geom ;
end if;
end;
thnx for all
Geomaticien TN

Hello,
You may try the following:
CREATE OR REPLACE TRIGGER "GIS"."TRG_PARCEL" BEFORE
INSERT OR UPDATE ON "PARCEL" FOR EACH ROW DECLARE
BEGIN
:NEW.fld_AREA := SDO_GEOM.sdo_area(:NEW.GEOM,0.05);
END;
Thanks,
Ying
Edited by: user704655 on Jul 22, 2009 11:37 AM

Similar Messages

  • How to display field when using Query Panel..

    Hello,
    I created a Named Criteria with a bindvariables then I drag the Named Criteria I created to the page with ADF Query Panel, then I drag the VO where the Named Criteria to the page with ADF Form.
    now what I need ..
    I need the Fields in ADF Form (input text....) to be displayed befor I cliked the search button. becasue the page design will appear bad. so how can I dislpay them when the page load.
    Thanks,

    May be you need to update the values of the screen field like:
    DATA BEGIN OF LNA_DYNPF OCCURS 1.
    INCLUDE STRUCTURE DYNPREAD.
    DATA END OF LNA_DYNPF.
        l_total = l_total + S10_QUANTITY.
        LNA_DYNPF-FIELDNAME  = 'S10_TOTAL_PRICE'.   " field name
        LNA_DYNPF-FIELDVALUE = l_total.   " value
        APPEND LNA_DYNPF.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
             EXPORTING
                  DYNAME               = l_cporg        " your program
                  DYNUMB               = '0100'  " your screen
             TABLES
                  DYNPFIELDS           = LNA_DYNPF
             EXCEPTIONS
                  INVALID_ABAPWORKAREA = 1
                  INVALID_DYNPROFIELD  = 2
                  INVALID_DYNPRONAME   = 3
                  INVALID_DYNPRONUMMER = 4
                  INVALID_REQUEST      = 5
                  NO_FIELDDESCRIPTION  = 6
                  UNDEFIND_ERROR       = 7
                  OTHERS               = 8.
    Regards,
    Naimesh Patel

  • How to Name Fields when querying database?

    I am trying to query a database and then use "Split Fields" from data manipulation. The table I am querying has 100+ columns which has details about a User. I am able to automate perfectly the way I want.
    The only annoying piece is that when I try to query the published data from split fields, I have to look into the database and find the number and then add it here. Is there a way to name these fields in a friendly way - like Username, phone number, DOB,
    etc etc
    Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer"

    Hi,
    the Integration Pack for SQL form Kelverion is much more comfortable:
    http://www.kelverion.com/integration-packs/ip-sql-server/
    Regards,
    Stefan
    www.sc-orchestrator.eu ,
    Blog sc-orchestrator.eu

  • Change how paramters are chosen when running crystal on web i

    Hi there..
    i have the following problem.
    when i double click on a crystal report, in our QAS server, i get the following screen to chose parameters.
    https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/385923_10150579230068428_516188427_10979481_1660085047_n.jpg
    and when i click on the same report on the prudction server, i get it this way.
    https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/395199_10150539385573428_516188427_10793487_1411181440_n.jpg
    Where do i change it??
    both servers are the same version.. everything is the same.. just the way they are chosen that deffers..
    i want to change the production server to  be just like the QAS..
    Thanks in advance..

    Hi,
    Perhaps by changing your infoview Viewer preferences?
    or check out 1575886 - No SAP Prompt Screen in InfoView when viewing a rport based off multiple SAP data source 
    it says:
    Resolution
    To display the SAP prompt screen in InfoView for reports that are based off different SAP data source, enable the option: SAP.style.prompt.enabled, in the web.xml file of the web application. To enable the option:
    On your BusinessObjects Enterprise XI 3.1 server, go to the following folder:
    C:\Program Files\Business Objects\Tomcat55\webapps\PartnerPlatformService\WEB-INF
    Note: The beginning of the path may be different if you have chosen to install the product on a different drive or folder.
    Make a backup copy of the file: web.xml
    Edit the file: web.xml and add the following code:
       <context-param>
            <param-name>SAP.style.prompt.enabled</param-name>
            <param-value>true</param-value>
        </context-param>
    Note: You may already have the above code in the web.xml file. If it is present, it is by default commented out by being surrounded by the tags <!--  -->  If it's the case, then you simply have to remove the tags that comment out the code.
    Save the change.
    Restart the web application server ( Tomcat by default )
    Regards,
    H

  • Control Busniess Area Field in Account ***..

    hello Friends,
        I have to control business area field in account assignment is needs  to invisible when i select custom account assignment category..
         Can you please help me out how can i do this requirement..
        I know there is a control badi available but nothing is working for me..
       if you already done this control badi please help me out to implemented the logic to invisible business area field when i choose custom account assignment..
    Thanks,
    John.

    Hi
    Have you tried the BADI
    <b> BBP_CUF_BADI_2 </b>. this BADI si basically for Custom fields.
    Please try out this code Inside Method modify_screen ....
    given below on the standard field name available in the Table type of the BADI.
    I am not sure, whether this will help.
    METHOD if_ex_bbp_cuf_badi_2~modify_screen.
      LOOP AT et_fields INTO ls_et_fields.
        CASE ls_et_fields-fieldname.
    *--- Custom field Number is displayed & input enabled
          WHEN 'ZZFIELD'.
            ls_et_fields-xdisplay = 'X'.
            ls_et_fields-xinput   = 'X'.
            MODIFY et_fields FROM ls_et_fields
                   TRANSPORTING xdisplay xinput.
            CLEAR ls_et_fields.
        ENDCASE.
      ENDLOOP.
    ENDMETHOD.
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • I entered new fields in a form that was created last year to update it.  However, now when I view the responses, they are listed as Column 1, Column 5, etc.  It doesn't show a label for the actual field when I view the responses.  Can you please help?

    I entered new fields in a form that was created last year to update it.  However, now when I view the responses, the headings are listed as Column 1, Column 5, etc. rather than the name of the heading.  Can you please help?

    Hi Mike,
    CRSE is an OEM Product and for use with a custom application they have written. Unfortunately we don't their reports or how they are connecting, it would appear they were originally built off a SQL and then set to a Dataset in the app or they could be adding the data source at runtime. Lots of variations and without access to the source code to see what they are doing not much we can help you with.
    You need to contact the OEM Partner for help in resolving this and find out what you can and need to do to update your SP and work with their canned reports,
    Thank you
    Don

  • How to Update Business Area Field in Posted Document?

    Dear All,
    Pls tell me how to update Business Area in documents which are posted without entering Business Area field. Pls tell me how to achieve this without using Validations & Substitutions. Any table entries can be maintained for this? Kindly guide.
    Regards
    Abhijeet

    Hi,
    I think, you need to post mannually if you have the list of documents posted with out business area.
    ex:
    1.Before posting of accounting entry as below, you should deactivate business area component in OB65 againest your co.code
    2.Post accounting entry as below
    40   123456    without business area     100
    50   123456    with business area ABC  100
    3. Goto T.Code: OB65 activate the business area component.
    4. After posting of accounting entry like above you should run transaction F.5D and F.5E again, make sure that above entry not come again while executing F.5D.
    First you can try this process in dev client, if you are comfort with this process then follow the same in quality and production.
    Note: You can do this transactions in production client, only when there were no users working on the system.
    all the best
    Regards,
    Prasad

  • How to increase field's number when update

    What value should I set when I want to make some field increase ,
    such as "UPDATE table SET field = field + 1";

    Hi, chan15
    Please checkou this tutorial, it shows you how to increase field counter by updating the field value by adding +1 everytime you reload th page...
    :: Visits Hit Counter ::
    Herein this tutorial we will learn how to implement an auto visits hit counter. The visits hit counter uses an "After" "Custom_Trigger" to update the (hits_ht) field by adding (current field value
    +1
    ) to it, This script is very useful, specially when used to view member`s profiles, photo albums etc... by implementing this hit counter script with your database records you will get full reports about how many times profile, photo viewd by members or visitors.

  • How to update Business area field for alread

    Hi,
    Recently we activated Business area financial statements in our system. After that all SD entries are showing Business area field in all SD billing-Accounting documents.
    But the entries before the above change were not showing Business area since it was not activated before. But i want to update the Business area for the old documents also. so that it will be useful for me in reporting purpose.
    Kindly suggest me if there is any PROGRAM to update Business area field for the old documents.
    Thanks
    Sunil

    Hi,
    Please check the OSS Note 549182 - FAQ: Business Area Accounting
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=549182
    Also OSS note 41294:-
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=41294
    Regards,
    Gaurav

  • Updating field when new records saved.

    Hi,
    I was wondering if there are any suggestions on updating a picklist field when a new record is saved (as field updates only work for modified records).
    We recently created a custom Probability % field that is tied to both the Sales Stage and another custom picklist field called "Business Type" (has two options - New or Existing). The Probability % field is updated based on a simple workflow that says if Sales Stage = x and Business Type = y, then Probability % = z.
    For example, if the Sales Stage is = to "Validation" and the Business Type is = to "New", the Prob. % will be 5. If the Sales Stage is = to "Validation" and the Business Type is = to "Existing", the Prob. % will be 10... (just so you get the idea).
    Since the workflow is tied to modified records, the new records keep missing the Probability % field.
    Any suggestions on how we can get those newly created records have an updated Prob. % field would be helpful.
    Thanks in advance!

    Thanks for the response, Min.
    1) I've thought about the post default value, but the problem we encounter is that the user might not create an Opportunity in the very first sales stage- is there a way to place a default in the Prob. % field depending on the sales stage the record is created with?
    2) I thought fields could only be updated when modified records saved - it isn't an option with the "new record is saved". Is there a workaround? I'm still quite new at this, so any help on how I can create a workaround would be great!
    Thanks again.

  • How does the field CCSOFTLOCK in T000 Table get Updated ?

    Hello Experts !
    I would like to know how does the field CCSOFTLOCK in Table T000 Get updated ?
    I tried all fields in SCC4 for a client but none of my change updates CCSOFTLOCK .
    The Data Element Description says   Client control: Soft Lock Required (Planned for 4.0)
    What does this Planned for 4.0 Indicate. We are in ECC5.0.System.
    Regards,
    Mithun Shetty

    Hi Mithun,
    Can you check if Note "1047952 - SCC4: Client settings with enhanced security options "is  applied to your system.
    as per it , you can put additional restrtictions for modifying SCC4 (table T000) fields ,a BadI will be checked additionally.
    15. Parameter : CCCOPYLOCK_VAL_DEFAULT
           Type      : Exporting
           Pass Value : Check
           Optional  : Space
           Associated type: TYPE
           Reference Type : CCSOFTLOCK
    Regards,

  • What is iMovie doing after update?  How can I tell when it's done?

    "Updating" a whole lot of old iMovie events to the new iMovie 10 library.
    When I tried to trash the old events the OS warned that they were "still in use".  No problem, I thought.  Shut down iMovie, and then trash the old events.
    Well, when you try to shut down iMovie it tells you there are still "tasks being completed in the background" and that if you shut down they won't ever be completed.
    so......
    What are these tasks?  (iMovie 10, after a big import, is using about 20-25% of a CPU continuously, according to Activity Monitor)
    If I do shut down despite the warning what are the consequences?
    How can I tell when it's done and I can safely shut down iMovie? (I guess I sould wait and see if it ever stops warning me).

    Did you read the manual? It's usually explained on what does all this stuff mean on the screen. I don't think the manual that comes with the Micro isn't the player's guide but if you install the software I think, you can look it up by going through Start>Program Files>Creative>Creative Zen Micro>User Guide. This is the default directory.
    Anyway, yes your Micro is charging and if you want to play your music on your MP3 player while it's charging you can use Nomad Explorer to play the music on your computer or use Creative Mediasource to play the music and hear it from your MP3 player. You can't control your MP3 player so just use your computer. It's not that hard to learn.

  • How frequently are maps updated?

    (Caveat: I use the OVI map loader software on my PC to upload maps to my phone / it's data-card).
    Roughly how often are the maps updated - I've noticed that everytime I go in to the map loader program, I always get the option to download the same maps (UK) and the only time it tells me I have them already (same for the voices for that matter) is immediately after I've downloaded them to the phone (memory card).
    If I do the same thing a day or two later, it doesn't tell me that the maps I'm downloading (or voices) are the same version that are already on my phone (/memory card)?

    psychomania wrote:
    I take it you are using a model that doesn't have wi-fi? I'm not a fan of map loader for the same reasons as you described. I also find it very slow, even on a high end PC so being able to update maps direct from the phone using wi-fi is a very welcome addition.
    Without wi-fi I can imagine this feature isn't that great unless you've got a decent data plan.
    Yes, no WiFi - 5230.
    At some point in the future (when current contract ends) will probably have the option to include a data plan, but for the next 5 or 6 months, I'd have to pay a daily charge.

  • ASMLibs - How often are these updated?

    I am working with Red Hat Enterprise Linux and there is a new kernel that has come out to fix a security issue, but I cannot update this due to the version of ASM that is posted on Oracle's site. How often are these items updated compared to when a new kernel is released (as in this issue)?

    805673 wrote:
    I am working with Red Hat Enterprise Linux and there is a new kernel that has come out to fix a security issue, but I cannot update this due to the version of ASM that is posted on Oracle's site. How often are these items updated compared to when a new kernel is released (as in this issue)?BTW, this is one of the great things about the new Oracle Unbreakable Enterprise Kernel: ASM and OCFS2 kernel drivers are built-in, so no need to keep finding them after a kernel upgrade. :)

  • How do you know when you have the latest software updates

    how do you know when yo have the lastest software updates on your older IPOD?  I just purchased on home theater to replace one, Samsung, I was assured that the system would run my IPOD.  I've sync'd my IPOD to my computer a number of times before the purchase and since.  Samsung is telling me that I need to update my IPOD.  My ITunes keeps telling me there aren't any updates out there.

    Read the top of the page I gave you the link to. The
    latest update that you do not have only added more
    support for the Shuffle. If you are not having any
    problems leave as is. If you have problems then
    download the update. It will ask you for your user
    ID. Once you install the updater, your computer will
    reboot.
    This is what it says at the download site.. iPod Software 1.0
    * iPod with video
    Everything is working fine Barb with the ipod but I was under the assumption that if an update is available, I should download it...

Maybe you are looking for

  • IMovie Crashes At Start Up

    I currently have an older Powerbook g4 running on 10.3.9, so I use imovie4. It's been working well up until last night. A few days ago, it was running fine, now whenever I launch iMovie, it immediately crashes. I tried restarting thinking it could be

  • EPM 11.1.2.3 configuration error

    Background: ENV:  windows 2008 R2 64           8G RAM           .net 4 framework           JDK           office 2010 DB: oracle Database 11g R2 EPM:  11.1.2.3 win 64 install component: fundation services                            essbase the compone

  • HT1040 I'm from united kingdom but iPhoto from america, how to change the country before i order them.

    I'm from united kingdom but iPhoto from america and postage, post code, how to change the country before i order them?...i need post code from untied kingdom, i don't know how to change from zip code(USA) into post code (UK)?

  • Cost Center Category

    I am trying to find an IO if exists for cost center category ( KOSAR ) on BI. I did my search in MetaRep & Help. Does anyone know about it ? Message was edited by:         Jr Roberto

  • How do i install "webassist-free tools" into dreamweaver cc?

    Dreamweaver cc will not allow me to install "webassist-free tools".  I read somewhere that "MLX" or something like that, will not install into dreamweaver cc.  It must be configured or converted. Is this true?  If so, can someone please to do that.