Application Development 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: 

updating inside badi

Former Member
0 Kudos

Hello.

Prompt, please, who collided: inside of a method badi would like to make updating of data in the table of the dictionary. Updating I confirm (commit work and wait), but it does not occur. Whether is what or feature for updating inside badi? In advance thanks, Anton.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

it depends of the Badi, sometimes you can't make commit work inside a Badi ...

Fred

2 REPLIES 2

FredericGirod
Active Contributor
0 Kudos

it depends of the Badi, sometimes you can't make commit work inside a Badi ...

Fred

0 Kudos

Hi,

you should never issue COMMIT from within the BADI, because the calling transaction will do the COMMIT at thge right time after completion of all critical updates.

Note: Your COMMIT will commit everything to the database, not only your database updates.

If you do update/insert, this takes effect inside the LUW immediately but can not be ssen from outside before the transaction commits all pending database requests.

If you can't see your data in the database after the transaction is completed successfully, you either never updated the database or you tried to modify a SAP standard table which is later accessed (and modified) by the tranaction.

If you want to modify SAP standard data, find a BADI with internal tables in the interface. Modify the internal tables and let the transaction write them to the database. Update/Insert should be done only for Z-tables.

Regards,

Clemens