2008 Aug 04 6:02 PM
Hi,
After I call a FM I need to stop the process for less than a second.
I thought that i could use WAIT UP TO 0.5 SECONDS, but i doesnt seem to work that way. It only works with integers.
So, if anyone could suggest anything, it would be very usefull.
Regards,
Roberto.
2008 Aug 04 6:06 PM
2008 Aug 04 6:06 PM
2008 Aug 04 6:07 PM
HI
ABAP keyword WAIT: Required if you wish to wait for all of the asynchronous parallel tasks created with CALL FUNCTION to return. This is normally a requirement for orderly background processing. May be used only if the CALL FUNCTION includes the PERFORMING ON RETURN addition.
Regards
Pavan
2008 Aug 04 6:17 PM
Hi Roberto,
WAIT should only be used with asynchronous Remote Function Calls ( CALL FUNCTION func ...STARTING NEW TASK task name) and the addition PERFORMING form ON END OF TASK. It has no effect in other environments.
Check this link for more details:
Regards,
Chandra Sekhar
2008 Aug 04 6:20 PM
Hi,
I know. Im using it after calling the bapi bapi_material_savedata.
Regards,
Roberto.
2008 Aug 04 6:47 PM
Hi Roberto,
Try the following code:
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = EX_HEADDATA
CLIENTDATA = EX_CLIENTDATA
CLIENTDATAX = EX_CLIENTDATAX
PLANTDATA = EX_PLANTDATA
PLANTDATAX = EX_PLANTDATAX
IMPORTING
RETURN = IM_RETURN.
IF IM_RETURN-TYPE = 'E'.
ELSE.
COMMIT WORK AND WAIT.
WAIT UP TO 5 SECONDS.
ENDIF.
Check this link for complete code:
http://blog.csdn.net/CompassButton/archive/2006/09/12/1215203.aspx
Regards,
Chandra Sekhar
2008 Aug 04 6:32 PM
It would probably be much more efficient to determine which lock has not been released and then continue when it has been released rather than using an arbitrary WAIT statement.
Rob
2008 Aug 04 6:37 PM
Hi,
you can not use fractions in Wait upto commant it should be whole integer.
e.g wait upto 1 seconds.
Thanks,
Kamesh Bathla
2008 Aug 04 9:15 PM
2008 Aug 04 9:46 PM
Roberto - in this forum, the proper way to say "thanks" is by assigning points to the answers you found helpful.
Rob
2008 Aug 04 10:21 PM
yes, everyone should give the points for the useful answer.
2008 Aug 05 12:19 PM
On the other hand, you've got into the habit of ASKING for points, and that's not allowed under the forum rules.