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

Direct SAP table update issues

Former Member
0 Likes
1,254

Hello Experts,

    Currently, in my customer system i see one custom program which is updating SAP standard table (SCM EWM) directly using below statement.

     "update /SAPAPO/MATLWH set rsqty = zmax_qty where matid = mat_wa_chunk-matid and scuguid = mat_wa_chunk-entitled_id."

      I see that program is there in production from last almost 2 years and that is a product quantity update program which has to run periodically.

    As per my knowledge, this is not at all acceptable. Can you please share me your thoughts, what kind of problems will occur and pre-defined

    errors with direct data base table update?

   What should we do now on this?

   Thank you in advance.

1 ACCEPTED SOLUTION
Read only

paul_bakker2
Active Contributor
0 Likes
1,084

Hi,

SAP usually provides a BAPI or some kind of update routine for updating standard tables.

It is recommended that you use these routines, because they handle all the consistency checks, locking, errors, LUWs etc for you.

What to do now? Try to find a SAP routine for updating this table and use that instead.

cheers

Paul

2 REPLIES 2
Read only

paul_bakker2
Active Contributor
0 Likes
1,085

Hi,

SAP usually provides a BAPI or some kind of update routine for updating standard tables.

It is recommended that you use these routines, because they handle all the consistency checks, locking, errors, LUWs etc for you.

What to do now? Try to find a SAP routine for updating this table and use that instead.

cheers

Paul

Read only

Former Member
0 Likes
1,084

Hi Sridhar,

Updating directly in SAP tables is not recommended.Yes as mentioned it may create some inconsistencies.

Use the help of where used list by clicking on the field of the table /SAPAPO/MATLWH and see any Bapis/Function modules are available for doing this.Worst case you can go for a BDC upload.

Also you can request SAP via OSS to help providing an appropriate code.

Regards,

Kannan