Regarding Database MODIFY

Hi,
I am updating(or Insert)  database table in a user - Exit, using MODIFY statement.
On a particualr date, they have created 100 documents. But, in that 96 documents are inserted into the Custom data base table. But, 4 documents are not inserted.
So, can you please tell me. what are the chances of a "MODIFY" statment can fail.
If the 2 users are inserting simultaneuously, is there any chance of fail in MODIFY?
I am not using any locks in my code.
I am not using an Commit work here as this is user exit.
Please help me.
Code :
MODIFY DBTAB from WA.

Hi Sandeep,
No Need for locks,
As MODIFY statement automatically sets a database lock until the next database commit or database rollback.
The Possible cause for not updating the records could be.
At least one line could not be processed as there is already a line with the same unique name secondary index in the database table. 
means duplicay of records,
For ex 96 records are inserted so these 96 records contains unique entries in there primary key fields, rest 4 records doesn't contain unique entries in primary key fields.
for ex in table MSEG- document number is a key field, so you can not put same material number twice,
Kindly check your data which you are updating in your table, As key fields should have unique entries. This will definately solve your problem.
Thanks
Saurabh siwach

Similar Messages

  • Query regarding database access segregation using os authentication in windows environment

    Hi ,
    I have a query regarding database access segragation using os authentication (like sqlplus "/ as sysdba") in windows environment.Let me briefly explain my requirement:-
    Suppose you have two DBA`s viz DBA1 and DBA2 and 4 databases resideds in a windows server say A,B,C & D.Now I want to set up such a way if DBA1 logs into the server then he can login to database A and B only using OS authentication and DBA2 can login to database C and D only using OS authentication.
    Please let me know how to do setup for this requirement.
    Database version is 11.2.0.3

    1494629, I am not a Windows person but if there is any way to do this I suspect some additional information is necessary:
    Are the DBA users members of the Administrators Group ?
    Do all 4 database share the same $ORACLE_HOME ?
    I suspect if either answer above is yes then this is not possible, but like I said I am not a Windows person.  I would just ask for two servers and the associated licensing to be acquired.  The requirement to spend money to do something management wants usually elimanates the request in my world.
    HTH -- Mark D Powell --

  • Query regarding database patching

    Hi ,
    I am on Oracle 11G and Solaris SPARC 64-bit server.
    The server admin have applied the oracle CPU that was released on April 18,2011.
    I have the path to the new oracle home now.
    Currently my oracle home is 11.1.0.7.P1 and the new oracle home is
    11.1.0.7.P2.
    Now the practice that i have been following to change my oracle home(Patching) is :
    1. Shutdown db
    2. Change oratab with new home:Y
    3. Change my .profile for $ORACLE_HOME
    4. Startup the database with init.ora
    5. Run catbundle.sql cpu apply
    6. Run recompile_precheck_jan2008cpu.apply
    7. View_recompile_jan2008cpu.sql
    8. Shutdown immediate and startup
    9. Change oracle home in listener.ora
    10.Create softlink of init.ora to /dbs/ of new oracle home.
    Now I have 2 queries :
    1.Since the database runs fine post it , I am not able to conclude
    if any other sql also needs to be run ?
    2. What is the location of the readme.txt and readme.html which i need to check for invalid objects.
    I have searched but couldn find it. :(
    Also , How do i test the performance pre and post patching..
    Will doing it by just checking the time taken for Data loads pre and post
    patching sufficient.
    What other checks can i do in dev to test for patch.
    Thanks and Regards
    Kk

    Hi ,
    In this particular database , ive run the catbundle.sql and its been almost 30 mins that its at this location :
    SQL> @?/rdbms/admin/initcdc.sql
    SQL> Rem
    SQL> Rem $Header: initcdc.sql 15-mar-2006.08:20:07 mbrey Exp $
    SQL> Rem
    SQL> Rem initcdc.sql
    SQL> Rem
    SQL> Rem Copyright (c) 2000, 2006, Oracle. All rights reserved.
    SQL> Rem
    SQL> Rem    NAME
    SQL> Rem      initcdc.sql - script used to load CDC jar files into the database
    SQL> Rem
    SQL> Rem    DESCRIPTION
    SQL> Rem      <short description of component this file declares/defines>
    SQL> Rem
    SQL> Rem    NOTES
    SQL> Rem      script must be run as SYS
    SQL> Rem
    SQL> Rem    MODIFIED   (MM/DD/YY)
    SQL> Rem    mbrey       03/15/06 - bug 5092790 add datapump registration
    SQL> Rem    pabingha    02/25/03 - fix undoc interfaces
    SQL> Rem    wnorcott    03/14/02 - bug-2239726 disable triggers.
    SQL> Rem    wnorcott    01/31/02 - function 'active' return 0 or 1.
    SQL> Rem    wnorcott    01/30/02 - disable CDC triggers, CREATE_CHANGE_TABLE re-enables.
    SQL> Rem    wnorcott    06/26/01 - rid trailing slash.  As per Mark Jungermann
    SQL> Rem    gviswana    05/25/01 - CREATE OR REPLACE SYNONYM
    SQL> Rem    jgalanes    11/17/00 - for Import/Export grant execute on util to
    SQL> REM                           SELECT_CATLOG_ROLE
    SQL> Rem    wnorcott    09/07/00 - new loadjava syntax for performance.
    SQL> Rem    wnorcott    07/18/00 - rid LOGMNR_UID$.clientid
    SQL> Rem    wnorcott    06/28/00 - move logmnr_dict view here
    SQL> Rem    wnorcott    03/28/00 - fix trigger install
    SQL> Rem    wnorcott    03/27/00 - Install change table triggers
    SQL> Rem    mbrey       01/26/00 - script to load CDC jars
    SQL> Rem    mbrey       01/26/00 - Created
    SQL> Rem
    SQL> call sys.dbms_java.loadjava('-v -f -r -s -g public rdbms/jlib/CDC.jar');How do i check if its still running or failed ?
    *PS : Ive read this note :Script Fails At Loadjava With ORA-03113 and ORA-03114 [ID 358232.1] But its when it errors out , for me its not erroring out also..*
    Thanks
    Kk
    Edited by: Kk on May 25, 2011 2:40 AM

  • SCCM database Modified date doesn't change / rebuild indexes

    Hi all,
    I have 2 questions
    1)
    We have a month ago upgraded our SCCM environment from SCCM 2012 RTM -> SCCM 2012 SP1 (no CU), and we have upgraded SQL 2008 R2 (CU6) to SQL 2008 R2 SP2.
    We have a SCCM 2012 primary site and an SCCM 2012 CAS site from both these sites its database file has not changed its modified date since the data of upgrade (SQL is installed on the same server so the database is local). However the WSUS database and the
    reporting DB that exist on the same server updates its modified date.
     SCCM is running and all status messages are OK. All component status's are updating and have correct dates based on when e.g. the last backup ran (that is at 6 pm every night) with no errors. To make a long story short, everything works
    as it should. Deployments and advertisements and OSD arrive, collections get updated, no errors appear in the log files or in the component or site status, but the database on these servers (CAS and Primary) does not modify its date. SCCM backup of these servers
    is running and the database file in that backup also contains the same modified date.
    Anyone knows why this happens , or do we have an issue ?
     2)
    Maintenance task rebuild indexes
    Is there a best practice according to the maintenance task rebuild indexes?
    In our environment we have not enabled this maintenance task, both sites run for over one year.
    Can we enable this task without disturbing or is it a better idea to enable this task in the weekend when there is less workload , and afterwards schedule this task once a week
    regards and thx in advance
    Johan

    As stated “The time stamp will also change if the database files size are expanded as well when the database grow”
    does that mean that after our upgrade a month ago the database has not grown with new data??
    It depends. Data might have been added to the database (which it was fur sure with ConfigMgr), but the timestamp will only change if the file size was increased too. That has something to do with the initial and max file size settings in SQL and the autogrowth
    settings.
    Torsten Meringer | http://www.mssccmfaq.de

  • Regarding the modify of internal table

    do 40 times varying lga from p0008-lga01 next p0008-lga02
    varying bet from p0008-bet01 next p0008-bet02.
    *data: bet01 type p decimals 2.
    if lga is initial.
    exit.
    endif.
    INDEX = SY-INDEX.
    amt1 = bet .
    *bet01 = 20 / 100.
    bet = ( bet * 50 ) / 100 .
    CONCATENATE ch INDEX INTO BETXX.
    assign betxx to <F2>.
    assign (betxx)  to <F1>.
    <F2> = bet.
    <u>modify p0008 index INDEX transporting F1</u>
    write:/ <F2>.
    enddo.
    *endif.
    ENDCASE.
    endform.
    can sombody tell me how to modify the p0008 table at the place vr im having the bet01 bet02 and so on fields.
    vn im using this modify statement im getting an error as
    Unable to interpret "INDEX". Possible causes of error: Incorrect

    Hi Madhvi,
    When you are posting a thread, please make sure others do not find it difficult to understand. Please don't use abbreviations like "vr" and "vn".
    If you need prompt responses, please ensure you describe your requirements in
    a proper manner.
    You are getting error because of using wrong syntax. the correct syntax is -
    MODIFY <itab> FROM <wa> [INDEX <idx>] [TRANSPORTING <f1> <f 2> ... ].
    The work area <wa> specified in the FROM addition replaces the existing line in <itab>. The work area must be convertible into the line type of the internal table.
    If you use the INDEX option, the contents of the work area overwrites the contents of the line with index <idx>. If the operation is successful, SY-SUBRC is set to 0. If the internal table contains fewer lines than <idx>, no line is changed and SY-SUBRC is set to 4.
    Without the INDEX addition, you can only use the above statement within a LOOP. In this case, you change the current loop line <idx> is implicitly set to SY-TABIX.
    When you change lines in sorted tables, remember that you must not change the contents of key fields, and that a runtime error occurs if you try to replace the contents of a key field with another value. However, you can assign the same value.
    The TRANSPORTING addition allows you to specify the fields that you want to change explicitly in a list.
    Regards
    Indrajit.

  • Regarding the modifying an internal table

    hi,
       i am having an internal table,i have to modify one field and the remaining fields should remain same in the internal table while displaying the internal table.
       can any body send the solution for this issue.
    thanks in advance

    hi,
    you can see the following logic regarding modify statement with in loop or without loop.
    DATA : BEGIN OF itab OCCURS 0,
           no(10) TYPE n,
           name(10) TYPE c,
           city(20) TYPE c,
           END OF itab.
    itab-no = 001.
    itab-name = 'vijay'.
    itab-city = 'dharmavaram'.
    APPEND itab.
    itab-no = 002.
    itab-name = 'krishna'.
    itab-city = 'dharmavaram'.
    APPEND itab.
    itab-no = 003.
    itab-name = 'vijay'.
    itab-city = 'dharmavaram'.
    APPEND itab.
    itab-name = 'ram1'.
    MODIFY itab INDEX 3 TRANSPORTING name.
    LOOP AT itab.
      IF sy-tabix = 2.
        itab-no = '0012'.
        itab-name = 'krishna.v'.
        MODIFY itab INDEX 2 TRANSPORTING no name.
        CLEAR itab.
      ENDIF.
    ENDLOOP.
    LOOP AT itab.
      WRITE :/ itab-no,itab-name,itab-city.
    ENDLOOP.
    Hope this example will be usage for you.
    Reward with points if it is useful.
    Regards,
    Vijay

  • Regarding database table to infotype

    hi experts,
                    sorry i m going to ask a typical question i m working on hr-abap ,i have developed a module pool in which the database table is updating with some data,what i want that after updation i want to store that data in a infotype,,so plz tell me how to create infotype and how to store the data into it from a database table...thnx in advance.i know it is a configuration part but rt nw my company doesnt have hr consultant.....plz help me.

    Hi
    <b>Creating an Infotype</b>
    Using the TCODE PM01 you can create an Infotype. As per SAP standard you can use only 9000 series. The below procedure explains you how to create an Infotype.
    1.Go the transaction PM01 and give the Infotype Number lets say 9999 and press  button. It will ask you a messaging window,
    2.Press create button to continue further. It will take you to create the structure.
    3.Give the components and SAVE & ACTIVATE the structure and come back.
    An Infotype attributes window will appear; you create a new entry with the Infotype No and give the appropriate description.
    and give the data and press ENTER key. The Technical data will appear automatically, here you have to maintain the Single screen as ‘2000’ and List screen as ‘3000’ and then SAVE the info and press BACK button, you will reach the main screen.
    After that using the Menu option Infotype 
    4.Generate the structure, dialog module and include. 
    Click the  button from application tool bar to check the Infotype attributes. Select the 9999 Infotype and check the data.
    If every thing is error free, you can use the Infotype using PA30 transaction.
    5.Use the Create button you can create New Entries for the Infotype.
    You can view the entries in table PA9999 using the TCODE SE11/SE16.
    Validating Code in Module pool: - If you want to validate the user inputs,
    You need to write the validate code procedure in the module program MPXXXX00 screen 2000 (here XXXX is user Infotype, in our case 9999).
    In PAI.
      MODULE P9999.
      MODULE HIDDEN_DATA.
      FIELD P9909-PRATE MODULE PRATE. “ Create a module routines. 
    In PBO
      MODULE PRE_INPUT_CHECKS.
            input-checks:                                               *
      insert check modules here:
      CHAIN.
       FIELD P9909-PRATE MODULE PRATE.
      ENDCHAIN.
    Double click on PRATE it will ask you the include name, SELECT the include MP999930 from the input window.
    *&      Module  PRATE  OUTPUT
          text
    MODULE prate OUTPUT.
      IF NOT p9909-prate IS INITIAL.
        PERFORM check_prate.
      ENDIF.
    ENDMODULE.                 " PRATE9  OUTPUT
    Again check_prate subroutine, write down the below code in MP999940 include.
    *&      Form  check_prate
    FORM check_prate .
    CLEAR zprate_t.
      SELECT SINGLE * FROM zprate_t WHERE prate = p9909-prate.
      IF sy-subrc > 0.
        CLEAR zprate_t.
        MESSAGE e016(rp) WITH 'Entry does not exist in ZPRATE_T table'.
      ENDIF.
    ENDFORM.                    " check_prate
    After that check the module, if it is error free then ACTIVATE the same. You can check the Infotype validations using the PA30 transaction.
    Regards
    Raj

  • Query Regarding Database Split

    hi all,
    My client have 4 Units in which nearly 80%items are same in all 4 units,Bp are 40% approx same please suggest me how to manage 4 unit in 1 database or in 4 diffrent database.What problem i face if i choose 1 database for all four unit.
    Note:All 4 unit working seperatly
    Thanks and regards
    Rahul

    Hi
    First of all u cant generate Balance sheet for all four units seperately.....(TB and P&L can be generated sep. if u have maintained Profit centres...) BY using some of tools this also we can achieve but not in std. sbo.
    For connecting all Four units u should have Brooad band connection to access the server. In India most of the time the Broadband will be slow r down only....
    All customers Balances  can be seen by other branch peoples also.......
    Unwanted Masters which is not belongs to other branch also will be availlable to everyone.anyway that can be filltered...
    Giri

  • Query regarding database size

    hi,
    ( sap 4.7c + sql server 2000 (Module:sd/mm/fi )
    ( data : 1 & half year - no BI )
    our database size is around 50 GB
    and log size is around 30 GB
    I doubt that something is wrong.
    can anyone explain to me what is right and
    what action one should take on this type of scenario.
    thanks in advance
    raj

    Hi Raj,
    My database size is about 30GB (3 years of usage) and log file is about 12GB.
    My database settings (recomendent by SAP and Early watch) are:
    I shrinked database to minimum size and set following settings:
    Database (mdf and ndf):
    - growth activated: checked
    - growth not restricted: checked
    - next step possible: checked
    - next step size: 60MB
    tempdb and log file:
    - growth activated: checked
    - growth not restricted: checked
    - next step possible: checked
    - next step size: 10%
    Regards,
    Marcin Gajewski

  • Query regarding database reorganization

    Hi All,
    I have been asked to reorganize the database( size 220GB Dev, size 460GB Qua, size 500GB Production)
    Database is Oracle 10G, SAP version is ECC 6.0.
    I tried this via BRtools on a test system(size 130GB,Oracle 10G) and nothing happens.Assuming this,I doubt any change.
    However my management is insisting size must decrease by 10 -12 percent.
    My query is if I reorganize the database via BRTOOLS what will be the effect on the database size.
    No client is deleted on any of the system and no data has been erased by the functional team.
    Any suggestion on the same will be a great help to me.
    Regards,
    PG

    Hi,
        How much space is liberated after a re-org task is purely subjective ( system load, when the last re-org was run etc). A test system with no user activity cannot form an ideal test-bed for re-org outcome. Rather than looking out for benefit in terms of percentage of space shrunk, you could look at all avenues that can bring down the database size. The following notes might be used as a starting point.
    SAP Note 541538 - FAQ: Reorganization
    SAP Note 771929 - FAQ: Index fragmentation (Easier than a table re-org task.Can be done online ( before attempting this online, please go through the SAP Hot News announced in SAP Note 1413928 - Index corruption/wrong results after rebuild index ONLINE )
    SAP Note 706478 - Preventing Basis tables from increasing considerably (Exectue the SQL query in the note to identify the tables that occupy highest space and look for corresponding solutions in this note for those tables)
    Above messages' SAP Data Volume Management guide also has suggestions for triggering archiving/deleting/compressing/avoid growth where necessary
    cheers !
    PRADi

  • Regarding Database migration to external storage

    Hello.
    We are running on MS windows 2003 enterprise edition with Oracle Database 10g.
    We have system with 32GB RAM and 600 GB Harddisk space on system, and we have installed SAP Solution manger and SAP Netweaver (PI) 7.0 componenet on that box. At this time we do not have external storage so we segrigate and installed SAP Solution Manager and SAP Netweaver(PI) on same box like
    C:\ 120 GB Space - Contains SAP Software and Oracle Database Software
    D,E,F and G: drive contains 120 GB each on every drive, which contains oralce database - SAPDatas, oraarch,saparch,sapbackup,sapcheck etc.
    Now we have storage with good capacity, so we want to move all data from D,E,F and G: drive.
    So how can we to migrate oracle database software to Storage.
    Waiting for your kind response.
    Best Regards,
    V.Singh

    Hi
    Please check the following links:
    http://www.sap.com/services/education/certification/course.epx?context=%5B%5B%7CTADM70%7C%7C%7C%7C%5D%5D%7C
    and
    http://www.oracle.com/newsletters/sap/products/database/dbmig.html
    and
    http://www.geocities.com/SiliconValley/Grid/4858/sap/Basis/OracleMig.htm
    I hope this helps
    Regards
    Chen

  • Database modify element in row

    Hi all,
    I have a question about the database toolkit.  How do I query a particular row in a table and modify an element in that row?  By doing this, the database table is getting updated.
    Yik
    Kudos and Accepted as Solution are welcome!
    Solved!
    Go to Solution.

    When I write sql query, I always use it to get data, and I have never tried to update a table in a database.  I didn't know that you can use the querying function to update a table.  Thanks, it worked.
    Yik
    Kudos and Accepted as Solution are welcome!

  • Regarding database crashed

    Friends,
    I have googled a lot and searched a lot in internet regarding my problem. Hope here I get some clue to recover my database.
    I have one test database which I am using from few month. Unfortunately I have dumped the database contents on same HDD. File system crashed in the HDD and current I am having IO error. However I manage to recover my two important datafiles system01.dbf and users01.dbf. Any hope to recover my data.
    Following is my detail:
    OS: CentOS 4.4
    Database: oracle 8.1.7
    Guys, Please help me to manage to recover data. I am thinking is there any way to read data from data files using third party software

    Hi,
    File system crashed in the HDD and current I am having IO error.Are you running in archivelog mode?
    Got backups?
    any way to read data from data files using third party software Well, Oracle has a tool that will read the data blocks, called BBED:
    http://www.dba-oracle.com/t_bbed.htm
    You can get help and direction on BBED by logging an SR on Metalink:
    http://metalink.oracle.com
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author

  • ALTER DATABASE/MODIFY FILE issue

    Greetings to all --
    We are running SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64), and running into what seems like a bug. One of the largest tables was moved to a separate file group a while ago, and now a large percentage of the rows from that table (about 50GB) , need to
    be removed.
    We wanted to reduce the amount of transaction log growth and the duration required for the delete. Recovery model was set to BULK_LOGGED before executing the following steps:
    1. create a new filegroup
    2. create a new file in that filegroup
    3. set the new filegroup to be the DEFAULT filegroup
    4. SELECT INTO new_table from original_table WHERE filter_condition
    5. drop original_table
    6. rename new_table to original_table
    7. remove original file from original filegroup
    8. remove original filegroup
    9. MODIFY the logical name of the new file to be the same as the logical name of the original logical name.
    ALTER DATABASE myDB
    MODIFY FILE ( NAME = new_logicalname, NEWNAME = original_logicalname)
    This fails:
    Msg 1828, Level 16, State 3, Line 1
    The logical file name "original_logicalname" is already in use. Choose a different name.
    I noticed that the original filegroup still persisted until I did a transaction log backup, but after that , there is no entry for that file in sys.databasefiles for that database.
    Checking sp_helpdb for that database shows only the new logical file name.
    Any thoughts would be much appreciated.

    This scenario is easily reproduced, and seems not to be "by design".
    I put my bets on Sean and say "by design".
    I can't put my finger on it, but it has to with doing restores, and particularly log restores. It does not seem to happen with a database in simple recovery. But for a database in full (or bulk_logged) recovery, there lingers a row in sysfiles1 and sysprufiles
    for the dropped file.
    sys.database_files is a view over sys.sysprufiles and it does not display the deleted file, but it is there with a certain status.
    In any case, I can't see that this is the end of the world. It is not likely that you refer to the name of that fill all around the house. But the next time you do this manouvre, you may want to rename the existing file before you drop it and create
    the new one.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Regarding database back up

    Hi all,
    I am new to database back up. Can anyone explain me what is the difference
    between the back up which is taken using db13 in sap and taking back up
    directly from sql enterprise server in windows.
    Is it possible to do offline and online back up through db13?
    Can anyone please suggest me in detail.

    Sanjeev,
    Well, you can't. If you schedule the backup, the BRTOOL set will address this. DB13 really only gives you a 'GUI' interface for the BRTOOLs as well as a scheduling capability. Remember that when you trigger the backup job from DB13, you're not executing this at the SAP level, you're executing this from the OS level via the DBTOOLs - you could schedule the same job at the OS level if you wanted.
    If you trigger a BRBACKUP with the option 'offline', it will actually shutdown the database for you, perform the backup, and restart the database (return it to the state when the backup started). SAP itself will not go down per se, but obviously, it will not have connectivity with the database, and users who logon during this time will receive error messages regarding "no connection to database". Most folks, therefore shutdown the SAP system first, then trigger the offline backup.
    Hope this helps.
    Tim

Maybe you are looking for

  • Late 2011 Optibay HD upgrade (working only in bootcamp)

    Hi everybody, i recently upgraded my Macbook pro Late 2011 with an optibay (not the original) and a 1TB 7200 HD. I followed the instructions and the installation was successfull. But when i turned on my mac the hard drive was not present in finder an

  • Custom domain name?

    I would like to have a MyName.com domain name for my web site. What is the best way to do this? I would prefer to have it appear that my web site is on the MyName.com address and not simply load the web.mac.com url. Is this possible? And can I do it

  • Old Lion Finder bug reappears in Mountain Lion -- lost options

    There were a number of problems with the Finder View options under Lion which were fixed bit-by-by, upgrade-by-upgrade. In general, folder placement was scrambled and view options were lost/reset after certain operations. Now, with Mountain Lion, som

  • Easiest was to copy clips from one sequence to another?

    Hi, Instead of copy/paste is their a different, quicker way to move clips from one sequence to another? Thanks

  • ADD a Color Palet in a Combo box

    I need to create a Combo box with a Color Palet, as soon as the user clicks lets say on green on the palet that color is selected. Please any help will be appreciate.