‎2009 May 22 8:34 PM
Hi,
I am updating a DB table (Sap standard table) via my program.
I have few doubts with regard to same. They are given below,
1. I came to know that it is not best practise to update the sap standard table via program using "update" statement. Why so? Is there any other way or statement in doing the same?
2. The sap standard table which i update via my program is BDRGIN. Now my question is, when my program is modifying the values of the table, if some other user also modifies the value at the same time via SE16 then conflict occurs. How to resolve it? Is SAP uses any automatic handling for such conflicts?
kindly help me out.
Regards,
Raghavendraprasad.N
‎2009 May 22 11:45 PM
Hi,
For updating standard SAP tables use BDC or BAPI's, because the validation done automatically and it updates all the relevant tables.
Regards
Krishna
‎2009 May 22 8:45 PM
Hi,
Its not a good practise to modify the Standards tables through programs, because most of the standard tables will be interdependant with forign key relation ships (check table relations). So incase we create an irrelavant entry, then it will cause a lot of confusions.
For example we create entries in MARA/MAKT table using MM01/02 transactions.
There are a few standard tables like TVSA (containing customising data), these have to be maintained through the SPRO transaction. You can open SPRO transaction and search for the node to maintain entries in it or you can go to the transaction SM30 and you can give the table name and click on customizng to go the SPRO node.
Still if you are trying to create entries in your table, Enque/Lock the table do the updations and then Deque/Unlock the table, so that there will be no conflicts happening during that time.
Regards,
S.Dakshna Nagaratnam.
‎2009 May 22 11:45 PM
Hi,
For updating standard SAP tables use BDC or BAPI's, because the validation done automatically and it updates all the relevant tables.
Regards
Krishna
‎2009 May 23 4:24 AM
Hi,
Its always not good to update/insert values in a standard table using program as you are unaware of the dependent tables that are need to be updated.
To avoid this inconsistency you need to use BAPI/BDC to update the records or else have to store additional data in Ztables.
Anyway if you are sure that updating values directly into the standard program does not affect the consistency of the data take extra care while updating using LOCK concepts.
Regards
Karthik D
‎2009 May 23 4:32 AM
Hi,
Updating DB is not a good practice.
Because, the updation may cause breakage in the Data Integrity.
Unless we have the full control/details about a record which can be updated with the Function Module, we should not do it.
Regards,
Ramani N