How to prevent record from setup table from deletion if it is used in atabl

i have two table setup table and master table
the setup table contains data from countries and i use this countries in master table
i want to prevenet a user from deleting country if it is used in master table
i know i can do this if i make a foreing key in setup table
but in this cases the exception message are raised from the data base
can i make this from the jdeveloper by asscociation and view object and customise the message that are raised to the user
thanks in advance

The question is why to program this yourself if it's available by the framework?
You can customize the error message raised by the db in the framework (there is a whole chapter in the docs).
Timo

Similar Messages

  • How to update Records of SAP table from .CSV file

    Hi,
    I have written a code which takes a data from (,) delimited CSV file and adds it into the Internal table.
    Now I want to update the all fields in SAP table with the Internal table.
    I want to use Update statement.
    Update <table Name> SET <field needs to update> WHERE connditon.
    I don't want to iterate through thousand on record in sap table to check the where condition.
    Could you please tell me how to do it.

    Hi. I thing you will not workaround the iterating of the internal table.
    You can pre-load all the records into another internal table
    check lt_csv[] is not initial. " important, otherwise next select would read all records of the table
    select .... into lt_dbitab for all entries in lt_csv where key-fieds = lt_csv-key_fields...
    check sy-subrc eq 0 and lt_dbitab[] is not initial.
    then do in-memory update of the it_dbitab
    loop at it_dbitab assign <fs>.
      read table lt_csv assign <fs_csv> with key ... " lt_csv should be sorted table with key, or you should try to use binary search
      if sy-subrc eq 0.
        ...change required lt_dbitab fields: <fs>-comp = <fs_csv>-comp...
      endif.
    endloop.
    ant then you can do mass-update
    update dbtab from table lt_dbitab.
    From performance view, this solution should be much faster than iterating lt_csv directly and updating every single database record
    Br
    Bohuslav

  • How can i fetch records from 3 tables in a single query  without using join

    Hi.
    Can any body please tell me <b>How can i fetch records from 3 tables with a single query  without using joins</b>
    Thanx
    prabhudutta

    Hi Prabgudutta,
    We can fetch the data by using the views concept.
    Go throuth this info we can know the how to create view and same like database table only we can fetch the data.
    Views conatin the data at runtime only.
    Four different view types are supported. These differ in the
    way in which the view is implemented and in the methods
    permitted for accessing the view data.
    Database views are implemented with an equivalent view on
    the database.
    Projection views are used to hide fields of a table (only
    projection).
    Help views can be used as selection method in search helps.
    Maintenance views permit you to maintain the data
    distributed
    on several tables for one application object at one time.
    step by step creation of Maintenance view:
    With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
    It can be set in transaction SE11 - Tools - Table maintenance generator.
    Table maintanance Generator is used to manually input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under attributes tab
    2) utilities-table maintanance Generator-> create function group and assign it under
    function group input box. Also assign authorization group default &NC& .
    3) select standard recording routine radio in table table mainitainence generator to move table
    contents to quality and production by assigning it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers this dialog box appears when you click on create button
    6) save and activate table
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    SM30 is used for table maintenance(addition or deletion of records),
    For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
    Sm30 is used to maintain the table ,i.e to delete ,insert or modify the field values and all..
    It creates the maintenance screen for u for the aprticular table as the maintenance is not allowed for the table..
    In the SE11 delivery and maintenance tab, keep the maintenance allowed..
    Then come to the SM30 and then enter the table name and press maintain..,
    Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
    Then create,,,
    Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
    We use SM30 transaction for entering values into any DB table.
    First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
    Then it will create a View.
    After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
    Hope this resolves your query.
    Reward all the helpful answers.
    Rgds,
    P.Naganjana Reddy

  • How to insert new record into oracle table from GridView in VS2005.

    I need to insert records into Oracle10g table from VS2005 GridView using the Insert Method in Business Logic Class. The Update and Delete Methods are working fine. What's the best way out?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

  • How to prevent a text in script from displaying if its value is zero

    Dear all,
    How to prevent a text in script from displaying if its value is zero
    for eg   Price  = 0.00
    if price is 0 it should'nt appear in output.
    I tried with    if price ne 0.
                       price = &price&
                        endif.
    but it's not working.
    Regards
    Raj
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AM

    Hello Nagaraju,
                           What you were doing is partially right.
    The correct format to write in the script is as follows :
    /:  if &PRICE& ne 0.
      &PRICE&
    /:  endif.
    This should work. Let me know how it goes.
    Nayan

  • Delete the records in a table from forms

    Oracle forms6i
    Hai All
    I am using forms6i and my need is i have generated a forms and the output is viewed through tables and i need to to delete all the records in the table from my forms while executing next time pls tell me
    Regards
    Srikkanth.M

    hi
    please try something like this.
    Begin
    Delete From Master_Tbl Cascade;
    forms_ddl('Commit');
    End;sarah

  • Selective Deletion and Data Load from Setup Tables for LIS Extractor

    Hi All,
    We came across a situation where one of the delta in PSA was missed to load in DSO. This DSO updates another cube in the flow. Since it has been many days since this miss come in our knowledge we need to selectively delete data for those documents from DSO & Cube and then take a full load for the Documents filling the setup table.
    Now what will be the right approach to load this data from setup table > DSO > cube. There is change log present for those documents and a few KPI's in DSO are in summation mode.
    Regards
    Jitendra

    thanks Ajeet!!!!
    This is Sales Order extractor, the data got loaded to ODS just fine, but since the data is coming to ODS from different extractor. Everything is fine in ODS, but not in the cube. Will Full repair request and Full load would it make difference when the data is going to cube? I thought that it would matter only if I am loading to ODS.
    what do you mean "Even if you do a full load without any selections you should do a full repair ".
    thanks.
    W

  • HT1338 trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    Disable anti virus software and try turning off the Firewall in System Preferences > Security & Privacy > Firewall.
    Quit then relaunch the App Store. From the menu bar click Store > Sign In
    Then click Store > Check for Unfinished Downloads

  • Records in setup table

    Hi Gurus,
    I had a query regarding the total no. of records in setup table of a particular datasource say for 2LIS_13_VDKON
    If i want to know the number of entries in the setup table for this datasource how can i do that ? RSA3 extractor can do this but i just want number of entires only.
    Is there any database table to store the data of setuptable for it ?
    Sonal...

    Hi Sonal,
    U can try in SE16 --> MC13*KONSETUP which is a structure name (F4).. and then select ur structure name and then enter. And check for the number of entries.
    Or u can use RSA3 to findout the same where u need to provide the proper celll info to get the total count.
    Or u can check NPRT T-code to get the total count for that application from the previous setups.
    thanks
    Hope this helps

  • How to change records in standard tables ?

    how to change records in standard tables ?

    HI,
    If you are asking from program..Then you can use BDC or BAPI to update the records in teh standard tables..
    OR
    use the corresponding tcode to update the record
    Thanks
    Naren

  • How to make records  to the table TRFCQIN

    hi all,
    anyone can tell me
    how to make records  to the table TRFCQIN
    regards

    Hi Wanna,
                    Write a module pool program to enter record into table TRFCQIN.
    Take fields to which u want to make entries in module pool.
    Use insert command to append data in table TRFCQIN.
    Refer this code :
    CASE OK_CODE_101.
    WHEN 'SAV1'.
    TRFCQIN-QNAME = 'XYZ'.
    TRFCQIN-QCOUNT = "Screen field name at which user will enter value
    INSERT TRFCQIN.
    if sy-subrc <> 0.
    message e007.
    else.
    clear TRFCQIN.
    clear ok_code_101.
    endif.
    endcase.
    Reward points if helpful.
    Regards,
    Heamnt

  • How do I update all the records in a table from the contents of another table?

    Ok some situation information, I have a pervasive database that runs our accounting software that I am pulling a product list from.  I have that list stored in a table in SQL.  From time to time we update the records in the pervasive database and
    I want to be able to pull those changes into the SQL table.  I don't want to drop the table and recreate it because if a product is no longer active in the pervasive database it will not be returned by the query (if I return all the products even the
    inactive ones I will get thousands of records rather than just a few hundred) and I do not want to loose the products from the table that are now inactive.  
    So what I want to be able to do is pull the list from pervasive, compare it to the list that exists in SQL and update any changed records, add any new records, and leave any now missing records alone(missing from the pervasive list but present in the SQL
    list).  I have no trouble pulling the records from pervasive (now) but I am a little stumped on how to do the rest.  I am not sure if this is a situation to use MERGE or not.  I also do not really need this to be done on a regular basis as the
    changes do not happen often enough for that, the ability to manually trigger it would be enough.
    Any help would be appreciated.
    David

    Hi David,
    lets say you want to go with the lookup transformation.
    lets say u want to move the data from server A table A1 to Server B table B1
    What you need to do is the following:
    Cofigure the Lookup options as follows:
    - In general -> Specify how to handle rows with no macthing entries -> "Redirect Rows to no Match Output"
    -  In Connection -> Set the ole db connection to the Server B and select the table B you want to lookup the values in your case the table where you want to input the changes 
    -  In columns -> link the product column from table A to product column in table B. And do not select any rows to output.
    - now your component is ready next you need to input. so when u connect your lookup to the destination component You will get an option to select which output you want to use - use "Lookup No Match Output".
    this will actually just allow you to add only new items only to the table B.
    Teddy Bejjani - BI Specialist @ Netways

  • How to export and import dependent tables from 2 different schema

    I have a setup where schema1 has table 1 and schema 2 has table2. And table 1 from schema1 depends upon table 2 from schema 2.
    I would like to export and import these tables only and not any other tables from these 2 schemas with all information like grants,constraints.
    Also will there be same method for Oracle 10g R1,R2 and Oracle 11G.
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10825/dp_export.htm#i1007514
    Looking at this For table mode it says
    Also, as in schema exports, cross-schema references are not exported
    Not sure what this means.
    As I am interested in only 2 tables I think I need to use table mode. But if I try to run export with both tables names, it says table mode support only one schema at a time. Not sure then How would the constraints would get exported in that case.
    -Rohit

    worked for my 1st time I tried
    exp file=table2.dmp tables="dbadmin.temp1,scott.emp"
    Export: Release 10.2.0.1.0 - Production on Mon Mar 1 16:32:07 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    About to export specified tables via Conventional Path ...
    Current user changed to DBADMIN
    . . exporting table                          TEMP1         10 rows exported
    EXP-00091: Exporting questionable statistics.
    Current user changed to SCOTT
    . . exporting table                            EMP         14 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.

  • How to update value in internal table from cdpos taking fname n value_new?

    hello everyone,
              i want to insert  value in internal table from cdpos table taking field name  from fname and value from value_new.but the problem is i am not getting how to map the corresponding field of internal table with fname value  which is the field name.
    for example
    i
    fieldname
    value
    name1
    raj
    name2
    sharma
    i want to update field name1. this name1 is there in fname with updated value in value_new  how to make name1 with fname value
    thanks and regards
    laxmikant soni

    Hi Laxmikant,
    If I have understood your requirement correctly, you need to update an internal table with latest 'value_new' from cdpos table where  'fname' = 'fieldname' .
    Hope the below logic will help you:
    FIELD-SYMBOLS: <wa_intab> LIKE LINE OF lt_intab.  "the internal table you want to change
    LOOP AT lt_intab ASSIGNING <wa_intab> .
       READ TABLE lt_cdpos INTO wa_cdpos           "lt_cdpos contains latest data selected from CDPOS
        WITH KEY fname = <wa_intab>-fieldname.
       IF sy-subrc = 0.
         <wa_intab>-value = wa_cdpos-value_new.    
       ELSE.
         "//logic if the name is not there in CDPOS
       ENDIF.
       CLEAR  wa_cdpos.
    ENDLOOP.
    If you wish to improve performance, I suggest using
    1. "transporting value_new" addition in READ TABLE,
    2.  select only the data which you require from CDPOS,
    3.  create the internal tables with only fields which you require,
    4.  when you are using SELECT,LOOP AT statements, limit records by using WHERE condition
    Regards,
    Kavya

  • Importing records into a table from one server to another server

    I have two servers running Oracle Portal, these two servers are not connected at all. I need to export the records from one table on server one into a table (defined exactly the same) on server two.
    How do I go about this? I know that I can query the rows and extract the information into HTML, Excel or ASCII on server one… can I use one of these query outputs to somehow import into the table on server two?
    Is there another method to accomplish this operation that I've overlooked?
    Thanks in advance.

    Export and Import are standard Oracle Database Utilities
    with 9i version you can use simple export-import
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#SUTIL001
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch02.htm#1656
    or use with 10g a faster type of export-import
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#i1007466
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm#i1007653

Maybe you are looking for

  • Third-Party USB to Ethernet Adapter not working since 10.8 updated

    Hi I have a third-party USB to Ethernet adapter. Since the update of mountain lion the adapter does not work. Is there a driver or something I can do to make it work? Thanks

  • Dangerous problem in My probook

    I have a serious problem in my proBook 4530s i was working in my windows 8 OS and while i was listening to music on youTube site an error message appeared with a shade on my lap screen and a small vertically black lines .. i pressed the power button

  • Different ways to run MRP?

    Hi Experts, Could you please tell me what is the difference between wc27 and md01 transactions? Thanks in advance, Artashes

  • Does the ipod touch sync email???

    Hi guys I am thinking about buying the Ipod touch. I am used to syncing my email to a palm device (yes, I still use one). The folks at the apple store can not tell me if the touch can sync my apple mail inbox, so I post the question here. thanks Marc

  • My iPod touch will not delete apps!

    I will put it into wiggle mode and it won't even show the option (The X) to delete the app i've also tried manually by going to settings then General then Usage then tapping on the app I desire to delete and it doesn't show the red button the used to