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: 

WAIT UP TO 1 SECONDS

Former Member
0 Kudos
4,951

Hi all,

We've a reqt to call txn 'IW52' and skip the first screen. I'm passing the notification no. through SET parameter. I make changes in the partner address.

After control comes back to the calling program, if I fire a select query on IHPA table for ADRNR, it doesnt get updated in the DB table immediately. I need to use the Address no. further for processing. I cannot use the update 'L' option out here because its not a BDC, but a simple CALL transaction.

First, I tried COMMIT WORK AND WAIT. Then also it did'nt update the DB.

Then I tried the option WAIT UP TO 1 SECONDS. Finally the DB table was getting updated. But I'm concerned if this will pose any performance issues going forward. Is there any other method which is more effective?

Thanks in advance,

Regards

Deepthi.

6 REPLIES 6

Former Member
1,054

You can try with gradually decreasing values like UPTO .5 seconds, UP TO .25 seconds etc.

0 Kudos
1,054

Hi Sandip,

The syntax for the WAIT statement accepts time only in integers. The minimum I could try was 1 second only.

Regards

Deepthi.

0 Kudos
1,054

You can write: WAIT UP TO '1.5' SECONDS. It works perfectly 😉

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
1,054

Well, it is not the most efficient way, but it does work. The only problem is if the update takes more than 1 second, then you are back to square 1, if you increase the wait time, you may be waiting unecessarily, right? The only thing that I can think of which may work is to use a lock object. You need to find out if/what object is being locked by the call transaction when it is updating in IW52, if you can figure this out, you can then try to immediately get a lock after the CALL TRANSACTION, using the ENQUEUE function module, there is a _WAIT parameter which when set to X, will wait for the lock to be achieved, once it is release by the CALL TRANSACTION, it will return control back to you. Then you know that the update is complete, you can then release the lock and continue processing. What do ya think?

Regards,

Rich Heilman

0 Kudos
1,054

Rich,

That's a wonderful idea.

Former Member
0 Kudos
1,054

You can try to find a BAPI for the transaction and then using the BAPI_Transaction_commit with the flag WAIT = 'X'