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: 

Regarding "Wait up to"

Former Member
0 Kudos
6,907

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,904

Use like this.....

WAIT up to '0.5' seconds.

11 REPLIES 11

Former Member
0 Kudos
1,905

Use like this.....

WAIT up to '0.5' seconds.

bpawanchand
Active Contributor
0 Kudos
1,904

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

Former Member
0 Kudos
1,904

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:

http://www.geocities.com/rmtiwari/main.html?http://www.geocities.com/rmtiwari/Resources/Utilities/AB...

Regards,

Chandra Sekhar

Former Member
0 Kudos
1,904

Hi,

I know. Im using it after calling the bapi bapi_material_savedata.

Regards,

Roberto.

0 Kudos
1,904

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

Former Member
0 Kudos
1,904

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

Former Member
0 Kudos
1,904

Hi,

you can not use fractions in Wait upto commant it should be whole integer.

e.g wait upto 1 seconds.

Thanks,

Kamesh Bathla

Former Member
0 Kudos
1,904

Thanks for your answers and comments.

Cheers,

Roberto

0 Kudos
1,904

Roberto - in this forum, the proper way to say "thanks" is by assigning points to the answers you found helpful.

Rob

0 Kudos
1,904

yes, everyone should give the points for the useful answer.

matt
Active Contributor
0 Kudos
1,904

On the other hand, you've got into the habit of ASKING for points, and that's not allowed under the forum rules.