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

looking for COMMAND

Former Member
0 Likes
796

how i can tell in the program

to wait 5 second before doing something

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
753

hi liat,

just use

wait up to 5 seconds.

regards

satesh

7 REPLIES 7
Read only

Former Member
0 Likes
754

hi liat,

just use

wait up to 5 seconds.

regards

satesh

Read only

rahulkavuri
Active Contributor
0 Likes
753

use the FM ENQUE_SLEEP

you can also use the command

wait up to 10 seconds

<b>

Please reward points if found helpful</b>

Read only

0 Likes
753

may be try with

<b>wait up to 5 seconds .</b>

Read only

Former Member
0 Likes
753

Hi Liat,

If you mean to suspend the activities for 5 secs, it is possible through the FM ENQUE_SLEEP.

Regards,

SP.

Read only

Former Member
0 Likes
753

Hi,

you can use this caommand to wait 5 sec.

WAIT UP TO sec SECONDS.

regards

Rajvinder

Read only

Former Member
0 Likes
753

Hii liat

look at this fm

<b>RZL_SLEEP</b>Thsi will put the program to sleep for a specified period of time(in seconds), which means that the program stops processing for a couple seconds and then continues

<b>SWE_CD_TST_DELAY</b>

<b>ENQUE_SLEEP</b>

check this program

REPORT zauto_refresh .

DATA: g_init_once,

ok_code(20),

g_ref_from_timer.

TYPES: BEGIN OF t_ekko,

ebeln TYPE ekpo-ebeln,

ebelp TYPE ekpo-ebelp,

statu TYPE ekpo-statu,

aedat TYPE ekpo-aedat,

matnr TYPE ekpo-matnr,

menge TYPE ekpo-menge,

meins TYPE ekpo-meins,

netpr TYPE ekpo-netpr,

peinh TYPE ekpo-peinh,

END OF t_ekko.

DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,

wa_ekko TYPE t_ekko.

IF g_init_once <> 'X'.

g_init_once = 'X'.

CALL FUNCTION 'Z_ENQUE_SLEEP'

STARTING NEW TASK 'WAIT'

PERFORMING when_finished ON END OF TASK.

ENDIF.

WRITE:/ 'wait for 10 sec....'.

AT USER-COMMAND.

CASE ok_code.

WHEN 'FCT_R'.

SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh

UP TO 10 ROWS

FROM ekpo

INTO TABLE it_ekko.

WRITE:/ sy-uzeit. "Time

LOOP AT it_ekko INTO wa_ekko.

WRITE:/ wa_ekko-ebeln, wa_ekko-ebelp.

ENDLOOP.

sy-lsind = 0.

IF g_ref_from_timer = 'X'.

CALL FUNCTION 'Z_ENQUE_SLEEP'

STARTING NEW TASK 'INFO'

PERFORMING when_finished ON END OF TASK.

g_ref_from_timer = ''.

ENDIF.

ENDCASE.

----


  • FORM WHEN_FINISHED *

----


  • ........ *

----


  • --> TASKNAME *

----


FORM when_finished USING taskname.

RECEIVE RESULTS FROM FUNCTION 'Z_ENQUE_SLEEP'.

g_ref_from_timer = 'X'.

  • Trigger an event to run the at user-command

SET USER-COMMAND 'FCT_R'.

ok_code = 'FCT_R'.

sy-ucomm = 'FCT_R'.

ENDFORM. " WHEN_FINISHED

*Signiture for creating Function module used above

FUNCTION Z_ENQUE_SLEEP.

*"----


""Local interface:

*"----


wait up to 10 seconds.

ENDFUNCTION.

you can as well check this thread for more information.

<b>

reward points if helpful

Regards

Naresh

Read only

Former Member
0 Likes
753

use the func. module: C14Z_WAIT_N_SECONDS and give 5 in the input!!