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

Need a function module for commit

Former Member
0 Likes
1,207

Hi Experts,

I have a requirement of displaying a PO report in alv and when the user clicks the po it showed navigate to ME23N to display the PO.

Here the user can go in change mode to change some details in po, and when he returns back, the report should show the changes in the PO.

I am able to update the report once the user return back to the report from ME23N.

But only thing is there is a lag(5 Secs) of updating the database table when the user saves the PO.

So we need to commit once the user return to the report and then fetch the data from database.

I tried to use the " Commit work Statement" but it does't update as early.

can some one please telll me some commit Fucntion module which can update the ME23N related tables qiuckly.?

Regards,

Venkatesh.

12 REPLIES 12
Read only

Former Member
Read only

0 Likes
1,184

what about COMMIT WORK AND WAIT or

BAPI_TRANSACTION_COMMIT

Read only

Former Member
0 Likes
1,184

u can use wait uptp 5 seconds to compensate tht lag

Read only

Former Member
0 Likes
1,184

Use FM : DB_COMMIT.

Read only

ThomasZloch
Active Contributor
0 Likes
1,184

The commit is already done inside ME23N (change mode). A possibility would be to call the transaction in synchronous mode (UPDATE = 'S'), but for this you would need to also use the USING addition and some BDC-data for the initial screen.

Thomas

Read only

Former Member
0 Likes
1,184

This message was moderated.

Read only

0 Likes
1,184

since the same answer is already given above there's no need to post again.

Read only

0 Likes
1,184

>

> since the same answer is already given above there's no need to post again.

Especially when that answer is wrong...

As we talk about a standard transaction here, the COMMIT is included in the standard transaction, so it does not make any sense to do it once more in an FM, or directly in the ABAP program (not mentioning that the LUW is closed already, so there is nothing to commit...)

On the other hand, the replies with WAIT UP TO ... are very strange, because now the time is 5 seconds, but next time it could be 7 seconds, who knows... this is not a stabile solution.

The only reply is worth considering is the one from Thomas!

Read only

Former Member
0 Likes
1,184

Hi Experts,

Thanks for the clarification.

But is it advisable to use commit statement in a custom program.

Regards,

Venkatesh

Read only

0 Likes
1,184

hi..

you can use WAIT UPTO 5 SEC or bapi_transaction_commit so as to cover the lagtime.In the past have faced a similar problem and i had used wait upto 5 secs so as to compensate for the lag.

Read only

0 Likes
1,184

and what if the "lag" (i.e. update task) takes 6 seconds due to high system load?

I would always prefer a synchronous call transaction to cater for any delay in the update task.

Thomas

Read only

Former Member
0 Likes
1,184

Normally

COMMIT WORK AND WAIT.

should add the required delay.

Edited by: vivek amrute on Dec 11, 2008 1:00 PM