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: 

call FM in update task

rangerlet_mesee
Participant
0 Kudos

Hi

I have a BADI method that has a select query to fetch inspection lot. But that select fails as the inspection lot updates after the method execution(commit happens later). Heard that through call function in update task...this select query can be made a success.

Please assist.

3 REPLIES 3

Sandra_Rossi
Active Contributor

If there's a standard Update FM which updates the table, call your custom Update FM right after the call to this standard Update FM, and at the time of the COMMIT all Update FMs will be called in sequence, so your custom Update FM should be able to read the updated table.

DoanManhQuynh
Active Contributor
0 Kudos

i suggest you might find the global variable used to update that table, if there is you could use field symbol to access that global variable instead of select from table.

raymond_giuseppi
Active Contributor

You can insure that the database is already commited using a call in update task (if called after the standard update FM or defining your FM as a start delayed one, update V2 as most usal database table are updated in V1) or in background task (define your FM as RFC enabled)

But did you look for any method of the BAdI that would provide access to the data before update?