Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

update sap standard table

former_member841898
Participant
0 Likes
3,726

hi experts,

is it a good practice to update a sap delivered

table directly using abap keyword update , i.e

without using bdc or bapi?

IF yes then why & if not then why?

regards

pankaj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,356

Its definitely not advisable to update SAP standard tables using UPDATE statement directly in your Z-program.

SAP is not recommending the direct update because:

1. Authorization checks are not supported by the UPDATE statement. You must include these in the program yourself.

In the UPDATE <tablename> will not support the authority check.

2. You have to use SAP Locking mechanism before the UPDATE.

3. A SAP transaction updates not just 1 or 2 DB tables. So direct update might

result in DB inconsistencies. So its not highly recommended.

Hope this helps.

Thanks,

Balaji

hi experts,

is it a good practice to update a sap delivered

table directly using abap keyword update , i.e

without using bdc or bapi?

IF yes then why & if not then why?

regards

pankaj

9 REPLIES 9
Read only

Former Member
0 Likes
2,356

Hi,

Use UPDATE keyword to update customized Ztables.

For standard tables, use bdc/bapi.

reward if helpful.

Regards,

Ramya

Read only

Former Member
0 Likes
2,356

generally not...

the reason being that most of sap transactions do not just update a single table. There is a whole set of a tables that might get updated when you run a transaction or a bapi in SAP. If your program logic can take this into account and provide the same consistency of data then sure...you can update the tables the way u want.

However, having said that, it really depends on what your requirement is and how critical is your update. For example, you could go with updates on master data through your programs. So it depends on the kind of update your program is doing and also the table which is being updated.

Read only

0 Likes
2,356

hi priyank,

thanks for your advice , but is it possible to mention in programs all the sap delivered tables to be updated............

a single update can reflect in 100 tables(guess)......

regards

pankaj

Read only

0 Likes
2,356

I don't understand what you mean by :

"a single update can reflect in 100 tables"

If you are asking a way to know which tables does a program updates then yes there is definitely a way to know this.

SQL trace comes to your help here. you can activate the SQL trace through transaction ST05, thereafter run your program. Once the execution is finished, deactivate the sql trace and analyze it. You will get to see a hell lot of things that the program has done on the database level. Here you can make out which are the tables updated by the program.

Does that help? Is that what you were looking for???

Read only

0 Likes
2,356

hi priyank,

yes thru sql trace i will get all the table names,......

but i think bdc or bapi will be better as data integrity will be maintained..............thanks

regards

pankaj

Read only

0 Likes
2,356

Indeed!!

If you are convinced with the answers, then please close the post.

Read only

Former Member
0 Likes
2,356

Hi

If you custom/ Z table table it would be better to use insert modify or update

if you updating master / SAP standard table then it is recommended to use BDC BAPI or FM so that all the related tables should updated

regards

Shiva

Read only

Former Member
0 Likes
2,357

Its definitely not advisable to update SAP standard tables using UPDATE statement directly in your Z-program.

SAP is not recommending the direct update because:

1. Authorization checks are not supported by the UPDATE statement. You must include these in the program yourself.

In the UPDATE <tablename> will not support the authority check.

2. You have to use SAP Locking mechanism before the UPDATE.

3. A SAP transaction updates not just 1 or 2 DB tables. So direct update might

result in DB inconsistencies. So its not highly recommended.

Hope this helps.

Thanks,

Balaji

Read only

Former Member
0 Likes
2,356

Hi Punkaj,

It is not good practice to update standard tables. In SAP all tables will be linked with many tables. We ll have related data stored in multiple tables. If we change one record in one table, remaining related will not be changed. If we use BDC (screen flow like va01) or BAPI, all the related tables will be updated.

Regards,

Subbu