2006 Nov 01 9:35 PM
Is is advisable to use 'wait' in programs ? I need to do a select on a table , that i just wrote ....If i dont do a wait in the program , the select returns blank...!!
Does this make a major performance setback in a program ?
clear bkpf.
clear bkpf2.
wait up to 2 seconds.
select single * from bkpf into bkpf where
belnr = belnr1 and bukrs = messtab-msgv2 .
if sy-subrc = 0.
if dist >= 2.
select single * from bkpf into bkpf2 where
bvorg = bkpf-bvorg and belnr <> belnr1 and gjahr = bkpf-gjahr.
if sy-subrc = 0.
write 😕 Cross Company doc num: ' , bkpf-bvorg color 5.
write 😕 'Posted In Company Code : ' , bkpf-bukrs color 5.
uline.
2006 Nov 01 10:06 PM
It is really your discretion. Are you trying to read a record that has "just" been added to the database? If so, the record may still be in the buffer (and not physically in the database) and the wait is justbuying you time. The problem is this may not work all the time (depending on the load and system timings). I would opt for Commit and Wait before Wait.
2006 Nov 01 9:42 PM
Hi,
I don't think wait up to 2 seconds will cause major performance while waiting messtab-msgv2 value.
Is this inside loop statement?
Regards,
Ferry Lianto
2006 Nov 01 10:06 PM
It is really your discretion. Are you trying to read a record that has "just" been added to the database? If so, the record may still be in the buffer (and not physically in the database) and the wait is justbuying you time. The problem is this may not work all the time (depending on the load and system timings). I would opt for Commit and Wait before Wait.
2006 Nov 01 11:14 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |